Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-string type for parameters of azurerm_managed_application #8632

Merged
merged 8 commits into from
Apr 27, 2021

Conversation

neil-yechenwei
Copy link
Contributor

fixes #8608

@katbyte katbyte self-assigned this Oct 4, 2020
@Dilergore
Copy link
Contributor

Bump! Please merge this asap we really need this.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr @neil-yechenwei - looking at this i'm wondering if it would be better to instead support both and make them conflict? either parameters for those who need a simple key=value and then paramters_as_json for users who want to just pass in a json block?

@ghost ghost added size/M and removed size/L labels Apr 26, 2021
@neil-yechenwei
Copy link
Contributor Author

@katbyte , thanks for your comments. I've updated code. Please have an another look. Thanks.

@ghost ghost removed the waiting-response label Apr 26, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @neil-yechenwei - couple more comments to address and this should be good to merge

@@ -94,6 +94,21 @@ func TestAccManagedApplication_update(t *testing.T) {
})
}

func TestAccManagedApplication_parameterValues(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add a test that goes string -> non-string -> string and checking to make sure the correct property is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added tc

@ghost ghost added size/L and removed size/M labels Apr 27, 2021
@neil-yechenwei
Copy link
Contributor Author

@katbyte , thanks for your comments. I've updated code. Please have an another look. Thanks.

@ghost ghost removed the waiting-response label Apr 27, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @neil-yechenwei, looks good. There are two test failures:

------- Stdout: -------
=== RUN   TestAccManagedApplication_complete
=== PAUSE TestAccManagedApplication_complete
=== CONT  TestAccManagedApplication_complete
    testing.go:620: Step 1/2 error: Error running apply: exit status 1
        
        Error: A resource with the ID "/subscriptions/*******/providers/Microsoft.MarketplaceOrdering/agreements/cisco/offers/meraki-vmx/plans/meraki-vmx100" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_marketplace_agreement" for more information.
        
          on terraform_plugin_test.tf line 35, in resource "azurerm_marketplace_agreement" "test":
          35: resource "azurerm_marketplace_agreement" "test" {
        
--- FAIL: TestAccManagedApplication_complete (106.85s)
FAIL

------- Stderr: -------
2021/04/27 04:03:28 [DEBUG] not using binary driver name, it's no longer needed
2021/04/27 04:03:28 [DEBUG] not using binary driver name, it's no longer needed
 ------- Stdout: -------
=== RUN   TestAccManagedApplication_update
=== PAUSE TestAccManagedApplication_update
=== CONT  TestAccManagedApplication_update
    testing.go:620: Step 3/6 error: Error running apply: exit status 1
        
        Error: A resource with the ID "/subscriptions/*******/providers/Microsoft.MarketplaceOrdering/agreements/cisco/offers/meraki-vmx/plans/meraki-vmx100" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_marketplace_agreement" for more information.
        
          on terraform_plugin_test.tf line 35, in resource "azurerm_marketplace_agreement" "test":
          35: resource "azurerm_marketplace_agreement" "test" {
        
--- FAIL: TestAccManagedApplication_update (437.25s)
FAIL

------- Stderr: -------
2021/04/27 04:03:28 [DEBUG] not using binary driver name, it's no longer needed
2021/04/27 04:03:28 [DEBUG] not using binary driver name, it's no longer needed

once fixed this should be good to merge!

@katbyte katbyte added this to the v2.57.0 milestone Apr 27, 2021
@neil-yechenwei
Copy link
Contributor Author

neil-yechenwei commented Apr 27, 2021

@katbyte , I assume it's your test env issue. Please cancel the related term first in your test env with command before run test case.

@ghost ghost removed the waiting-response label Apr 27, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's an ongoing problem on master to, these tests always fail in TC - should look into a way to fix them so they don't fail anymore but it doesn't block this pr 👍

@katbyte katbyte merged commit 57a6c09 into hashicorp:master Apr 27, 2021
katbyte added a commit that referenced this pull request Apr 27, 2021
@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 2.57.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.57.0"
}
# ... other configuration ...

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

managed_application only supports string as parameters
4 participants