fpco / terraform-aws-foundation

Establish a solid Foundation on AWS with these modules for Terraform
MIT License
204 stars 98 forks source link

S3 bucket policy is timing out while waiting for "s3-full-access" become "success" #267

Closed devgnx closed 4 years ago

devgnx commented 4 years ago

S3 bucket policy is timing out while waiting for s3-full-access become success. Maybe is related to: https://github.com/terraform-providers/terraform-provider-aws/issues/9414 https://github.com/terraform-providers/terraform-provider-aws/issues/9435

Steps to reproduce

ᐅ cd ./examples/gitlab-simple-ha ᐅ make generate-ssh-key ᐅ make render-tfvars ᐅ make network ᐅ make plan ᐅ make apply "tf.out"

module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Creating...
module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Still creating... [10s elapsed]
module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Still creating... [20s elapsed]
module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Still creating... [30s elapsed]
module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Still creating... [40s elapsed]
module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Still creating... [50s elapsed]
module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Still creating... [1m0s elapsed]
module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Still creating... [1m10s elapsed]
module.docker-registry-s3-storage.aws_s3_bucket_policy.s3-full-access: Still creating... [1m20s elapsed]

Error: Error putting S3 policy: timeout while waiting for state to become 'success' (timeout: 1m0s)

  on ../../modules/s3-remote-state/main.tf line 94, in resource "aws_s3_bucket_policy" "s3-full-access":
  94: resource "aws_s3_bucket_policy" "s3-full-access" {

Makefile:65: recipe for target 'apply' failed
make: *** [apply] Error 1

Version

Terraform v0.12.2 Terraform AWS Foundation branch 241-Missing-ASG-IAM-output-variables

mcgirr commented 4 years ago

@ketzacoatl is this potentially related to https://github.com/fpco/terraform-aws-foundation/issues/286?

mcgirr commented 4 years ago

I think this will be resolved when https://github.com/fpco/terraform-aws-foundation/issues/286 is resolved. I've run into something similar recently and setting the principals input on the s3-remote-state module resolved the issue for me.

mcgirr commented 4 years ago

@ketzacoatl I think this issue is good to close now that we've addressed https://github.com/fpco/terraform-aws-foundation/issues/286 with https://github.com/fpco/terraform-aws-foundation/pull/297

mcgirr commented 4 years ago

@devgnx can you please confirm if you're still encountering the same issue when using the module with the changes from https://github.com/fpco/terraform-aws-foundation/pull/297? If you provide a non-empty list of principals I believe the issue you described will go away.

mcgirr commented 4 years ago

Closing this as resolved. Please re-open if needed.

CC @ketzacoatl

ketzacoatl commented 4 years ago

Looks great, thanks Mike!