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

ssm: add ephemeral aws_ssm_parameter #40313

Merged
merged 19 commits into from
Dec 4, 2024

Conversation

bschaatsbergen
Copy link
Member

@bschaatsbergen bschaatsbergen commented Nov 26, 2024

Adds a new ephemeral resource: aws_ssm_parameter.

Closes #40435.

 $ go test ./internal/service/ssm/... -v -count 1 -parallel 20 -run='TestAccSSMParameterEphemeral_' -v
2024/11/27 14:52:50 Initializing Terraform AWS Provider...
=== RUN   TestAccSSMParameterEphemeral_basic
=== PAUSE TestAccSSMParameterEphemeral_basic
=== RUN   TestAccSSMParameterEphemeral_secureString
=== PAUSE TestAccSSMParameterEphemeral_secureString
=== RUN   TestAccSSMParameterEphemeral_variable
=== PAUSE TestAccSSMParameterEphemeral_variable
=== RUN   TestAccSSMParameterEphemeral_secureStringVariable
=== PAUSE TestAccSSMParameterEphemeral_secureStringVariable
=== RUN   TestAccSSMParameterEphemeral_withDecryption
=== PAUSE TestAccSSMParameterEphemeral_withDecryption
=== RUN   TestAccSSMParameterEphemeral_withDecryptionFalse
=== PAUSE TestAccSSMParameterEphemeral_withDecryptionFalse
=== CONT  TestAccSSMParameterEphemeral_basic
=== CONT  TestAccSSMParameterEphemeral_secureStringVariable
=== CONT  TestAccSSMParameterEphemeral_withDecryptionFalse
=== CONT  TestAccSSMParameterEphemeral_withDecryption
=== CONT  TestAccSSMParameterEphemeral_variable
=== CONT  TestAccSSMParameterEphemeral_secureString
--- PASS: TestAccSSMParameterEphemeral_secureStringVariable (20.24s)
--- PASS: TestAccSSMParameterEphemeral_withDecryption (20.26s)
--- PASS: TestAccSSMParameterEphemeral_variable (20.27s)
--- PASS: TestAccSSMParameterEphemeral_basic (20.27s)
--- PASS: TestAccSSMParameterEphemeral_withDecryptionFalse (20.28s)
--- PASS: TestAccSSMParameterEphemeral_secureString (20.31s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ssm        26.110s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/ssm Issues and PRs that pertain to the ssm service. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Nov 26, 2024
Terraform does not plan for ephemeral resources, data sources,
or providers. As such, the Plugin Framework does not implement
default handlers for these objects.

To provide a consistent user experience with the `data.aws_ssm_parameter` data
source, we default the `with_decryption` attribute to `true` in its ephemeral implementation.
… when referencing unknown instances

Ephemeral resources expect all dependencies to exist beforehand.

Therefore, the ARN should be used to look the SSM parameter up with, as opening an ephemeral resource is deferred if it references an instance marked as unknown.
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. generators Relates to code generators. labels Nov 27, 2024
Signed-off-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
Signed-off-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
@bschaatsbergen bschaatsbergen marked this pull request as ready for review November 30, 2024 16:38
@bschaatsbergen bschaatsbergen requested a review from a team as a code owner November 30, 2024 16:39
@johnsonaj johnsonaj added new-ephemeral-resource Introduces a new ephemeral resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 3, 2024
@johnsonaj johnsonaj self-assigned this Dec 3, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 3, 2024
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Dec 4, 2024
Co-authored-by: Adrian Johnson <adrian.johnson@hashicorp.com>
bschaatsbergen and others added 7 commits December 4, 2024 15:15
johnsonaj
johnsonaj previously approved these changes Dec 4, 2024
Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

% make testacc TESTARGS='-run=TestAccSSMParameterEphemeral_' PKG=ssm

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ssm/... -v -count 1 -parallel 20  -run=TestAccSSMParameterEphemeral_ -timeout 360m
2024/12/04 09:28:48 Initializing Terraform AWS Provider...
--- PASS: TestAccSSMParameterEphemeral_basic (14.07s)
--- PASS: TestAccSSMParameterEphemeral_secureString (14.08s)
--- PASS: TestAccSSMParameterEphemeral_withDecryption (14.09s)
--- PASS: TestAccSSMParameterEphemeral_withDecryptionFalse (14.12s)
--- PASS: TestAccSSMParameterEphemeral_variable (14.15s)
--- PASS: TestAccSSMParameterEphemeral_secureStringVariable (14.20s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ssm	20.806s

Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

% make testacc PKG=ssm TESTS=TestAccSSMParameterEphemeral_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ssm/... -v -count 1 -parallel 20 -run='TestAccSSMParameterEphemeral_'  -timeout 360m

--- PASS: TestAccSSMParameterEphemeral_withDecryptionFalse (14.66s)
--- PASS: TestAccSSMParameterEphemeral_withDecryption (14.67s)
--- PASS: TestAccSSMParameterEphemeral_variable (14.82s)
--- PASS: TestAccSSMParameterEphemeral_basic (14.83s)
--- PASS: TestAccSSMParameterEphemeral_secureStringVariable (14.83s)
--- PASS: TestAccSSMParameterEphemeral_secureString (14.84s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ssm        21.637s

@johnsonaj
Copy link
Contributor

@bschaatsbergen thank you for the contribution! 🎉

@johnsonaj johnsonaj merged commit 42a5eed into hashicorp:main Dec 4, 2024
41 checks passed
@github-actions github-actions bot added this to the v5.81.0 milestone Dec 4, 2024
@bschaatsbergen bschaatsbergen deleted the f/ephemeral-ssm-parameter branch December 6, 2024 19:10
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 12, 2024
Copy link

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2025
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. external-maintainer Contribution from a trusted external contributor. generators Relates to code generators. new-ephemeral-resource Introduces a new ephemeral resource. service/ssm Issues and PRs that pertain to the ssm service. 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.

[New ephemeral]: aws_ssm_parameter should be available as an ephemeral source
3 participants