Skip to content
New issue

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

_source_policy_documents_ variable being ignored #165

Closed
hudelgado opened this issue Feb 7, 2023 · 1 comment
Closed

_source_policy_documents_ variable being ignored #165

hudelgado opened this issue Feb 7, 2023 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@hudelgado
Copy link

hudelgado commented Feb 7, 2023

Describe the Bug

The source_policy_documents variable is ignored since it's referencing an undefined local.source_policy_documents variable.

Expected Behavior

Final aws_s3_bucket_policy should have the override_policy_documents.

Steps to Reproduce

data "aws_iam_policy_document" "override" {
  statement {
    sid = "SidToOverride"

    actions   = ["s3:*"]
    resources = ["*"]
  }
}

module "s3_bucket_test_source_policy_documents" {
  source  = "cloudposse/s3-bucket/aws"
  version = "0.49.0"

  name                         = "test_source_policy_documents"
  acl                          = "private"
  enabled                      = true
  versioning_enabled           = false
  allow_encrypted_uploads_only = false
  allow_ssl_requests_only      = false

  block_public_acls       = false
  block_public_policy     = false
  ignore_public_acls      = false
  restrict_public_buckets = false

  source_policy_documents = [data.aws_iam_policy_document.override.json]
}

Generated plan didn't contain the override policy document.

Additional Context

Seems to be similar with #145

@hudelgado hudelgado added the bug 🐛 An issue with the system label Feb 7, 2023
@hudelgado
Copy link
Author

the local is actually defined in a different place:
https://github.com/cloudposse/terraform-aws-s3-bucket/blob/master/variables.tf#L35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant