Using terraform 1.27, there are 5 items flagged as deprecated.
{
"context": "output \"bucket\"",
"code": " value = aws_s3_bucket_object.token.bucket",
"detail": "The attribute \"bucket\" is deprecated. Refer to the provider documentation for details.",
"filename": "modules/statestore/outputs.tf",
"start_line": 2
}
{
"context": "resource \"aws_s3_bucket_object\" \"token\"",
"code": " bucket = aws_s3_bucket.bucket.id",
"detail": "Use the aws_s3_object resource instead",
"filename": "modules/statestore/main.tf",
"start_line": 24
}
{
"context": "resource \"aws_s3_bucket_object\" \"token\"",
"code": " key = \"token\"",
"detail": "Use the aws_s3_object resource instead",
"filename": "modules/statestore/main.tf",
"start_line": 25
}
{
"context": "resource \"random_string\" \"uid\"",
"code": " number = true",
"detail": "Use numeric instead.",
"filename": "main.tf",
"start_line": 27
}
{
"context": "output \"token\"",
"code": " bucket = aws_s3_bucket_object.token.bucket",
"detail": "The attribute \"bucket\" is deprecated. Refer to the provider documentation for details.",
"filename": "modules/statestore/outputs.tf",
"start_line": 15
}
You can use terraform validate -json | jq '.diagnostics[] | {context: .snippet.context, code: .snippet.code, detail: .detail, filename: .range.filename, start_line: .range.start.line}' to replicate the results above.
Using terraform 1.27, there are 5 items flagged as deprecated.
You can use
terraform validate -json | jq '.diagnostics[] | {context: .snippet.context, code: .snippet.code, detail: .detail, filename: .range.filename, start_line: .range.start.line}'
to replicate the results above.