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

Issue #6054 Add name_prefix attribute to aws_secretsmanager_secret #6277

Merged
merged 3 commits into from
Oct 26, 2018

Conversation

saravanan30erd
Copy link
Contributor

Fixes #6054

Changes proposed in this pull request:

  • Change 1
    added name_prefix attribute to aws_secretsmanager_secret
  • Change 2
    added the validation func for attr name and name_prefix.
    Output from acceptance testing:
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsSecretsManagerSecret_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsSecretsManagerSecret_ -timeout 120m
=== RUN   TestAccAwsSecretsManagerSecret_Basic
=== PAUSE TestAccAwsSecretsManagerSecret_Basic
=== RUN   TestAccAwsSecretsManagerSecret_withNamePrefix
=== PAUSE TestAccAwsSecretsManagerSecret_withNamePrefix
=== RUN   TestAccAwsSecretsManagerSecret_Description
=== PAUSE TestAccAwsSecretsManagerSecret_Description
=== RUN   TestAccAwsSecretsManagerSecret_KmsKeyID
=== PAUSE TestAccAwsSecretsManagerSecret_KmsKeyID
=== RUN   TestAccAwsSecretsManagerSecret_RecoveryWindowInDays_Recreate
=== PAUSE TestAccAwsSecretsManagerSecret_RecoveryWindowInDays_Recreate
=== RUN   TestAccAwsSecretsManagerSecret_RotationLambdaARN
=== PAUSE TestAccAwsSecretsManagerSecret_RotationLambdaARN
=== RUN   TestAccAwsSecretsManagerSecret_RotationRules
=== PAUSE TestAccAwsSecretsManagerSecret_RotationRules
=== RUN   TestAccAwsSecretsManagerSecret_Tags
=== PAUSE TestAccAwsSecretsManagerSecret_Tags
=== RUN   TestAccAwsSecretsManagerSecret_policy
=== PAUSE TestAccAwsSecretsManagerSecret_policy
=== CONT  TestAccAwsSecretsManagerSecret_Basic
=== CONT  TestAccAwsSecretsManagerSecret_RotationLambdaARN
=== CONT  TestAccAwsSecretsManagerSecret_policy
=== CONT  TestAccAwsSecretsManagerSecret_KmsKeyID
=== CONT  TestAccAwsSecretsManagerSecret_Tags
=== CONT  TestAccAwsSecretsManagerSecret_RecoveryWindowInDays_Recreate
=== CONT  TestAccAwsSecretsManagerSecret_Description
=== CONT  TestAccAwsSecretsManagerSecret_withNamePrefix
=== CONT  TestAccAwsSecretsManagerSecret_RotationRules
--- PASS: TestAccAwsSecretsManagerSecret_policy (33.37s)
--- PASS: TestAccAwsSecretsManagerSecret_withNamePrefix (37.74s)
--- PASS: TestAccAwsSecretsManagerSecret_Basic (37.85s)
--- PASS: TestAccAwsSecretsManagerSecret_Description (61.29s)
--- PASS: TestAccAwsSecretsManagerSecret_RecoveryWindowInDays_Recreate (68.84s)
--- PASS: TestAccAwsSecretsManagerSecret_RotationLambdaARN (107.49s)
--- PASS: TestAccAwsSecretsManagerSecret_RotationRules (107.53s)
--- PASS: TestAccAwsSecretsManagerSecret_Tags (112.61s)
--- PASS: TestAccAwsSecretsManagerSecret_KmsKeyID (120.23s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	120.271s
...

@ghost ghost added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/secretsmanager Issues and PRs that pertain to the secretsmanager service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 26, 2018
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.

This is looking pretty good -- I think it just needs to be rebased due to merging the other validation function PR and adding ValidateFunc to the attributes 😄

aws/validators.go Show resolved Hide resolved
@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Oct 26, 2018
@saravanan30erd
Copy link
Contributor Author

saravanan30erd commented Oct 26, 2018

@bflad changes done 👍

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsSecretsManagerSecret_withNamePrefix'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsSecretsManagerSecret_withNamePrefix -timeout 120m
=== RUN TestAccAwsSecretsManagerSecret_withNamePrefix
=== PAUSE TestAccAwsSecretsManagerSecret_withNamePrefix
=== CONT TestAccAwsSecretsManagerSecret_withNamePrefix
--- PASS: TestAccAwsSecretsManagerSecret_withNamePrefix (36.27s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 36.313s

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed waiting-response Maintainers are waiting on response from community or contributor. labels Oct 26, 2018
@bflad bflad added this to the v1.42.0 milestone Oct 26, 2018
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.

LGTM, thanks @saravanan30erd! 🚀

9 tests passed (all tests)
--- PASS: TestAccAwsSecretsManagerSecret_policy (4.54s)
--- PASS: TestAccAwsSecretsManagerSecret_Basic (4.98s)
--- PASS: TestAccAwsSecretsManagerSecret_withNamePrefix (5.00s)
--- PASS: TestAccAwsSecretsManagerSecret_Description (7.44s)
--- PASS: TestAccAwsSecretsManagerSecret_Tags (13.03s)
--- PASS: TestAccAwsSecretsManagerSecret_RecoveryWindowInDays_Recreate (22.96s)
--- PASS: TestAccAwsSecretsManagerSecret_RotationRules (26.98s)
--- PASS: TestAccAwsSecretsManagerSecret_RotationLambdaARN (27.00s)
--- PASS: TestAccAwsSecretsManagerSecret_KmsKeyID (27.68s)

@bflad bflad merged commit 45df614 into hashicorp:master Oct 26, 2018
bflad added a commit that referenced this pull request Oct 26, 2018
@saravanan30erd saravanan30erd deleted the issue-6054 branch October 26, 2018 22:21
@bflad
Copy link
Contributor

bflad commented Nov 1, 2018

This has been released in version 1.42.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 2, 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 2, 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/secretsmanager Issues and PRs that pertain to the secretsmanager service. size/M 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.

Add name_prefix attribute to aws_secretsmanager_secret
2 participants