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

r/aws_apigateway_stage: add deployment_id to canary_settings #39929

Merged
merged 20 commits into from
Nov 1, 2024

Conversation

johnsonaj
Copy link
Contributor

@johnsonaj johnsonaj commented Oct 29, 2024

Description

Relations

Closes #27326.

References

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccAPIGateway_serial/Stage' PKG=apigateway

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/apigateway/... -v -count 1 -parallel 20  -run=TestAccAPIGateway_serial/Stage -timeout 360m
2024/10/30 10:29:25 Initializing Terraform AWS Provider...
--- PASS: TestAccAPIGateway_serial (3343.02s)
    --- PASS: TestAccAPIGateway_serial/Stage (3343.02s)
        --- PASS: TestAccAPIGateway_serial/Stage/WAF (57.56s)
        --- PASS: TestAccAPIGateway_serial/Stage/CanarySettings (55.22s)
        --- PASS: TestAccAPIGateway_serial/Stage/AccessLogSettings (56.80s)
        --- PASS: TestAccAPIGateway_serial/Stage/AccessLogSettings_kinesis (163.86s)
        --- PASS: TestAccAPIGateway_serial/Stage/basic (87.78s)
        --- PASS: TestAccAPIGateway_serial/Stage/tags (1164.21s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/EmptyTag_OnUpdate_Add (48.80s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_nonOverlapping (69.67s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/ComputedTag_OnCreate (32.69s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/ComputedTag_OnUpdate_Add (84.11s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/ComputedTag_OnUpdate_Replace (38.98s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/EmptyTag_OnCreate (50.00s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_emptyResourceTag (29.71s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_nullNonOverlappingResourceTag (76.54s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/IgnoreTags_Overlap_DefaultTag (43.79s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/basic (88.75s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/null (42.00s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/EmptyMap (108.80s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/EmptyTag_OnUpdate_Replace (50.22s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_overlapping (52.09s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_nullOverlappingResourceTag (58.47s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/AddOnUpdate (34.78s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_providerOnly (80.09s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_updateToProviderOnly (78.82s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_updateToResourceOnly (34.30s)
            --- PASS: TestAccAPIGateway_serial/Stage/tags/IgnoreTags_Overlap_ResourceTag (61.59s)
        --- PASS: TestAccAPIGateway_serial/Stage/disappears (22.68s)
        --- PASS: TestAccAPIGateway_serial/Stage/disappears_restAPI (61.18s)
        --- PASS: TestAccAPIGateway_serial/Stage/Cache (851.84s)
        --- PASS: TestAccAPIGateway_serial/Stage/CacheSizeCacheDisabled (821.90s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/apigateway	3349.357s
% make testacc TESTARGS='-run=TestAccAPIGatewayDeployment_' PKG=apigateway

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/apigateway/... -v -count 1 -parallel 20  -run=TestAccAPIGatewayDeployment_ -timeout 360m
2024/10/30 08:59:16 Initializing Terraform AWS Provider...
--- PASS: TestAccAPIGatewayDeployment_deploymentCanarySettings (27.26s)
--- PASS: TestAccAPIGatewayDeployment_StageName_emptyString (31.71s)
--- PASS: TestAccAPIGatewayDeployment_triggers (61.12s)
--- PASS: TestAccAPIGatewayDeployment_variables (83.95s)
--- PASS: TestAccAPIGatewayDeployment_stageName (115.56s)
--- PASS: TestAccAPIGatewayDeployment_basic (195.04s)
--- PASS: TestAccAPIGatewayDeployment_description (208.39s)
--- PASS: TestAccAPIGatewayDeployment_stageDescription (211.23s)
--- PASS: TestAccAPIGatewayDeployment_Disappears_restAPI (426.35s)
--- PASS: TestAccAPIGatewayDeployment_disappears (586.79s)
--- PASS: TestAccAPIGatewayDeployment_conflictingConnectionType (705.34s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/apigateway	739.083s

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/apigateway Issues and PRs that pertain to the apigateway service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Oct 29, 2024
@johnsonaj johnsonaj added the enhancement Requests to existing resources that expand the functionality or scope. label Oct 29, 2024
@johnsonaj johnsonaj marked this pull request as ready for review October 29, 2024 17:12
@johnsonaj johnsonaj requested a review from a team as a code owner October 29, 2024 17:12
internal/service/apigateway/stage.go Show resolved Hide resolved
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 30, 2024
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

A couple changes to make in the tests for both resources and a schema change for aws_api_gateway_stage

internal/service/apigateway/stage_test.go Outdated Show resolved Hide resolved
internal/service/apigateway/stage.go Show resolved Hide resolved
internal/service/apigateway/stage_test.go Outdated Show resolved Hide resolved
internal/service/apigateway/stage.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

One tweak to documentation.

Not a blocker, but consider adding

RequiredWith: []string{
	"stage_name",
},

to canary_settings and stage_description since neither can be set if stage_name isn't set

Also consider using resource.ParallelTest instead of resource.Test for TestAccAPIGatewayDeployment_deploymentCanarySettings

--- PASS: TestAccAPIGateway_serial (3664.84s)
--- PASS: TestAccAPIGateway_serial/Stage (3664.84s)
--- PASS: TestAccAPIGateway_serial/Stage/basic (87.04s)
--- PASS: TestAccAPIGateway_serial/Stage/disappears (40.31s)
--- PASS: TestAccAPIGateway_serial/Stage/CanarySettings (95.91s)
--- PASS: TestAccAPIGateway_serial/Stage/CacheSizeCacheDisabled (698.45s)
--- PASS: TestAccAPIGateway_serial/Stage/AccessLogSettings (92.00s)
--- PASS: TestAccAPIGateway_serial/Stage/AccessLogSettings_kinesis (110.29s)
--- PASS: TestAccAPIGateway_serial/Stage/WAF (187.21s)
--- PASS: TestAccAPIGateway_serial/Stage/tags (1515.31s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/basic (74.55s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/EmptyMap (64.66s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/EmptyTag_OnUpdate_Replace (48.39s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_emptyResourceTag (54.79s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/ComputedTag_OnUpdate_Add (145.25s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/AddOnUpdate (74.80s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/EmptyTag_OnUpdate_Add (85.71s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_overlapping (93.46s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_updateToProviderOnly (39.26s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/null (50.65s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_providerOnly (88.82s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_updateToResourceOnly (93.91s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_nullOverlappingResourceTag (23.64s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/ComputedTag_OnCreate (108.74s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/ComputedTag_OnUpdate_Replace (47.96s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/EmptyTag_OnCreate (72.77s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_nonOverlapping (149.53s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/DefaultTags_nullNonOverlappingResourceTag (64.82s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/IgnoreTags_Overlap_DefaultTag (74.98s)
--- PASS: TestAccAPIGateway_serial/Stage/tags/IgnoreTags_Overlap_ResourceTag (58.62s)
--- PASS: TestAccAPIGateway_serial/Stage/disappears_restAPI (24.84s)
--- PASS: TestAccAPIGateway_serial/Stage/Cache (813.47s)
--- PASS: TestAccAPIGatewayDeployment_deploymentCanarySettings (48.11s)
--- PASS: TestAccAPIGatewayDeployment_StageName_emptyString (31.90s)
--- PASS: TestAccAPIGatewayDeployment_description (45.88s)
--- PASS: TestAccAPIGatewayDeployment_stageName (56.65s)
--- PASS: TestAccAPIGatewayDeployment_stageDescription (130.17s)
--- PASS: TestAccAPIGatewayDeployment_conflictingConnectionType (136.15s)
--- PASS: TestAccAPIGatewayDeployment_triggers (177.67s)
--- PASS: TestAccAPIGatewayDeployment_variables (209.79s)
--- PASS: TestAccAPIGatewayDeployment_basic (259.49s)
--- PASS: TestAccAPIGatewayDeployment_Disappears_restAPI (377.61s)
--- PASS: TestAccAPIGatewayDeployment_disappears (561.81s)

website/docs/r/api_gateway_stage.html.markdown Outdated Show resolved Hide resolved
@johnsonaj johnsonaj dismissed ewbankkit’s stale review November 1, 2024 18:19

changes made that make this stale

@johnsonaj johnsonaj merged commit ef51f70 into main Nov 1, 2024
41 checks passed
@johnsonaj johnsonaj deleted the b-apigateway_stage_canary branch November 1, 2024 20:04
@github-actions github-actions bot added this to the v5.75.0 milestone Nov 1, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Nov 1, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 11, 2024
Copy link

This functionality has been released in v5.75.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/apigateway Issues and PRs that pertain to the apigateway 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.

3 participants