From 9bff1140ba470fc7881d4a6ecca9eef77f5ae2f3 Mon Sep 17 00:00:00 2001 From: Charles Treatman Date: Wed, 2 Oct 2024 11:56:23 -0500 Subject: [PATCH] attempt to allow tf example conversion to fail --- scripts/generate_examples.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate_examples.sh b/scripts/generate_examples.sh index aaac32d1..90145c66 100755 --- a/scripts/generate_examples.sh +++ b/scripts/generate_examples.sh @@ -114,7 +114,7 @@ generate_pulumi_yaml() { # Generate Pulumi template echo -e "\033[0;34m CONVERTING $normalized_path" >&2 - .pulumi/bin/pulumi convert --cwd "$resource_dir" --from terraform --language yaml --out $resource_dir --generate-only "${tf_files[0]}" + .pulumi/bin/pulumi convert --cwd "$resource_dir" --from terraform --language yaml --out $resource_dir --generate-only "${tf_files[0]}" || true sed -i.bak $'1i\\\n# WARNING: This is an autogenerated file - manual changes will be overwritten if not made via ./scripts/generate_examples.sh\n' "$resource_dir/Pulumi.yaml" rm "$tf_destination_file" "$resource_dir"/*.bak @@ -166,7 +166,7 @@ generate_pulumi_yaml() { # Execute the Terraform to YAML conversion echo -e "\033[0;34m CONVERTING $normalized_path" >&2 - .pulumi/bin/pulumi convert --cwd "$resource_dir" --from terraform --language yaml --out $resource_dir --generate-only $tf_file + .pulumi/bin/pulumi convert --cwd "$resource_dir" --from terraform --language yaml --out $resource_dir --generate-only $tf_file || true sed -i.bak $'1i\\\n# WARNING: This is an autogenerated file - manual changes will be overwritten if not made via ./scripts/generate_examples.sh\n' "$resource_dir/Pulumi.yaml" rm "$tf_destination_file" "$resource_dir"/*.bak