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.82k stars 9.16k forks source link

[Bug]: resource/aws_lb_listener - issue on `tags_all` #27465

Open posquit0 opened 2 years ago

posquit0 commented 2 years ago

Terraform Core Version

1.3.3

AWS Provider Version

4.36.1

Affected Resource(s)

Expected Behavior

With defaults_tags from provider configuration block and tags from resource block, apply should be success.

Actual Behavior

With defaults_tags from the provider configuration block and tags from the resource block, apply is failing after completing creation.

Relevant Error/Panic Output Snippet

module.nlb["dev-nlb-partner-public"].aws_lb.this: Still creating... [2m40s elapsed]
module.nlb["dev-nlb-partner-public"].aws_lb.this: Still creating... [2m50s elapsed]
module.nlb["dev-nlb-partner-public"].aws_lb.this: Creation complete after 2m51s [id=arn:aws:elasticloadbalancing:ap-northeast-2:xxxxxxx:loadbalancer/net/dev-nlb-partner-public/zzzzzzz]
╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for module.nlb["dev-nlb-partner-public"].module.listener["443"].aws_lb_listener.this to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/aws" produced an invalid new value for .tags_all: new element
│ "Name" has appeared.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for module.nlb["dev-nlb-partner-public"].module.listener["443"].aws_lb_listener.this to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/aws" produced an invalid new value for .tags_all: new element
│ "module.terraform.io/full-name" has appeared.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for module.nlb["dev-nlb-partner-public"].module.listener["443"].aws_lb_listener.this to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/aws" produced an invalid new value for .tags_all: new element
│ "module.terraform.io/instance" has appeared.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

Terraform Configuration Files

provider "aws" {
  ...
  default_tags  {
    tags = { ... }
  }
}

resource "aws_lb_listener" {
  ...
  tags = { ... }
}

Steps to Reproduce

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

github-actions[bot] commented 2 years ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

ewbankkit commented 2 years ago

Similar:

ewbankkit commented 2 years ago

@posquit0 Thanks for raising this issue 👏.

We are planning to investigate the default_tags issues as part of the upcoming quarter's Roadmap.

justenwalker commented 1 year ago

@ewbankkit is there a meta-issue to consolidate progress on this? I think #19583 seems like a good candidate as a catch-all.

omri-kaslasi commented 1 year ago

@posquit0 Thanks for raising this issue 👏.

We are planning to investigate the default_tags issues as part of the upcoming quarter's Roadmap.

Any updates?

PavanKumar-Kinesso commented 1 year ago

Interesting aspect it that once we run the terraform 2nd time it gets automatically fixed