aws_s3_bucket_policy.b: Error putting S3 policy: MalformedPolicy: Action does not apply to any resource(s) in statement
policy didn't work when in main.tf
Solutions:
I think the examples are fairly straight-forward in the docs; however, it gets very confusing very quickly. There's not much preparation for the full possibilities of Terraform, and it's confusing as hell to try and navigate some of the errors I encountered.
I've made some progress on said errors:
Updated the resource path within the policy to arn:aws:s3:::tbw-kvm-guest-images/*
I had go back and recreate a new policy for the bucket and the user permissions. Once that was nailed down, was able to get terraform apply to run successfully.
Pulled out the policy code and put in its own file policy.json
Where I left off yesterday:
destroy-with-approval
step to make thedestroy
step automated after the image is created and sent to s3.Daily To-Do List:
Use Terraform in the existing repo to provision an S3 bucket and to manage the bucket's policy.
terraform import
Investigate the possibility of using Terraform to manage the User that is specific to this S3 bucket.
Attach repo to TFE SaaS.
Issues/Questions:
Going through the learn.hashicorp documentation on Terraform to get my grounding.
So many errors.
aws_s3_bucket_policy.b: Error putting S3 policy: MalformedPolicy: Action does not apply to any resource(s) in statement
main.tf
Solutions:
I think the examples are fairly straight-forward in the docs; however, it gets very confusing very quickly. There's not much preparation for the full possibilities of Terraform, and it's confusing as hell to try and navigate some of the errors I encountered.
I've made some progress on said errors:
resource
path within the policy toarn:aws:s3:::tbw-kvm-guest-images/*
terraform apply
to run successfully.policy.json