rancherfederal / rke2-aws-tf

MIT License
82 stars 69 forks source link

Fix deprecated items for Terraform 1.27 #54

Closed Boojapho closed 9 months ago

Boojapho commented 2 years ago

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.

adamacosta commented 9 months ago

There are not any validation errors or warnings I can see on current master