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

Adds support for invoking Image Builder pipelines directly when creating aws_imagebuilder_image resources through a new image_pipeline_execution_settings configuration block.

This enhancement provides an alternative method for creating images by triggering an existing image pipeline execution, rather than requiring users to specify individual recipe and infrastructure configurations. When image_pipeline_execution_settings is used, the resource calls the StartImagePipelineExecution API to invoke the pipeline and create the image.

Key changes:

  • Added image_pipeline_execution_settings configuration block to aws_imagebuilder_image resource
    • Contains image_pipeline_arn parameter to reference the pipeline to invoke
  • Modified resource creation logic to use StartImagePipelineExecution API when pipeline execution settings are provided
  • Made infrastructure_configuration_arn optional (only required for recipe-based creation)
  • Added mutual exclusivity validation between pipeline execution settings and recipe-based parameters
  • Updated documentation with examples showing both creation methods

Usage example:

resource "aws_imagebuilder_image_pipeline" "example" {
  image_recipe_arn                 = aws_imagebuilder_image_recipe.example.arn
  infrastructure_configuration_arn = aws_imagebuilder_infrastructure_configuration.example.arn
  name                             = "example"
}

resource "aws_imagebuilder_image" "example" {
  image_pipeline_execution_settings {
    image_pipeline_arn = aws_imagebuilder_image_pipeline.example.arn
  }

  tags = {
    Name = "example"
  }
}

Relations

Closes #33212

References

Output from Acceptance Testing

% make testacc TESTS=TestAccImageBuilderImage_pipelineExecutionSettings PKG=imagebuilder                                    
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_imagebuilder_image-start-pipeline 🌿...
TF_ACC=1 go1.24.11 test ./internal/service/imagebuilder/... -v -count 1 -parallel 20 -run='TestAccImageBuilderImage_pipelineExecutionSettings'  -timeout 360m -vet=off
2025/12/10 22:48:14 Creating Terraform AWS Provider (SDKv2-style)...
2025/12/10 22:48:14 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccImageBuilderImage_pipelineExecutionSettings
=== PAUSE TestAccImageBuilderImage_pipelineExecutionSettings
=== RUN   TestAccImageBuilderImage_pipelineExecutionSettings_tags
=== PAUSE TestAccImageBuilderImage_pipelineExecutionSettings_tags
=== RUN   TestAccImageBuilderImage_pipelineExecutionSettings_disappears
=== PAUSE TestAccImageBuilderImage_pipelineExecutionSettings_disappears
=== CONT  TestAccImageBuilderImage_pipelineExecutionSettings
=== CONT  TestAccImageBuilderImage_pipelineExecutionSettings_disappears
=== CONT  TestAccImageBuilderImage_pipelineExecutionSettings_tags
--- PASS: TestAccImageBuilderImage_pipelineExecutionSettings_disappears (783.18s)
--- PASS: TestAccImageBuilderImage_pipelineExecutionSettings (911.17s)
--- PASS: TestAccImageBuilderImage_pipelineExecutionSettings_tags (1081.31s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/imagebuilder       1081.521s

@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 Dec 10, 2025
@tarunb12 tarunb12 force-pushed the f-aws_imagebuilder_image-start-pipeline branch from 1832577 to 29a61f4 Compare December 10, 2025 23:09
@tarunb12 tarunb12 force-pushed the f-aws_imagebuilder_image-start-pipeline branch from 29a61f4 to 8f420f5 Compare December 10, 2025 23:16
@tarunb12 tarunb12 marked this pull request as ready for review December 10, 2025 23:18
@tarunb12 tarunb12 requested a review from a team as a code owner December 10, 2025 23:18
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.

[New Resource]: aws_imagebuilder_image_pipeline_execution

1 participant