How do I get terraform plan to show me all of the deprecation warnings?

In doing a plan I get this warning:

╷
│ Warning: Argument is deprecated
│
│   with module.test.aws_s3_bucket_object.lambda_s3_object,
│   on ../main.tf line 87, in resource "aws_s3_bucket_object" "lambda_s3_object":
│   87:   bucket   = local.deployment_bucket
│
│ Use the aws_s3_object resource instead
│
│ (and 3 more similar warnings elsewhere)

How do I get it to show me the 3 more similar warnings elsewhere?

Hi @grimm26,

If you run the validate command in JSON mode then you can see the underlying data that the UI is rendering, and thus see the full detail:

terraform validate -json

plan and validate give me a different number of warnings :slight_smile:

2 Likes

did you figure out a solution to this?

Hi @nicolaj,

I’m not the original poster but a similar answer to what I described should work for planning too: terraform plan -json replaces the human-oriented UI with a JSON stream, and that stream should include events representing the diagnostic messages, along with other events that correspond to other information that would normally be produced during the planning phase.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.