Skip to content
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

Error: Provider produced inconsistent final plan - tags_all error when using default_tags block #24008

Closed
dsantanu opened this issue Apr 3, 2022 · 5 comments
Labels
bug Addresses a defect in current functionality. service/kafka Issues and PRs that pertain to the kafka service. tags Pertains to resource tagging.

Comments

@dsantanu
Copy link

dsantanu commented Apr 3, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

terraform: v0.13.6`
provider : v4.8.0

Affected Resource(s)

  • aws_msk_cluster
  • aws_s3_bucket

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

// Provider template
provider "aws" {
  allowed_account_ids = ["${aws_acc_id}"]
  region              = "${aws_region}"

  default_tags {
    tags {
      Account     = "${acc_name}"
      Commit      = "${git_hash}"
      CostCenter  = "${project}"
      Environment = "${env_name}"
    }
  }
}

// MSK resource
resource "aws_msk_cluster" "this_cluster" {
  ...
  ...
  tags = merge(
    var.extra_tags,
    { Name = "${local.tamplate_name}-${var.service_name}" }
  )
}

Error Output

Error: Provider produced inconsistent final plan

When expanding the plan for aws_msk_cluster.this["msk"] to include new 
values learned so far during apply, provider 
"registry.terraform.io/hashicorp/aws" has 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[0259] 1 error occurred:
         * exit status 1

Expected Behavior

Should add all of the combined tags without any error.

Actual Behavior

Ended up with above error. It clears out by itself on second run.

References

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. bug Addresses a defect in current functionality. service/kafka Issues and PRs that pertain to the kafka service. service/s3 Issues and PRs that pertain to the s3 service. labels Apr 3, 2022
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Apr 4, 2022
@dsantanu
Copy link
Author

Is there any update on this pls? Really not fair to carrying on with a bug like this from version to version. Pretty much every (if not all) resources are affected, as far as I can see.

@bassmanitram
Copy link

My own report (which I closed as a duplicate) #24434

@ajoga
Copy link

ajoga commented Jul 13, 2022

This issue looks similar or to duplicate #19583 ; TLDR: computed value in tags_all has an issue, some workaround are offered in linked issue.

@johnsonaj
Copy link
Contributor

Enhancements to tags was introduced in v5.0.0 of the provider. Please use v5.3.0 or higher to use computed tags. Please note that there are a few services, such as S3, that are being worked on so that they include all of the new tagging functionality #31941

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/kafka Issues and PRs that pertain to the kafka service. tags Pertains to resource tagging.
Projects
None yet
Development

No branches or pull requests

6 participants