hashicorp / learn-terraform-cloudflare-static-website

https://learn.hashicorp.com/tutorials/terraform/cloudflare-static-website
Mozilla Public License 2.0
21 stars 19 forks source link

Terraform plan for acm-cloudfront branch gives error #6

Open sujaypillai opened 2 years ago

sujaypillai commented 2 years ago

After checkout of acm-cloudfront branch the terraform plan gives the below output -

random_pet.bucket: Creating...
random_pet.bucket: Creation complete after 0s [id=emu]
aws_acm_certificate.cert: Creating...
aws_s3_bucket.site: Creating...
aws_acm_certificate.cert: Creation complete after 9s [id=arn:aws:acm:us-east-1:123456789012:certificate/6af0684c-a0dd-4e09-83fc-05229989d9f0]
aws_acm_certificate_validation.cert: Creating...
cloudflare_record.acm: Creating...
cloudflare_record.acm: Creation complete after 1s [id=0ad81e6d9e92d0a6bbc7e9e4199a2fc1]
aws_s3_bucket.site: Still creating... [10s elapsed]
aws_s3_bucket.site: Creation complete after 19s [id=emu-backup.com]
aws_s3_bucket_acl.site: Creating...
aws_s3_bucket_policy.site: Creating...
aws_s3_bucket_website_configuration.site: Creating...
aws_acm_certificate_validation.cert: Still creating... [10s elapsed]
aws_s3_bucket_website_configuration.site: Creation complete after 3s [id=emu-backup.com]
aws_acm_certificate_validation.cert: Creation complete after 14s [id=2022-02-12 22:43:00.233 +0000 UTC]
╷
│ Warning: Value for undeclared variable
│
│ The root module does not declare a variable named "site_subdomain" but a value was found in file "terraform.tfvars". If you meant to use this value, add a "variable" block to the
│ configuration.
│
│ To silence these warnings, use TF_VAR_... environment variables to provide certain "global" settings to all configurations in your organization. To reduce the verbosity of these
│ warnings, use the -compact-warnings option.
╵
╷
│ Error: error creating S3 bucket ACL for emu-sujayopillai.com: AccessDenied: Access Denied
│       status code: 403, request id: 0VY0MWMKRS4AE40W, host id: irTDZd2Z+xMoX/Ewz/5KwEOrZ7VIxL5v4YL/69PCFpW6EAe12bpoOd3aY7eDvOsuiAelA57oDdA=
│
│   with aws_s3_bucket_acl.site,
│   on main.tf line 31, in resource "aws_s3_bucket_acl" "site":
│   31: resource "aws_s3_bucket_acl" "site" {
│
╵
╷
│ Error: Error putting S3 policy: AccessDenied: Access Denied
│       status code: 403, request id: 0VYDFXK8SNA5WJKD, host id: 3QLL8j2aJ03AbiYKPZW8BCT1BJocm/ztjRDC9yx6JoQCg2CktsHg05CoglL/ZqgWu4RjhIdmXf4=
│
│   with aws_s3_bucket_policy.site,
│   on main.tf line 37, in resource "aws_s3_bucket_policy" "site":
│   37: resource "aws_s3_bucket_policy" "site" {
│
╵
╷
│ Error: Missing required argument
│
│   with aws_cloudfront_distribution.dist,
│   on main.tf line 102, in resource "aws_cloudfront_distribution" "dist":
│  102: resource "aws_cloudfront_distribution" "dist" {
│
│ The argument "origin.0.domain_name" is required, but no definition was found.
╵