Skip to content

Conversation

@tarunb12
Copy link

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

None

Description

This change adds support for wildcard recipe versions in aws_imagebuilder_image_pipeline, which is now supported as part of a recent EC2 Image Builder release: EC2 Image Builder now supports auto-versioning and enhances Infrastructure as Code experience.

Additionally, now that x's are supported in recipe version inputs (indicating to increment off the latest matching version), updated aws_imagebuilder_image_recipe and aws_imagebuilder_container_recipe to suppress diff for matching wildcard version inputs (i.e drift between 1.x.0 (unresolved version input) and 1.2.0 (resolved version) is suppressed, but drift between 1.2.3 and 1.0.0 is not suppressed and maintains existing behavior)

Relations

Closes #45285

References

EC2 Image Builder now supports auto-versioning and enhances Infrastructure as Code experience

CreateContainerRecipe version pattern

CreateImageRecipe version pattern

CreateImagePipeline recipe ARN pattern

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccImageBuilder.*\(?i\)wildcardVersion' PKG=imagebuilder ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_imagebuilder-wildcard-recipe-arn 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/imagebuilder/... -v -count 1 -parallel 3  -run=TestAccImageBuilder.*\(?i\)wildcardVersion -timeout 360m -vet=off
2025/11/26 22:00:27 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/26 22:00:27 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccImageBuilderContainerRecipe_wildcardVersion
=== PAUSE TestAccImageBuilderContainerRecipe_wildcardVersion
=== RUN   TestAccImageBuilderImagePipeline_imageRecipeWildcardVersion_partial
=== PAUSE TestAccImageBuilderImagePipeline_imageRecipeWildcardVersion_partial
=== RUN   TestAccImageBuilderImagePipeline_imageRecipeWildcardVersion_full
=== PAUSE TestAccImageBuilderImagePipeline_imageRecipeWildcardVersion_full
=== RUN   TestAccImageBuilderImagePipeline_containerRecipeWildcardVersion_partial
=== PAUSE TestAccImageBuilderImagePipeline_containerRecipeWildcardVersion_partial
=== RUN   TestAccImageBuilderImagePipeline_containerRecipeWildcardVersion_full
=== PAUSE TestAccImageBuilderImagePipeline_containerRecipeWildcardVersion_full
=== RUN   TestAccImageBuilderImageRecipe_wildcardVersion
=== PAUSE TestAccImageBuilderImageRecipe_wildcardVersion
=== CONT  TestAccImageBuilderContainerRecipe_wildcardVersion
=== CONT  TestAccImageBuilderImagePipeline_containerRecipeWildcardVersion_partial
=== CONT  TestAccImageBuilderImageRecipe_wildcardVersion
--- PASS: TestAccImageBuilderImageRecipe_wildcardVersion (26.60s)
=== CONT  TestAccImageBuilderImagePipeline_containerRecipeWildcardVersion_full
--- PASS: TestAccImageBuilderContainerRecipe_wildcardVersion (28.36s)
=== CONT  TestAccImageBuilderImagePipeline_imageRecipeWildcardVersion_full
--- PASS: TestAccImageBuilderImagePipeline_containerRecipeWildcardVersion_partial (37.67s)
=== CONT  TestAccImageBuilderImagePipeline_imageRecipeWildcardVersion_partial
--- PASS: TestAccImageBuilderImagePipeline_containerRecipeWildcardVersion_full (32.81s)
--- PASS: TestAccImageBuilderImagePipeline_imageRecipeWildcardVersion_full (34.18s)
--- PASS: TestAccImageBuilderImagePipeline_imageRecipeWildcardVersion_partial (33.27s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/imagebuilder       71.127s

@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • 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 needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/imagebuilder Issues and PRs that pertain to the imagebuilder service. size/XL Managed by automation to categorize the size of a PR. labels Nov 26, 2025
@tarunb12 tarunb12 force-pushed the f-aws_imagebuilder-wildcard-recipe-arn branch from a450b66 to e60dcd5 Compare November 26, 2025 22:11
@tarunb12 tarunb12 changed the title feat(imagebuilder): support wildcard recipe ARN input in image pipelines [WIP] feat(imagebuilder): support wildcard recipe ARN input in image pipelines Nov 26, 2025
@tarunb12 tarunb12 force-pushed the f-aws_imagebuilder-wildcard-recipe-arn branch from e60dcd5 to b7f3317 Compare November 26, 2025 23:13
@tarunb12 tarunb12 changed the title [WIP] feat(imagebuilder): support wildcard recipe ARN input in image pipelines feat(imagebuilder): support wildcard recipe ARN input in image pipelines Nov 26, 2025
@tarunb12 tarunb12 marked this pull request as ready for review November 26, 2025 23:23
@tarunb12 tarunb12 requested a review from a team as a code owner November 26, 2025 23:24
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. needs-triage Waiting for first response or review from a maintainer. service/imagebuilder Issues and PRs that pertain to the imagebuilder 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.

Support wildcard recipe ARNs in EC2 Image Builder image pipelines

1 participant