Coder Social home page Coder Social logo

Comments (5)

nitrocode avatar nitrocode commented on May 29, 2024

Looks like you're trying to create a bucket that already exists ?

Are you trying to create a separate bucket or reuse an existing bucket ?

from terraform-aws-cloudfront-s3-cdn.

Nuru avatar Nuru commented on May 29, 2024

Closing this issue as stale. If you can reproduce it with the current version of this module, and are not trying to create a bucket that already exists, please open a new issue.

from terraform-aws-cloudfront-s3-cdn.

busla avatar busla commented on May 29, 2024

Could this be re-opened?

I get the same error and can confirm that the bucket did not exist. Both origin bucket and log bucket were created at the same time.
image

Error:

│ Error: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
│ 	status code: 409, request id: <retracted>, host id: <retracted>
│
│   with module.cloudfront_elections.module.log_bucket.aws_s3_bucket.this[0],
│   on .terraform/modules/cloudfront_elections.log_bucket/main.tf line 5, in resource "aws_s3_bucket" "this":
│    5: resource "aws_s3_bucket" "this" {
data "aws_route53_zone" "this" {
  name = var.zone_name
}

# Custom module, could probably use the Cloudposse cloudfront acm feature
module "acm" {
  source      = "../../modules/acm"
  domain_name = var.zone_name
  zone_id     = data.aws_route53_zone.this.id
  providers   = {
    aws = aws.us
  }
}


module "cdn" {
  source  = "cloudposse/cloudfront-s3-cdn/aws"
  version = "0.82.2"

  namespace                 = "foo"
  stage                     = "dev"
  name                      = "bar"
  aliases                   = [var.zone_name, "*.${var.zone_name}"]
  dns_alias_enabled         = true
  parent_zone_id            = data.aws_route53_zone.this.id
  website_enabled           = true
  acm_certificate_arn       = module.acm.certificate_arn

  deployment_principal_arns = {
    "${var.runner_arn}" = [""]
  }
  depends_on = [module.acm]
}

from terraform-aws-cloudfront-s3-cdn.

busla avatar busla commented on May 29, 2024

Even though I disable logging it still get the same error.

# ...
  s3_access_logging_enabled = false
  cloudfront_access_logging_enabled = false
# ...

from terraform-aws-cloudfront-s3-cdn.

busla avatar busla commented on May 29, 2024

Ok, I am retarded.

This has nothing todo with the module, there was a resource in another file that I missed 😆

I can show myself out.

from terraform-aws-cloudfront-s3-cdn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.