-
Notifications
You must be signed in to change notification settings - Fork 301
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
azuread_application: avoid update after create #367
Conversation
0c7129e
to
66edeed
Compare
…auth2 permissions to shared funcs
… prevent unwanted diff, improve test cases
66edeed
to
96e713d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @manicminer - LGTM 👍
This has been released in version 1.1.1 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azuread" {
version = "~> 1.1.1"
}
# ... other configuration ... |
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! |
There are a set of small bugs which can occur by updating immediately after creating an application, mostly around the reliance on
d.GetChange()
, which is always true in this scenario.This PR refactors the update logic for the
app_role
andoauth2_permissions
properties into a helper function, and stops returningapplicationResourceUpdate()
at the end ofapplicationResourceCreate()
. Additionally fixes up the setting ofprevent_duplicate_names
on read to avoid unwanted diffs, and adds regression test coverage for that attribute.Sets
ConfigMode: schema.SchemaConfigModeAttr
on theapp_role
attribute to enable specifying an empty list in order to remove existing app roles. As with the other optional+computed attributes, this only works on update and if a config change is detected. Test also amended for this case.Resolves #364