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

[Enhancement]: Support for Image Builder workflows #35045

Closed
igordust opened this issue Dec 22, 2023 · 14 comments · Fixed by #37317
Closed

[Enhancement]: Support for Image Builder workflows #35045

igordust opened this issue Dec 22, 2023 · 14 comments · Fixed by #37317
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/imagebuilder Issues and PRs that pertain to the imagebuilder service.
Milestone

Comments

@igordust
Copy link

Description

AWS introduced the capability of creating and choosing the workflows for the image creation, here the announcement: https://aws.amazon.com/about-aws/whats-new/2023/12/ec2-image-builder-image-workflows/

This has some impact on existing resources and it requires the definition of a new one.

These the changes that I suppose should be done to support this feature:

  • new resource "aws_image_builder_workflow" that implement the workflow resource
  • new datasource "aws_image_builder_workflow" that can fetch arns of already existing workflows, Amazon managed and customer managed
  • alter resource aws_image_builder_pipeline: the user should have the ability to attach workflowconfigurations to the pipeline.

Affected Resource(s) and/or Data Source(s)

No response

Potential Terraform Configuration

resource "aws_image_builder_workflow" "my" {
  name = "my_workflow"
  semantic_version = "1.0.0"
  description = "My Workflow"
  change-description = "This is the first release"
  data = file("myworkflow.yaml")
  # uri = "https://repooffworkflows/flow.yml" # alternative to data
  kms_key_id = aws.kms_key.my_key.id
}

resource "aws_imagebuilder_image_pipeline" "my" {
  image_recipe_arn                 = aws_imagebuilder_image_recipe.example.arn
  infrastructure_configuration_arn = aws_imagebuilder_infrastructure_configuration.example.arn
  name                             = "my_pypeline"
  
  # adding my custom workflow
  workflow {
    on_failure = "Abort"
    parallel_group = "test"
    parameters = []
    arn = aws_image_builder_workflow.my.arn
  }
  
  # adding an amazon managed workflow
  workflow {
    on_failure = "Abort"
    parallel_group = "test"
    parameters = []
    arn = "arn:aws:imagebuilder:eu-west-1:aws:workflow/test/test-image-with-wait-for-action/1.0.0/1"
  }
}

References

For resource aws_image_builder_workflow:

For datasource aws_image_builder_workflow:

For resource aws_imagebuilder_pipeline:

Would you like to implement a fix?

None

@igordust igordust added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 22, 2023
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/imagebuilder Issues and PRs that pertain to the imagebuilder service. label Dec 22, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 22, 2023
@kamilturek kamilturek self-assigned this Dec 23, 2023
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jan 2, 2024
@bitanmallick
Copy link

Would be also great if a skip_destroy feature can be added similar to image-builder-component

@dbrazil-revealdata
Copy link

Did this work get completed, as I noticed issue is open? https://aws.amazon.com/about-aws/whats-new/2023/12/ec2-image-builder-image-workflows/ states that this new functionality is now available, however my terraform states that "Error: Unsupported block type". Thanks

@igordust
Copy link
Author

Did this work get completed, as I noticed issue is open? https://aws.amazon.com/about-aws/whats-new/2023/12/ec2-image-builder-image-workflows/ states that this new functionality is now available, however my terraform states that "Error: Unsupported block type". Thanks

The PR has been merged here: #35097 (comment) and the resource should be available starting from version 5.32.0.

@dbrazil-revealdata
Copy link

Did this work get completed, as I noticed issue is open? https://aws.amazon.com/about-aws/whats-new/2023/12/ec2-image-builder-image-workflows/ states that this new functionality is now available, however my terraform states that "Error: Unsupported block type". Thanks

The PR has been merged here: #35097 (comment) and the resource should be available starting from version 5.32.0.

I had a look and can't see any mention of the change to the pipeline to allow custom workflows. I am trying to find out when this work is likely to get completed. Not 100% on how to read all the information. Also Terraform is at 5.43, so not sure why you mention 5.32.

@kamilturek
Copy link
Collaborator

@dbrazil-revealdata aws_imagebuilder_pipeline hasn't been yet updated to support custom workflows. I'll try looking into this soon.

@dbrazil-revealdata
Copy link

Thanks. It goes hand in hand with the workflows. I need to stop the default sysprep action. If I use custom workflows, it becomes a manual step.

@thatderek
Copy link
Contributor

Howdy folks. #36953 adds much of the needed functionality to implement this. If you want to that PR a 👍 , it lays the background for this issue's resolution.

@wanaxe
Copy link

wanaxe commented Apr 30, 2024

@thatderek Why is the change for aws_imagebuilder_image, not as expected for aws_imagebuilder_image_pipeline?

We do need it to add for the latter.

@thatderek
Copy link
Contributor

@wanaxe I needed workflows for a project but only needed it for imagebuilder_image. However, much of what I drew up in flex.go could (and probably should) be used to add workflows to imagebuilder_image_pipeline. I am myself not to familiar with the pipelines aspect though so left the actual implementation of workflows in the latter to someone more familiar with it. The heavy lifting though I think is mostly done in flex.go.

@wanaxe
Copy link

wanaxe commented May 9, 2024

@kamilturek Thank you for the PR.

All, please add a 👍to #37317, if you want it for image pipeline.

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.59.0 milestone Jul 12, 2024
Copy link

This functionality has been released in v5.59.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 issue 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 similar to this, 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 Aug 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/imagebuilder Issues and PRs that pertain to the imagebuilder service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants