-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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: Add tagging support to aws_redshift_subnet_group #9504
Conversation
@@ -24,25 +24,27 @@ func resourceAwsRedshiftSubnetGroup() *schema.Resource { | |||
}, | |||
|
|||
Schema: map[string]*schema.Schema{ | |||
"name": &schema.Schema{ | |||
"name": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help me understand why &schema.Schema
was removed. Simply because it's implied by the type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since Go 1.7 we have found this is no longer needed
} else { | ||
if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { | ||
return tagErr | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for branching with else
as we have return
above.
@@ -97,12 +101,25 @@ func resourceAwsRedshiftSubnetGroupRead(d *schema.ResourceData, meta interface{} | |||
d.Set("name", d.Id()) | |||
d.Set("description", describeResp.ClusterSubnetGroups[0].Description) | |||
d.Set("subnet_ids", subnetIdsToSlice(describeResp.ClusterSubnetGroups[0].Subnets)) | |||
d.Set("tags", tagsToMapRedshift(describeResp.ClusterSubnetGroups[0].Tags)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check for an error (above too)?
02ad3ff
to
9ca94df
Compare
Fixes #9492 ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftSubnetGroup_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/10/21 17:16:02 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRedshiftSubnetGroup_ -timeout 120m === RUN TestAccAWSRedshiftSubnetGroup_importBasic --- PASS: TestAccAWSRedshiftSubnetGroup_importBasic (86.54s) === RUN TestAccAWSRedshiftSubnetGroup_basic --- PASS: TestAccAWSRedshiftSubnetGroup_basic (85.50s) === RUN TestAccAWSRedshiftSubnetGroup_updateSubnetIds --- PASS: TestAccAWSRedshiftSubnetGroup_updateSubnetIds (140.01s) === RUN TestAccAWSRedshiftSubnetGroup_tags --- PASS: TestAccAWSRedshiftSubnetGroup_tags (136.02s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 448.075 ```
9ca94df
to
52f2717
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
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. |
Fixes #9492