nicholasjackson / terraform-aws-open-faas-nomad

Example Terraform configuration to create OpenFaas on Nomad for AWS
8 stars 3 forks source link

Tf 0.12 getting multiple errors #1

Open orefalo opened 4 years ago

orefalo commented 4 years ago
Initializing modules...
Downloading nicholasjackson/open-faas-nomad/aws 0.5.2 for open-faas-nomad...
- open-faas-nomad in .terraform/modules/open-faas-nomad/nicholasjackson-terraform-aws-open-faas-nomad-69d45f1
Downloading nicholasjackson/hashicorp-suite/aws 0.2.3 for open-faas-nomad.nomad...
- open-faas-nomad.nomad in .terraform/modules/open-faas-nomad.nomad/nicholasjackson-terraform-aws-hashicorp-suite-e2e0102
- open-faas-nomad.nomad.clients in .terraform/modules/open-faas-nomad.nomad/nicholasjackson-terraform-aws-hashicorp-suite-e2e0102/suite
- open-faas-nomad.nomad.servers in .terraform/modules/open-faas-nomad.nomad/nicholasjackson-terraform-aws-hashicorp-suite-e2e0102/suite
There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.

Error: Attribute redefined

  on .terraform/modules/open-faas-nomad/nicholasjackson-terraform-aws-open-faas-nomad-69d45f1/network.tf line 4, in resource "aws_vpc" "default":
   4:   cidr_block           = "${var.vpc_cidr_block}"

The argument "cidr_block" was already set at
.terraform/modules/open-faas-nomad/nicholasjackson-terraform-aws-open-faas-nomad-69d45f1/network.tf:3,3-13.
Each argument may be set only once.

Error: Invalid argument name

  on .terraform/modules/open-faas-nomad/nicholasjackson-terraform-aws-open-faas-nomad-69d45f1/network.tf line 8, in resource "aws_vpc" "default":
   8:     "Name" = "${var.namespace}"

Argument names must not be quoted.

Error: Attribute redefined

  on .terraform/modules/open-faas-nomad/nicholasjackson-terraform-aws-open-faas-nomad-69d45f1/nomad.tf line 17, in module "nomad":
  17:   key_name       = "${aws_key_pair.nomad.id}"

The argument "key_name" was already set at
.terraform/modules/open-faas-nomad/nicholasjackson-terraform-aws-open-faas-nomad-69d45f1/nomad.tf:11,3-11.
Each argument may be set only once.

Error: Attribute redefined

  on .terraform/modules/open-faas-nomad.nomad/nicholasjackson-terraform-aws-hashicorp-suite-e2e0102/suite/instance.tf line 82, in resource "aws_autoscaling_group" "default":
  82:   tag = {

The argument "tag" was already set at
.terraform/modules/open-faas-nomad.nomad/nicholasjackson-terraform-aws-hashicorp-suite-e2e0102/suite/instance.tf:76,3-6.
Each argument may be set only once.
orefalo commented 4 years ago

Hi, just tried with 0.11 and getting errors too. different ones in fact... let me investigate. Cheers,

orefalo commented 4 years ago
- module.open-faas-nomad.nomad
  Found version 0.2.3 of nicholasjackson/hashicorp-suite/aws on registry.terraform.io
  Getting source "nicholasjackson/hashicorp-suite/aws"
- module.open-faas-nomad.nomad.servers
  Getting source "./suite"
- module.open-faas-nomad.nomad.clients
  Getting source "./suite"
Error: module "nomad": "hashiui_version" is not a valid argument

Error: module "nomad": "hashiui_enabled" is not a valid argument

Error: module "nomad": missing required argument "vault_version"

Error: module "nomad": missing required argument "consul_connect_enabled"

Error: module "nomad": missing required argument "vault_enabled"
orefalo commented 4 years ago

Fixed it by.. well using 0.11 and at the end of nomad.tf


#  hashiui_enabled = false
#  hashiui_version = ""

# get the real variables
   vault_enabled = false
   vault_version = ""

   consul_connect_enabled = false