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

support terraform 0.12 #28

Closed
michaelcohenunsw opened this issue Jul 11, 2019 · 2 comments · Fixed by #40
Closed

support terraform 0.12 #28

michaelcohenunsw opened this issue Jul 11, 2019 · 2 comments · Fixed by #40

Comments

@michaelcohenunsw
Copy link

terraform init --upgrade
Upgrading modules...
Downloading git::https://github.com/cloudposse/terraform-aws-cloudfront-cdn.git?ref=0.7.0 for cdn...
- cdn in .terraform/modules/cdn
Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.7 for cdn.distribution_label...
- cdn.distribution_label in .terraform/modules/cdn.distribution_label
Downloading git::https://github.com/cloudposse/terraform-aws-route53-alias.git?ref=tags/0.2.5 for cdn.dns...
- cdn.dns in .terraform/modules/cdn.dns
Downloading git::https://github.com/cloudposse/terraform-aws-log-storage.git?ref=tags/0.2.2 for cdn.logs...
- cdn.logs in .terraform/modules/cdn.logs
Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3 for cdn.logs.default_label...
- cdn.logs.default_label in .terraform/modules/cdn.logs.default_label
Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.7 for cdn.origin_label...
- cdn.origin_label in .terraform/modules/cdn.origin_label
Downloading git::https://github.com/cloudposse/terraform-aws-s3-website.git?ref=0.8.0 for website...
- website in .terraform/modules/website
Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.14.1 for website.default_label...
- website.default_label in .terraform/modules/website.default_label
Downloading git::https://github.com/cloudposse/terraform-aws-route53-alias.git?ref=tags/0.3.0 for website.dns...
- website.dns in .terraform/modules/website.dns
Downloading git::https://github.com/cloudposse/terraform-aws-s3-log-storage.git?ref=tags/0.5.0 for website.logs...
- website.logs in .terraform/modules/website.logs
Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.14.1 for website.logs.default_label...
- website.logs.default_label in .terraform/modules/website.logs.default_label

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "null" (terraform-providers/null) 2.1.2...
- Downloading plugin for provider "local" (terraform-providers/local) 1.3.0...
- Downloading plugin for provider "aws" (terraform-providers/aws) 2.18.0...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
dhcp-149-171-170-94:infrastructure hachaboob$ terraform apply

Error: Unsupported argument

  on .terraform/modules/cdn/main.tf line 46, in resource "aws_cloudfront_distribution" "default":
  46:   logging_config = {

An argument named "logging_config" is not expected here. Did you mean to
define a block of type "logging_config"?


Error: Incorrect attribute value type

  on .terraform/modules/cdn/main.tf line 52, in resource "aws_cloudfront_distribution" "default":
  52:   aliases = ["${var.aliases}"]

Inappropriate value for attribute "aliases": element 0: string required.


Error: Unsupported argument

  on .terraform/modules/cdn/main.tf line 54, in resource "aws_cloudfront_distribution" "default":
  54:   custom_error_response = ["${var.custom_error_response}"]

An argument named "custom_error_response" is not expected here. Did you mean
to define a block of type "custom_error_response"?


Error: Incorrect attribute value type

  on .terraform/modules/cdn/main.tf line 85, in resource "aws_cloudfront_distribution" "default":
  85:       headers = ["${var.forward_headers}"]

Inappropriate value for attribute "headers": element 0: string required.


Error: Incorrect attribute value type

  on .terraform/modules/cdn/main.tf line 91, in resource "aws_cloudfront_distribution" "default":
  91:         whitelisted_names = ["${var.forward_cookies_whitelisted_names}"]

Inappropriate value for attribute "whitelisted_names": element 0: string
required.


Error: Unsupported argument

  on .terraform/modules/cdn/main.tf line 101, in resource "aws_cloudfront_distribution" "default":
 101:   ordered_cache_behavior = "${var.cache_behavior}"

An argument named "ordered_cache_behavior" is not expected here. Did you mean
to define a block of type "ordered_cache_behavior"?
@geota
Copy link

geota commented Aug 14, 2019

#29 fixes this

@michaelcohenunsw
Copy link
Author

michaelcohenunsw commented Jun 16, 2020

I am trying to use master and it still does not work with TF 0.12. Can the https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn module be used instead to create a web url redirect via s3 bucket? I do not see an option to set dns_aliases_enabled = false.

`Warning: Interpolation-only expressions are deprecated

on main.tf line 10, in provider "aws":
10: region = "${var.region}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 63 more similar warnings elsewhere)

Warning: Quoted type constraints are deprecated

on .terraform/modules/cdn.distribution_label/variables.tf line 19, in variable "delimiter":
19: type = "string"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "string".

(and 29 more similar warnings elsewhere)

Error: Unsupported argument

on .terraform/modules/cdn/main.tf line 46, in resource "aws_cloudfront_distribution" "default":
46: logging_config = {

An argument named "logging_config" is not expected here. Did you mean to
define a block of type "logging_config"?

Error: Incorrect attribute value type

on .terraform/modules/cdn/main.tf line 52, in resource "aws_cloudfront_distribution" "default":
52: aliases = ["${var.aliases}"]

Inappropriate value for attribute "aliases": element 0: string required.

Error: Unsupported argument

on .terraform/modules/cdn/main.tf line 54, in resource "aws_cloudfront_distribution" "default":
54: custom_error_response = ["${var.custom_error_response}"]

An argument named "custom_error_response" is not expected here. Did you mean
to define a block of type "custom_error_response"?

Error: Incorrect attribute value type

on .terraform/modules/cdn/main.tf line 85, in resource "aws_cloudfront_distribution" "default":
85: headers = ["${var.forward_headers}"]

Inappropriate value for attribute "headers": element 0: string required.

Error: Incorrect attribute value type

on .terraform/modules/cdn/main.tf line 91, in resource "aws_cloudfront_distribution" "default":
91: whitelisted_names = ["${var.forward_cookies_whitelisted_names}"]

Inappropriate value for attribute "whitelisted_names": element 0: string
required.

Error: Unsupported argument

on .terraform/modules/cdn/main.tf line 101, in resource "aws_cloudfront_distribution" "default":
101: ordered_cache_behavior = "${var.cache_behavior}"

An argument named "ordered_cache_behavior" is not expected here. Did you mean
to define a block of type "ordered_cache_behavior"?`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants