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

Tags repeatedly marked as not being set correctly for aws_db_instance #345

Closed
hashibot opened this issue Jun 13, 2017 · 3 comments · Fixed by #4943
Closed

Tags repeatedly marked as not being set correctly for aws_db_instance #345

hashibot opened this issue Jun 13, 2017 · 3 comments · Fixed by #4943
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@hashibot
Copy link

This issue was originally opened by @davedash as hashicorp/terraform#9821. It was migrated here as part of the provider split. The original body of the issue is below.


In Terraform 0.7.8 (and prior):

terraform plan gives me:

~ module.dev.aws_db_instance.db
    tags.%:      "0" => "3"
    tags.Name:   "" => "dbdev"
    tags.dbrole: "" => "master"
    tags.env:    "" => "dev"

My tf file looks like:


resource "aws_db_instance" "db" {
    ...
    engine               = "postgres"
    engine_version       = "9.5.2"
    instance_class       = "db.m3.medium"
    db_subnet_group_name = "${aws_db_subnet_group.db.name}"
    storage_encrypted    = true
    parameter_group_name = "${var.parameter_group}"  # summit custom
    allow_major_version_upgrade = true

    tags {
      Name = "${var.env}"
      dbrole = "master"
      env = "${var.env}"
    }
...

After an apply, the tags are set. Re-running plan gives me the same output, so I'm always in a dirty state.

This is the case for all of my rds instances.

@hashibot hashibot added the bug Addresses a defect in current functionality. label Jun 13, 2017
@radeksimko radeksimko added the service/rds Issues and PRs that pertain to the rds service. label Jan 25, 2018
tomelliff added a commit to tomelliff/terraform-provider-aws that referenced this issue Jun 22, 2018
Just logging the error means that if the user is unable to call the ListTagsForResource API endpoint then they will see a diff showing that they need to add the tags each time.
Instead it's better to actually error instead of hiding this from the user (unless they happen to check the logs).

Closes hashicorp#345
@bflad bflad added this to the v1.25.0 milestone Jun 22, 2018
@bflad
Copy link
Contributor

bflad commented Jun 22, 2018

Courtesy of #4943, the aws_db_instance resource will properly return any ListTagsForResource error (our normal behavior for other parts of Terraform) instead of just a debug log and perpetual difference in terraform plan. It will be released in version 1.25.0 of the AWS provider, likely middle of next week.

@bflad
Copy link
Contributor

bflad commented Jun 27, 2018

This has been released in version 1.25.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 4, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
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/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants