cloudposse / terraform-aws-ecr

Terraform Module to manage Docker Container Registries on AWS ECR
https://cloudposse.com/accelerate
Apache License 2.0
185 stars 133 forks source link

4.0.0 deprecated warning #91

Closed seanturner026 closed 2 years ago

seanturner026 commented 2 years ago

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

When upgrading to 4.0.0, aws_iam_policy_document source_json should be replaced with source_policy_documents

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#source_json

│   with module.ecr.data.aws_iam_policy_document.resource,
│   on .terraform/modules/ecr/main.tf line 138, in data "aws_iam_policy_document" "resource":
│  138:   source_json   = local.principals_readonly_access_non_empty ? join("", [data.aws_iam_policy_document.resource_readonly_access[0].json]) : join("", [data.aws_iam_policy_document.empty[0].json])
│
│ Use the attribute "source_policy_documents" instead.
│
│ (and one more similar warning elsewhere)

Expected Behavior

No deprecation warning

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to cloudposse/terraform-aws-ecr/examples/complete
  2. Run terraform plan -var 'region=us-east-1' ~3. Enter '....'~
  3. See ~error~ deprecation warning

Screenshots

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

Additional Context

Add any other context about the problem here.