-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
monitor_diagnostic_setting_resource crashes with Error: ID was missing the authorizationRules
element
#10097
Comments
P.S. the issue here is not the state but the actual ID resource returns - e.g. AuthorizationRules VS authorizationRules hence the parse fails. This also only affect existing resources which originally were configured with AuthorizationRules , new builds work just fine as they only accept and return authorizationRules. |
This is a breaking change between 2.41 and 2.42 that has cause my company a massive headache. |
@tombuildsstuff @katbyte is this possible to cut a release with a fix as the impact of this issue is indeed widespread? |
Fixed via #10104 @andrey-dubnik the next release will go out Thursday - since there's several other instances of this to fix in the interim unfortunately |
This has been released in version 2.43.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.43.0"
}
# ... other configuration ... |
TF Version: 0.13.5 State content:
Created with 2.41.0:
Output: Expected: Is 2.43.0 supposed to fix the breaking changes or are users expected to recreate rules? |
@CrowderKroger 2.43 fixed the issue for my teams. Fix only target the retrofit scenario where resources were created with the AuthorizationRules. I suggest validating that you are passing correct syntax (/authorizationRules/) via the |
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 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
azurerm 2.42.0
terraform 0.12.30
Affected Resource(s)
monitor_diagnostic_setting_resource
Issue Description
Over the last few days we start having issues with the infrastructure builds and modifications while using the diagnostics resource.
The cause seem to be the diagnostic receives AuthorizationRules where Azure SDK change now requires authorizationRules.
Following is the current state representation
Accordingly to the code event rule gets parsed when received from the diagnostics resource
https://github.com/terraform-providers/terraform-provider-azurerm/blob/31341dda6bf1c8771b2f57e54522961872dfcddd/azurerm/internal/services/monitor/monitor_diagnostic_setting_resource.go#L321
Result of the parse ends up being "Error: ID was missing the
authorizationRules
element" cause Parse logic expects authorizationRules in the path...The obvious fix would be to alter the retrieved ID and replace AuthorizationRules with authorizationRules but I suspect there may be a better option?
The text was updated successfully, but these errors were encountered: