Skip to content

Commit

Permalink
Merge pull request hashicorp#40185 from jeremychauvet/d-40057
Browse files Browse the repository at this point in the history
chore(aws_imagebuilder_image_pipeline): add replace_triggered_by
  • Loading branch information
justinretzolk authored Nov 20, 2024
2 parents 78793f9 + 4ce7e10 commit 4f0c81a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions website/docs/r/imagebuilder_image_pipeline.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Manages an Image Builder Image Pipeline.

~> **NOTE:** Starting with version `5.74.0`, lifecycle meta-argument [`replace_triggered_by`](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#replace_triggered_by) must be used in order to prevent a dependency error on destroy.

## Example Usage

```terraform
Expand All @@ -21,6 +23,42 @@ resource "aws_imagebuilder_image_pipeline" "example" {
schedule {
schedule_expression = "cron(0 0 * * ? *)"
}
lifecycle {
replace_triggered_by = [
aws_imagebuilder_image_recipe.example
]
}
}
resource "aws_imagebuilder_image_recipe" "example" {
block_device_mapping {
device_name = "/dev/xvdb"
ebs {
delete_on_termination = true
volume_size = 100
volume_type = "gp2"
}
}
component {
component_arn = aws_imagebuilder_component.example.arn
parameter {
name = "Parameter1"
value = "Value1"
}
parameter {
name = "Parameter2"
value = "Value2"
}
}
name = "example"
parent_image = "arn:${data.aws_partition.current.partition}:imagebuilder:${data.aws_region.current.name}:aws:image/amazon-linux-2-x86/x.x.x"
version = "1.0.0"
}
```

Expand Down

0 comments on commit 4f0c81a

Please sign in to comment.