We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using terrafmt diff -f with the following configuration snippet:
terrafmt diff -f
return fmt.Sprintf(` data "aws_caller_identity" "current" {} resource "aws_signer_signing_profile" "test" { platform_id = "AWSLambda-SHA384-ECDSA" name = replace(%[1]q, "-", "_") } # ... `, rName) }
An error is returned because the string is not quoted properly during format verb handling (note: replace(TFFMTKTBRACKETPERCENT[1]q, \"-\", \"_\")):
replace(TFFMTKTBRACKETPERCENT[1]q, \"-\", \"_\")
time="2020-11-24 18:23:42" level=error msg="block 1 @ ./aws/data_source_aws_signer_signing_job_test.go:34 failed to process with: failed to parse hcl: ./aws/data_source_aws_signer_signing_job_test.go:5,49-50: Missing argument separator; A comma is required to separate each function argument from the next.\ndata \"aws_caller_identity\" \"current\" {}\n\nresource \"aws_signer_signing_profile\" \"test\" {\n platform_id = \"AWSLambda-SHA384-ECDSA\"\n name = replace(TFFMTKTBRACKETPERCENT[1]q, \"-\", \"_\")\n}\n\nresource \"aws_s3_bucket\" \"source\" {\n bucket = \"%[1]s-source\"\n\n versioning {\n enabled = true\n }\n\n force_destroy = true\n}\n\nresource \"aws_s3_bucket\" \"destination\" {\n bucket = \"%[1]s-destination\"\n force_destroy = true\n}\n\nresource \"aws_s3_bucket_object\" \"source\" {\n bucket = aws_s3_bucket.source.bucket\n key = \"lambdatest.zip\"\n source = \"test-fixtures/lambdatest.zip\"\n}\n\nresource \"aws_signer_signing_job\" \"test\" {\n profile_name = aws_signer_signing_profile.test.name\n\n source {\n s3 {\n bucket = aws_s3_bucket_object.source.bucket\n key = aws_s3_bucket_object.source.key\n version = aws_s3_bucket_object.source.version_id\n }\n }\n\n destination {\n s3 {\n bucket = aws_s3_bucket.destination.bucket\n }\n }\n}\n\ndata \"aws_signer_signing_job\" \"test\" {\n job_id = aws_signer_signing_job.test.job_id\n}\n"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
When using
terrafmt diff -f
with the following configuration snippet:An error is returned because the string is not quoted properly during format verb handling (note:
replace(TFFMTKTBRACKETPERCENT[1]q, \"-\", \"_\")
):The text was updated successfully, but these errors were encountered: