-
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
tags update for azurerm_container_group #10210
tags update for azurerm_container_group #10210
Conversation
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.
hey @AliAllomani
Thanks for this PR :)
I've taken a look through and left some comments inline but this is off to a good start, if we can fix up the comments (and the tests pass) then we should be able to get this merged 👍
Thanks!
return fmt.Errorf("Cannot read container group %s (resource group %s) ID", name, resGroup) | ||
} | ||
|
||
d.SetId(*read.ID) |
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.
since we're performing an update here, we can remove this ID update (and Get retrieval) here, since the ID won't change during an update
defer cancel() | ||
|
||
resGroup := d.Get("resource_group_name").(string) | ||
name := d.Get("name").(string) |
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.
where this is an update, can we parse the ID rather than retrieving these from the state:
id, err := azure.ParseAzureResourceID(d.Id())
if err != nil {
return err
}
resGroup := id.ResourceGroup
name := id.Path["containerGroups"]
Thanks @tombuildsstuff, updated and tested the code as per your recommendations. |
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.
LGTM - thanks for pushing those changes @AliAllomani
This has been released in version 2.44.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.44.0"
}
# ... 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 👉 [email protected]. Thanks! |
Fixes #9612