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

azurerm_security_center_contact - override SDK creation function to handle 201 response code #8774

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

beandrad
Copy link
Contributor

@beandrad beandrad commented Oct 7, 2020

This allows to create a new security center contact.

The current issue is that the Azure Rest API may return a 201 upon resource
creation, however, the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes #8317

@ghost ghost added the size/M label Oct 7, 2020
@beandrad beandrad force-pushed the 8317-sc-contact branch 2 times, most recently from a804d83 to ec86408 Compare October 7, 2020 10:36
@ghost ghost added size/XL and removed size/M labels Oct 7, 2020
@ghost ghost added size/M and removed size/XL labels Oct 7, 2020
Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @beandrad

Thanks for this PR :)

Taking a look through this is looking good, if we can fix up a couple of minor comments then this otherwise LGTM 👍

Thanks!

@tombuildsstuff tombuildsstuff added bug service/security-center upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR labels Oct 8, 2020
@beandrad
Copy link
Contributor Author

beandrad commented Oct 8, 2020

@tombuildsstuff thanks for reviewing! changes made!

@beandrad beandrad force-pushed the 8317-sc-contact branch 2 times, most recently from ec32f45 to 94424c9 Compare October 9, 2020 08:21
@ghost ghost added size/XL dependencies and removed size/M labels Oct 9, 2020
@beandrad beandrad force-pushed the 8317-sc-contact branch 2 times, most recently from 711a4d6 to ac502ca Compare October 9, 2020 08:55
@ghost ghost added size/M and removed size/XL labels Oct 9, 2020
@ghost ghost added size/XL and removed size/M labels Oct 9, 2020
@manicminer manicminer added this to the v2.32.0 milestone Oct 12, 2020
Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @beandrad

Thanks for pushing those changes - if we can rebase this and update the vendoring then this otherwise LGTM 👍

go.mod Show resolved Hide resolved
This allows to create a new security center contact.

The issue is that the Azure Rest API may return a 201 upon resource
creation, however the API specs don't include this status code as
successful, which causes the corresponding method from the Azure Go SDK
to return an error.

Fixes hashicorp#8317
Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for pushing those changes @beandrad

@katbyte katbyte changed the title Fix error when creating security center contact azurerm_security_center_contact - override SDK creation function to handle 201 response code Oct 15, 2020
@katbyte katbyte merged commit cb13b11 into hashicorp:master Oct 15, 2020
katbyte added a commit that referenced this pull request Oct 15, 2020
@ghost
Copy link

ghost commented Oct 15, 2020

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

@ghost
Copy link

ghost commented Nov 14, 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!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug dependencies service/security-center size/M upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azurerm_security_center_contact return error with status code 201
4 participants