From ed51cb41a5a3576c75357f0bd52f3593f0fbd587 Mon Sep 17 00:00:00 2001 From: Jeremy Chauvet Date: Tue, 19 Nov 2024 16:08:06 +0100 Subject: [PATCH 1/3] chore(aws_imagebuilder_image_pipeline): add lifecycle meta-argument replace_triggered_by to the documentation. --- .../imagebuilder_image_pipeline.html.markdown | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/website/docs/r/imagebuilder_image_pipeline.html.markdown b/website/docs/r/imagebuilder_image_pipeline.html.markdown index 4907a4e371a..aef74eac9c2 100644 --- a/website/docs/r/imagebuilder_image_pipeline.html.markdown +++ b/website/docs/r/imagebuilder_image_pipeline.html.markdown @@ -10,6 +10,8 @@ description: |- Manages an Image Builder Image Pipeline. +~> **NOTE:** Starting version `5.74.0`, lifecycle meta-argument `replace_triggered_by` needs to be used to prevent a dependency error on destroy. + ## Example Usage ```terraform @@ -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" } ``` From ea32f93934346fcdd28ced12abe45db36b904ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Chauvet?= Date: Tue, 19 Nov 2024 16:39:31 +0100 Subject: [PATCH 2/3] Update website/docs/r/imagebuilder_image_pipeline.html.markdown Co-authored-by: Justin Retzolk <44710313+justinretzolk@users.noreply.github.com> --- website/docs/r/imagebuilder_image_pipeline.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/imagebuilder_image_pipeline.html.markdown b/website/docs/r/imagebuilder_image_pipeline.html.markdown index aef74eac9c2..28fc084ca53 100644 --- a/website/docs/r/imagebuilder_image_pipeline.html.markdown +++ b/website/docs/r/imagebuilder_image_pipeline.html.markdown @@ -10,7 +10,7 @@ description: |- Manages an Image Builder Image Pipeline. -~> **NOTE:** Starting version `5.74.0`, lifecycle meta-argument `replace_triggered_by` needs to be used to prevent a dependency error on destroy. +~> **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 From 4ce7e104759d684fd78536ca5f8c14bbb9358675 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Wed, 20 Nov 2024 09:32:59 -0500 Subject: [PATCH 3/3] chore: fix markdownlint finding --- website/docs/r/imagebuilder_image_pipeline.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/imagebuilder_image_pipeline.html.markdown b/website/docs/r/imagebuilder_image_pipeline.html.markdown index 28fc084ca53..de461d896d3 100644 --- a/website/docs/r/imagebuilder_image_pipeline.html.markdown +++ b/website/docs/r/imagebuilder_image_pipeline.html.markdown @@ -10,7 +10,7 @@ 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. +~> **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