-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
AWS Organizations account tagging #8896
Comments
Affected resources: |
Reference: #8896 AWS Organizations Account testing is manual due to the lack of an automated deletion APIs. Manually verified with locally updated Terraform AWS Provider binary. Starting configuration: ```hcl resource "aws_organizations_account" "bflad-dev2" { name = "bflad-dev2" email = "--OMITTED--" } ``` Planned: ```console $ terraform plan ... No changes. Infrastructure is up-to-date. ``` Updated configuration: ```hcl resource "aws_organizations_account" "bflad-dev2" { name = "bflad-dev2" email = "--OMITTED--" tags = { key1 = "value1" } } ``` Applied and state: ```console $ terraform apply ... An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # aws_organizations_account.bflad-dev2 will be updated in-place ~ resource "aws_organizations_account" "bflad-dev2" { arn = "arn:aws:organizations::--OMITTED--:account/o-p687o6l073/--OMITTED--" email = "--OMITTED--" id = "--OMITTED--" joined_method = "INVITED" name = "bflad-dev2" parent_id = "r-cg2b" status = "ACTIVE" ~ tags = { + "key1" = "value1" } } Plan: 0 to add, 1 to change, 0 to destroy. Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes aws_organizations_account.bflad-dev2: Modifying... [id=--OMITTED--] aws_organizations_account.bflad-dev2: Modifications complete after 0s [id=--OMITTED--] Apply complete! Resources: 0 added, 1 changed, 0 destroyed. $ terraform state show aws_organizations_account.bflad-dev2 resource "aws_organizations_account" "bflad-dev2" { arn = "arn:aws:organizations::--OMITTED--:account/o-p687o6l073/--OMITTED--" email = "--OMITTED--" id = "--OMITTED--" joined_method = "INVITED" name = "bflad-dev2" parent_id = "r-cg2b" status = "ACTIVE" tags = { "key1" = "value1" } } ``` Updated configuration: ```hcl resource "aws_organizations_account" "bflad-dev2" { name = "bflad-dev2" email = "--OMITTED--" tags = { key1 = "value1updated" key2 = "value2" } } ``` Applied and state: ```console $ terraform apply ... An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # aws_organizations_account.bflad-dev2 will be updated in-place ~ resource "aws_organizations_account" "bflad-dev2" { arn = "arn:aws:organizations::--OMITTED--:account/o-p687o6l073/--OMITTED--" email = "--OMITTED--" id = "--OMITTED--" joined_method = "INVITED" name = "bflad-dev2" parent_id = "r-cg2b" status = "ACTIVE" ~ tags = { ~ "key1" = "value1" -> "value1updated" + "key2" = "value2" } } Plan: 0 to add, 1 to change, 0 to destroy. Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes aws_organizations_account.bflad-dev2: Modifying... [id=--OMITTED--] aws_organizations_account.bflad-dev2: Modifications complete after 1s [id=--OMITTED--] Apply complete! Resources: 0 added, 1 changed, 0 destroyed. $ terraform state show aws_organizations_account.bflad-dev2 resource "aws_organizations_account" "bflad-dev2" { arn = "arn:aws:organizations::--OMITTED--:account/o-p687o6l073/--OMITTED--" email = "--OMITTED--" id = "--OMITTED--" joined_method = "INVITED" name = "bflad-dev2" parent_id = "r-cg2b" status = "ACTIVE" tags = { "key1" = "value1updated" "key2" = "value2" } } ``` Updated configuration: ```hcl resource "aws_organizations_account" "bflad-dev2" { name = "bflad-dev2" email = "--OMITTED--" } ``` Applied and state: ```console $ terraform apply ... An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # aws_organizations_account.bflad-dev2 will be updated in-place ~ resource "aws_organizations_account" "bflad-dev2" { arn = "arn:aws:organizations::--OMITTED--:account/o-p687o6l073/--OMITTED--" email = "--OMITTED--" id = "--OMITTED--" joined_method = "INVITED" name = "bflad-dev2" parent_id = "r-cg2b" status = "ACTIVE" ~ tags = { - "key1" = "value1updated" -> null - "key2" = "value2" -> null } } Plan: 0 to add, 1 to change, 0 to destroy. Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes aws_organizations_account.bflad-dev2: Modifying... [id=--OMITTED--] aws_organizations_account.bflad-dev2: Modifications complete after 0s [id=--OMITTED--] Apply complete! Resources: 0 added, 1 changed, 0 destroyed. $ terraform state show aws_organizations_account.bflad-dev2 resource "aws_organizations_account" "bflad-dev2" { arn = "arn:aws:organizations::--OMITTED--:account/o-p687o6l073/--OMITTED--" email = "--OMITTED--" id = "--OMITTED--" joined_method = "INVITED" name = "bflad-dev2" parent_id = "r-cg2b" status = "ACTIVE" tags = {} } ```
Pull request submitted: #9202 |
Support for tagging with the |
This has been released in version 2.19.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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. Thanks! |
Community Note
Description
As of AWS SDK v1.19.45 AWS Organization accounts can be tagged:
Requires:
The text was updated successfully, but these errors were encountered: