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

Error: Variables not allowed #48

Open
andygearhart-unity opened this issue Jan 27, 2023 · 1 comment
Open

Error: Variables not allowed #48

andygearhart-unity opened this issue Jan 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@andygearhart-unity
Copy link

When attempting to

module "s3-static-website" {
  source                        = "cn-terraform/s3-static-website/aws"
  version                       = "1.0.3"
  name_prefix                            = "some-prefix"
  website_domain_name           = "some.url.com"
  cloudfront_enable_compression = true
  website_bucket_acl            = "public-read"
  create_acm_certificate        = true
  create_route53_hosted_zone    = true
}

I receive the error:

Error: Variables not allowed

On .tf\modules\s3-static-website\versions.tf line 7: Variables may not be used
here.

versions.tf is having issues with the configuration_aliases line:

terraform {
  required_version = ">= 0.13"
  required_providers {
    aws = {
      source                = "hashicorp/aws"
      version               = ">= 4.0"
      configuration_aliases = [aws.main, aws.acm_provider]
    }
  }
}

@jnonino jnonino added the bug Something isn't working label Jan 31, 2023
@afreisinger
Copy link

Hi !, add to version.tf

provider "aws" {
alias = "main"
region = "us-east-1"
}
and

provider "aws" {
alias = "acm_provider"
region = "us-east-2"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

3 participants