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 for additional arguments on azurerm_api_management_api_diagnostic #9172

Merged
merged 9 commits into from Nov 16, 2020

Conversation

sirlatrom
Copy link
Contributor

@sirlatrom sirlatrom commented Nov 5, 2020

Closes #9169.

@ghost ghost added the size/L label Nov 5, 2020
@sirlatrom sirlatrom force-pushed the fix-9169 branch 8 times, most recently from 9fda0c3 to 4807ec2 Compare November 6, 2020 10:01
@ghost ghost added size/XL documentation and removed size/L labels Nov 6, 2020
@sirlatrom sirlatrom marked this pull request as ready for review November 6, 2020 10:07
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
@sirlatrom
Copy link
Contributor Author

Pinging @jackofallops as you were the reviewer on the original resource PR. The original PR only implemented the required arguments. This PR adds the other arguments configurable through the Portal and ARM API.

Copy link
Member

@manicminer manicminer left a comment

Choose a reason for hiding this comment

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

Hi @sirlatrom, thanks for this. Just a couple small suggestions, if you could answer those then this LGTM! :)

@manicminer manicminer added this to the v2.36.0 milestone Nov 11, 2020
sirlatrom and others added 2 commits November 11, 2020 11:50
Co-authored-by: Tom Bamford <tom@bamford.io>
…gnostic_resource.go

Co-authored-by: Tom Bamford <tom@bamford.io>
@manicminer
Copy link
Member

Signed-off-by: Sune Keller <absukl@almbrand.dk>
@sirlatrom
Copy link
Contributor Author

Oops, I should learn to stop coding directly on GitHub; extraneous comma at https://github.com/terraform-providers/terraform-provider-azurerm/pull/9172/files#diff-c5799762db005774a01a8b87d865af5879b7e92cf5ed980bb2f60c8718976214R326

@manicminer That's taken care of now :)

…gnostic_resource.go

Co-authored-by: Tom Bamford <tom@bamford.io>
Comment on lines 210 to 225
if frontendRequest, ok := d.GetOk("frontend_request"); ok {
parameters.Frontend.Request = expandApiManagementApiDiagnosticHTTPMessageDiagnostic(frontendRequest.([]interface{}))
}

if frontendResponse, ok := d.GetOk("frontend_response"); ok {
parameters.Frontend.Response = expandApiManagementApiDiagnosticHTTPMessageDiagnostic(frontendResponse.([]interface{}))
}

if backendRequest, ok := d.GetOk("backend_request"); ok {
parameters.Backend.Request = expandApiManagementApiDiagnosticHTTPMessageDiagnostic(backendRequest.([]interface{}))
}

if backendResponse, ok := d.GetOk("backend_response"); ok {
parameters.Backend.Response = expandApiManagementApiDiagnosticHTTPMessageDiagnostic(backendResponse.([]interface{}))
}

Copy link
Member

Choose a reason for hiding this comment

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

@sirlatrom Getting a crash here, looks like parameters.Frontend / parameters.Backend are nil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I'll look into it and ensure they are initialized correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be handled better now in 3dbe558.

Signed-off-by: Sune Keller <absukl@almbrand.dk>
@jackofallops jackofallops modified the milestones: v2.36.0, v2.37.0 Nov 12, 2020
@manicminer
Copy link
Member

@sirlatrom This is unfortunately blocked by Azure/azure-sdk-for-go#13604

@manicminer manicminer modified the milestones: v2.37.0, Blocked Nov 13, 2020
@sirlatrom
Copy link
Contributor Author

@sirlatrom This is unfortunately blocked by Azure/azure-sdk-for-go#13604

We can either await its resolution or I can extract the sampling part into another PR?

@manicminer
Copy link
Member

@sirlatrom Sure, that'll work, you can remove that attribute for now. Thanks!

sirlatrom added a commit to sirlatrom/terraform-provider-azurerm that referenced this pull request Nov 13, 2020
@sirlatrom
Copy link
Contributor Author

@sirlatrom Sure, that'll work, you can remove that attribute for now. Thanks!

Done!

@sirlatrom
Copy link
Contributor Author

@sirlatrom Sure, that'll work, you can remove that attribute for now. Thanks!

Done!

@manicminer I created #9321 to follow up on this when the SDK issue is resolved.

@manicminer manicminer modified the milestones: Blocked, v2.37.0 Nov 16, 2020
@manicminer
Copy link
Member

Test results
Screenshot 2020-11-16 at 11 38 06

Copy link
Member

@manicminer manicminer left a comment

Choose a reason for hiding this comment

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

Thanks @sirlatrom, this LGTM 👍

@manicminer manicminer merged commit 0a6b30b into hashicorp:master Nov 16, 2020
manicminer added a commit that referenced this pull request Nov 16, 2020
manicminer added a commit that referenced this pull request Nov 16, 2020
manicminer added a commit that referenced this pull request Nov 16, 2020
@ghost
Copy link

ghost commented Nov 20, 2020

This has been released in version 2.37.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.37.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Dec 16, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Dec 16, 2020
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.

Support for additional arguments on azurerm_api_management_api_diagnostic
4 participants