hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.84k stars 9.19k forks source link

[Bug]: aws_service_discovery_private_dns_namespace doesn't check actual tags #31515

Open ccayg-sainsburys opened 1 year ago

ccayg-sainsburys commented 1 year ago

Terraform Core Version

1.4.6

AWS Provider Version

4.67.0

Affected Resource(s)

aws_service_discovery_private_dns_namespace tags

Expected Behavior

tags on hosted zone created by aws_service_discovery_private_dns_namespace resource should be reset if there has been a change outside of terraform

Actual Behavior

If a tag has been edited (manually for the sake of argument) on the hosted zone created by aws_service_discovery_private_dns_namespace resource then that does not seem to be 'known' to terraform - I presume the tags are not read from the resource and the remote state is trusted - this doesn't seem to match behaviour for most resources.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_vpc" "example" {
  cidr_block = "10.0.0.0/16"
}

resource "aws_service_discovery_private_dns_namespace" "example" {
  name        = "hoge.example.local"
  description = "example"
  vpc         = aws_vpc.example.id
  tags        = { "test_key" = "test_value" }
}

Steps to Reproduce

Create based on above config. Manually edit tag value to different_value Plan - note tag not reset

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

7840 adds this functionality

Would you like to implement a fix?

No

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue