-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
feat: Add new aws_synthetics_runtime_verison and aws_synthetics_runtime_verisons data sources #39180
feat: Add new aws_synthetics_runtime_verison and aws_synthetics_runtime_verisons data sources #39180
Conversation
Community NoteVoting for Prioritization
For Submitters
|
1e7089a
to
c25c74f
Compare
c25c74f
to
7852bca
Compare
7852bca
to
8d6b9d5
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.
Hi @acwwat - Thanks for your submission!
As of 2023-10-20 all net-new data sources are required to use Terraform Plugin Framework. More context is available in this pinned issue and the provider contributor guide.
- Policy Change Notice: Net-new resources/data sources will be required to be based on aws-sdk-go-v2 / terraform-plugin-framework #32917
- https://hashicorp.github.io/terraform-provider-aws/terraform-plugin-development-packages/#which-plugin-version-should-i-use
Maintainers will convert Plugin-SDK based data sources as part of the review process, but if you'd like to do the conversion in the meantime we would greatly appreciate it!
OK let me give it a go later. I saw that the rest of the synthetics resources are still using the plugin SDK so I kept to that convention initially. |
8d6b9d5
to
aaa0654
Compare
```console % go test -count=1 ./internal/framework/validators/... ok github.com/hashicorp/terraform-provider-aws/internal/framework/validators 0.492s ```
…ecated This change returns a data structure more closely matching the `DescribeRuntimeVersions` API result. It also removes the `skip_deprecated` argument, as the ability to use the `latest` argument on the `aws_synthetics_runtime_version` data source eliminates much of the need to exclude deprecated versions from the result set. ```console % make testacc PKG=synthetics TESTS=TestAccSyntheticsRuntimeVersion make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.22.6 test ./internal/service/synthetics/... -v -count 1 -parallel 20 -run='TestAccSyntheticsRuntimeVersion' -timeout 360m --- PASS: TestAccSyntheticsRuntimeVersionsDataSource_basic (10.21s) --- PASS: TestAccSyntheticsRuntimeVersionDataSource_deprecatedVersion (10.21s) --- PASS: TestAccSyntheticsRuntimeVersionDataSource_basic (10.25s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/synthetics 16.489s ```
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 🎉
% make testacc PKG=synthetics TESTS=TestAccSyntheticsRuntimeVersion
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/synthetics/... -v -count 1 -parallel 20 -run='TestAccSyntheticsRuntimeVersion' -timeout 360m
--- PASS: TestAccSyntheticsRuntimeVersionsDataSource_basic (10.21s)
--- PASS: TestAccSyntheticsRuntimeVersionDataSource_deprecatedVersion (10.21s)
--- PASS: TestAccSyntheticsRuntimeVersionDataSource_basic (10.25s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/synthetics 16.489s
Thanks for your contribution, @acwwat! 👍 |
This eliminates the dependency on hardcoded runtime versions which become deprecated over time and can cause test failures. ```console % make testacc PKG=synthetics TESTS=TestAccSyntheticsCanary_ make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.22.6 test ./internal/service/synthetics/... -v -count 1 -parallel 20 -run='TestAccSyntheticsCanary_' -timeout 360m --- PASS: TestAccSyntheticsCanary_tags (94.55s) --- PASS: TestAccSyntheticsCanary_runtimeVersion (129.64s) --- PASS: TestAccSyntheticsCanary_runTracing (144.68s) --- PASS: TestAccSyntheticsCanary_startCanary (194.92s) --- PASS: TestAccSyntheticsCanary_run (216.00s) --- PASS: TestAccSyntheticsCanary_runEnvironmentVariables (219.09s) --- PASS: TestAccSyntheticsCanary_artifactEncryption (237.15s) --- PASS: TestAccSyntheticsCanary_disappears (470.10s) --- PASS: TestAccSyntheticsCanary_s3 (559.86s) --- PASS: TestAccSyntheticsCanary_StartCanary_codeChanges (586.04s) --- PASS: TestAccSyntheticsCanary_basic (606.08s) --- PASS: TestAccSyntheticsCanary_rate (678.13s) --- PASS: TestAccSyntheticsCanary_vpc (2180.95s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/synthetics 2187.415s ```
Canary resource acceptance tests after migrating to the runtime version data source: % make testacc PKG=synthetics TESTS=TestAccSyntheticsCanary_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/synthetics/... -v -count 1 -parallel 20 -run='TestAccSyntheticsCanary_' -timeout 360m
--- PASS: TestAccSyntheticsCanary_tags (94.55s)
--- PASS: TestAccSyntheticsCanary_runtimeVersion (129.64s)
--- PASS: TestAccSyntheticsCanary_runTracing (144.68s)
--- PASS: TestAccSyntheticsCanary_startCanary (194.92s)
--- PASS: TestAccSyntheticsCanary_run (216.00s)
--- PASS: TestAccSyntheticsCanary_runEnvironmentVariables (219.09s)
--- PASS: TestAccSyntheticsCanary_artifactEncryption (237.15s)
--- PASS: TestAccSyntheticsCanary_disappears (470.10s)
--- PASS: TestAccSyntheticsCanary_s3 (559.86s)
--- PASS: TestAccSyntheticsCanary_StartCanary_codeChanges (586.04s)
--- PASS: TestAccSyntheticsCanary_basic (606.08s)
--- PASS: TestAccSyntheticsCanary_rate (678.13s)
--- PASS: TestAccSyntheticsCanary_vpc (2180.95s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/synthetics 2187.415s |
This functionality has been released in v5.68.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! |
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. |
Description
This PR is to add the new
aws_synthetics_runtime_version
andaws_synthetics_runtime_versions
data sources.Relations
Closes #39165
Closes #39166
References
Referred to DescribeRuntimeVersions for specs.
Output from Acceptance Testing