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

provider/aws: aws_redshift_subnet_group allows description to be modified #9515

Merged
merged 1 commit into from
Oct 21, 2016
Merged

provider/aws: aws_redshift_subnet_group allows description to be modified #9515

merged 1 commit into from
Oct 21, 2016

Conversation

denniswebb
Copy link
Contributor

@denniswebb denniswebb commented Oct 21, 2016

Updating the description of aws_redshift_subnet_group would show in a plan, and update tfstate, but never update the value on AWS.

/tmp/tfissue $ cat rs_sg.tf
provider "aws" {
    region = "us-west-2"
}

resource "aws_redshift_subnet_group" "test" {
    name = "redshift-test"
    description = "My description"
    subnet_ids  = [ "REDACTED" ]
}

/tmp/tfissue $ ./terraform apply
aws_redshift_subnet_group.test: Creating...
  description:           "" => "My description"
  name:                  "" => "redshift-test"
  subnet_ids.#:          "" => "1"
  subnet_ids.3988262476: "" => "REDACTED"
aws_redshift_subnet_group.test: Creation complete

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

/tmp/tfissue $ aws redshift describe-cluster-subnet-groups
{
    "ClusterSubnetGroups": [
        {
provider "aws" {
            "Description": "My description",
            "ClusterSubnetGroupName": "redshift-test"
        }
    ]
}

/tmp/tfissue $ vi rs_sg.tf
...changing description in file...

/tmp/tfissue $ ./terraform plan
aws_redshift_subnet_group.test: Refreshing state... (ID: redshift-test)

~ aws_redshift_subnet_group.test
    description: "My description" => "Totally different"

Plan: 0 to add, 1 to change, 0 to destroy.

/tmp/tfissue $ ./terraform apply
aws_redshift_subnet_group.test: Refreshing state... (ID: redshift-test)
aws_redshift_subnet_group.test: Modifying...
  description: "My description" => "Totally different"
aws_redshift_subnet_group.test: Modifications complete

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

/tmp/tfissue $ aws redshift describe-cluster-subnet-groups
{
    "ClusterSubnetGroups": [
        {
            "Description": "My description",
            "ClusterSubnetGroupName": "redshift-test"
        }
    ]
}

Acceptance tests

make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftSubnetGroup_updateDescription'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/21 12:12:09 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRedshiftSubnetGroup_updateDescription -timeout 120m
=== RUN   TestAccAWSRedshiftSubnetGroup_updateDescription
--- PASS: TestAccAWSRedshiftSubnetGroup_updateDescription (50.29s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    50.330s

@catsby
Copy link
Contributor

catsby commented Oct 21, 2016

LGTM, thanks!

TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRedshiftSubnetGroup_updateDescription -timeout 120m
=== RUN   TestAccAWSRedshiftSubnetGroup_updateDescription
--- PASS: TestAccAWSRedshiftSubnetGroup_updateDescription (27.42s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    27.460s
Test:

@catsby catsby merged commit 88925eb into hashicorp:master Oct 21, 2016
@ghost
Copy link

ghost commented Apr 21, 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 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.

@ghost ghost locked and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants