Skip to content

Commit

Permalink
attempt to allow tf example conversion to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreatma committed Oct 2, 2024
1 parent d174195 commit 9bff114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/generate_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9bff114

Please sign in to comment.