dwmkerr/terraform-aws-openshift

Trying to use

andeq4q opened this issue · 4 comments

I'm sure I'm doing something wrong but when I try to do a make infrastructure I get the following:

/aws-openshift/terraform-aws-openshift>make infrastructure

Get the modules, create the infrastructure.

terraform init && terraform get && terraform apply -auto-approve
Initializing modules...

Initializing the backend...

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

  • provider.aws: version = "~> 2.19"
  • provider.local: version = "~> 1.3"
  • provider.template: version = "~> 2.1"

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.

Error: Unsupported block type

on modules/openshift/06-nodes.tf line 10, in data "template_file" "setup-master":
10: vars {

Blocks of type "vars" are not expected here. Did you mean to define argument
"vars"? If so, use the equals sign to assign it a value.

Error: Unsupported block type

on modules/openshift/06-nodes.tf line 64, in data "template_file" "setup-node":
64: vars {

Blocks of type "vars" are not expected here. Did you mean to define argument
"vars"? If so, use the equals sign to assign it a value.

Error: Unsupported block type

on modules/openshift/07-dns.tf line 11, in resource "aws_route53_zone" "internal":
11: tags {

Blocks of type "tags" are not expected here. Did you mean to define argument
"tags"? If so, use the equals sign to assign it a value.

Error: Unsupported block type

on modules/openshift/09-inventory.tf line 5, in data "template_file" "inventory":
5: vars {

Blocks of type "vars" are not expected here. Did you mean to define argument
"vars"? If so, use the equals sign to assign it a value.

make: *** [infrastructure] Error 1

Any help would be appreciated.

OK, to attempt to reproduce I set up a clean install:

# terraform 0.12.4
terraform init && terraform get && terraform apply -auto-approve

Exactly the same issue, I am fixing it now (moving to the latest template syntax then locking the specific provider versions so that we don't get this kind of issue again).

Fixed! Just merged to master now.

Thank you very much, it worked like a charm.

Great! Glad it is sorted @andeq4q and thanks for letting me know about the issue!