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

Feature/add tags for aws mq resources #7193

Merged

Conversation

teraken0509
Copy link
Contributor

Fixes #6740

Changes proposed in this pull request:

  • Add mq broker tags
  • Add mq configuration tags

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSMqBroker_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSMqBroker_ -timeout 120m
=== RUN   TestAccAWSMqBroker_basic
=== PAUSE TestAccAWSMqBroker_basic
=== RUN   TestAccAWSMqBroker_allFieldsDefaultVpc
=== PAUSE TestAccAWSMqBroker_allFieldsDefaultVpc
=== RUN   TestAccAWSMqBroker_allFieldsCustomVpc
=== PAUSE TestAccAWSMqBroker_allFieldsCustomVpc
=== RUN   TestAccAWSMqBroker_updateUsers
=== PAUSE TestAccAWSMqBroker_updateUsers
=== RUN   TestAccAWSMqBroker_updateTags
=== PAUSE TestAccAWSMqBroker_updateTags
=== CONT  TestAccAWSMqBroker_basic
=== CONT  TestAccAWSMqBroker_allFieldsCustomVpc
=== CONT  TestAccAWSMqBroker_allFieldsDefaultVpc
=== CONT  TestAccAWSMqBroker_updateTags
=== CONT  TestAccAWSMqBroker_updateUsers
--- PASS: TestAccAWSMqBroker_basic (985.07s)
--- PASS: TestAccAWSMqBroker_updateUsers (1389.87s)
--- PASS: TestAccAWSMqBroker_updateTags (1523.68s)
--- PASS: TestAccAWSMqBroker_allFieldsDefaultVpc (2086.34s)
--- PASS: TestAccAWSMqBroker_allFieldsCustomVpc (2109.03s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	2109.099s
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSMqConfiguration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSMqConfiguration_ -timeout 120m
=== RUN   TestAccAWSMqConfiguration_basic
=== PAUSE TestAccAWSMqConfiguration_basic
=== RUN   TestAccAWSMqConfiguration_withData
=== PAUSE TestAccAWSMqConfiguration_withData
=== RUN   TestAccAWSMqConfiguration_updateTags
=== PAUSE TestAccAWSMqConfiguration_updateTags
=== CONT  TestAccAWSMqConfiguration_basic
=== CONT  TestAccAWSMqConfiguration_updateTags
=== CONT  TestAccAWSMqConfiguration_withData
--- PASS: TestAccAWSMqConfiguration_withData (24.75s)
--- PASS: TestAccAWSMqConfiguration_basic (38.48s)
--- PASS: TestAccAWSMqConfiguration_updateTags (52.26s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	52.318s

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. service/mq Issues and PRs that pertain to the mq service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Jan 17, 2019
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 25, 2019
@bflad bflad added this to the v1.57.0 milestone Jan 25, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, @kterada0509, with one minor thing which will get fixed on merge. Thanks! 🚀

Output from acceptance testing:

--- PASS: TestAccDataSourceAWSMqBroker_basic (1339.84s)

--- PASS: TestAccAWSMqBroker_basic (1006.13s)
--- PASS: TestAccAWSMqBroker_updateUsers (1418.45s)
--- PASS: TestAccAWSMqBroker_updateTags (1462.92s)
--- PASS: TestAccAWSMqBroker_allFieldsDefaultVpc (2044.39s)
--- PASS: TestAccAWSMqBroker_allFieldsCustomVpc (2374.81s)

--- PASS: TestAccAWSMqConfiguration_withData (8.02s)
--- PASS: TestAccAWSMqConfiguration_basic (13.80s)
--- PASS: TestAccAWSMqConfiguration_updateTags (17.49s)

return err
}

return getTagsMQ(conn, d, aws.StringValue(out.BrokerArn))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resourceAwsMqBrokerRead is also called by dataSourceAwsmQBrokerRead, so a schema addition for tags in the data source is also necessary:

--- FAIL: TestAccDataSourceAWSMqBroker_basic (874.64s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
          * data.aws_mq_broker.by_id: data.aws_mq_broker.by_id: Invalid address to set: []string{"tags"}

@bflad bflad merged commit 93807df into hashicorp:master Jan 26, 2019
bflad added a commit that referenced this pull request Jan 26, 2019
@bflad
Copy link
Contributor

bflad commented Jan 26, 2019

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

@teraken0509 teraken0509 deleted the feature/add-tags-for-aws-mq-resources branch March 5, 2020 14:05
@ghost
Copy link

ghost commented Mar 5, 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 Mar 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/mq Issues and PRs that pertain to the mq service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Amazon MQ tagging
2 participants