❯ terraform init
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.
Warning: Interpolation-only expressions are deprecated
on iam.tf line 3, in resource "aws_iam_role" "master":
3: assume_role_policy = "${data.aws_iam_policy_document.instance-assume-role-policy.json}"
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 237 more similar warnings elsewhere)
Warning: Quoted references are deprecated
on instances-manager.tf line 24, in resource "aws_instance" "manager":
24: depends_on = ["aws_route.priv", "null_resource.hadoop-deployment-bash", "aws_instance.jumphost"]
In this context, references are expected literally rather than in quotes.
Terraform 0.11 and earlier required quotes, but quoted references are now
deprecated and will be removed in a future version of Terraform. Remove the
quotes surrounding this reference to silence this warning.
(and 33 more similar warnings elsewhere)
Warning: Version constraints inside provider configuration blocks are deprecated
on main.tf line 6, in provider "null":
6: version = "~> 1.0"
Terraform 0.13 and earlier allowed provider version constraints inside the
provider configuration block, but that is now deprecated and will be removed
in a future version of Terraform. To silence this warning, move the provider
version constraint into the required_providers block.
(and one more similar warning elsewhere)
Warning: Quoted type constraints are deprecated
on variables.tf line 10, in variable "amis":
10: type = "map"
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 "map" and write
map(string) instead to explicitly indicate that the map elements are strings.
(and one more similar warning elsewhere)
Error: Invalid output name
on instances-jumphost.tf line 40, in output "ec2_instance.jumphost.pub":
40: output "ec2_instance.jumphost.pub" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Invalid output name
on instances-jumphost.tf line 44, in output "ec2_instance.jumphost.priv":
44: output "ec2_instance.jumphost.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Invalid output name
on instances-manager.tf line 77, in output "ec2_instance.manager.priv":
77: output "ec2_instance.manager.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Attribute redefined
on instances-master0.tf line 13, in resource "aws_instance" "master0":
13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "50", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-master0.tf:12,3-19. Each argument may be set only once.
Error: Attribute redefined
on instances-master0.tf line 14, in resource "aws_instance" "master0":
14: ebs_block_device = { "device_name" = "/dev/sdh", "volume_type" = "gp2", "volume_size" = "15", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-master0.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-master0.tf line 68, in output "ec2_instance.master0.priv":
68: output "ec2_instance.master0.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Attribute redefined
on instances-master1.tf line 13, in resource "aws_instance" "master1":
13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "50", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-master1.tf:12,3-19. Each argument may be set only once.
Error: Attribute redefined
on instances-master1.tf line 14, in resource "aws_instance" "master1":
14: ebs_block_device = { "device_name" = "/dev/sdh", "volume_type" = "gp2", "volume_size" = "15", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-master1.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-master1.tf line 68, in output "ec2_instance.master1.priv":
68: output "ec2_instance.master1.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Attribute redefined
on instances-master2.tf line 13, in resource "aws_instance" "master2":
13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "50", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-master2.tf:12,3-19. Each argument may be set only once.
Error: Attribute redefined
on instances-master2.tf line 14, in resource "aws_instance" "master2":
14: ebs_block_device = { "device_name" = "/dev/sdh", "volume_type" = "gp2", "volume_size" = "15", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-master2.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-master2.tf line 68, in output "ec2_instance.master2.priv":
68: output "ec2_instance.master2.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Attribute redefined
on instances-worker0.tf line 13, in resource "aws_instance" "worker0":
13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "100", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-worker0.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-worker0.tf line 67, in output "ec2_instance.worker0.priv":
67: output "ec2_instance.worker0.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Attribute redefined
on instances-worker1.tf line 13, in resource "aws_instance" "worker1":
13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "100", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-worker1.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-worker1.tf line 67, in output "ec2_instance.worker1.priv":
67: output "ec2_instance.worker1.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Attribute redefined
on instances-worker2.tf line 13, in resource "aws_instance" "worker2":
13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "100", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-worker2.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-worker2.tf line 67, in output "ec2_instance.worker2.priv":
67: output "ec2_instance.worker2.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
Error: Attribute redefined
on instances-worker3.tf line 13, in resource "aws_instance" "worker3":
13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "100", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at
instances-worker3.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-worker3.tf line 67, in output "ec2_instance.worker3.priv":
67: output "ec2_instance.worker3.priv" {
A name must start with a letter or underscore and may contain only letters,
digits, underscores, and dashes.
❯ terraform init 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.
Warning: Interpolation-only expressions are deprecated
on iam.tf line 3, in resource "aws_iam_role" "master": 3: assume_role_policy = "${data.aws_iam_policy_document.instance-assume-role-policy.json}"
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 237 more similar warnings elsewhere)
Warning: Quoted references are deprecated
on instances-manager.tf line 24, in resource "aws_instance" "manager": 24: depends_on = ["aws_route.priv", "null_resource.hadoop-deployment-bash", "aws_instance.jumphost"]
In this context, references are expected literally rather than in quotes. Terraform 0.11 and earlier required quotes, but quoted references are now deprecated and will be removed in a future version of Terraform. Remove the quotes surrounding this reference to silence this warning.
(and 33 more similar warnings elsewhere)
Warning: Version constraints inside provider configuration blocks are deprecated
on main.tf line 6, in provider "null": 6: version = "~> 1.0"
Terraform 0.13 and earlier allowed provider version constraints inside the provider configuration block, but that is now deprecated and will be removed in a future version of Terraform. To silence this warning, move the provider version constraint into the required_providers block.
(and one more similar warning elsewhere)
Warning: Quoted type constraints are deprecated
on variables.tf line 10, in variable "amis": 10: type = "map"
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 "map" and write map(string) instead to explicitly indicate that the map elements are strings.
(and one more similar warning elsewhere)
Error: Invalid output name
on instances-jumphost.tf line 40, in output "ec2_instance.jumphost.pub": 40: output "ec2_instance.jumphost.pub" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Invalid output name
on instances-jumphost.tf line 44, in output "ec2_instance.jumphost.priv": 44: output "ec2_instance.jumphost.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Invalid output name
on instances-manager.tf line 77, in output "ec2_instance.manager.priv": 77: output "ec2_instance.manager.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Attribute redefined
on instances-master0.tf line 13, in resource "aws_instance" "master0": 13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "50", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-master0.tf:12,3-19. Each argument may be set only once.
Error: Attribute redefined
on instances-master0.tf line 14, in resource "aws_instance" "master0": 14: ebs_block_device = { "device_name" = "/dev/sdh", "volume_type" = "gp2", "volume_size" = "15", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-master0.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-master0.tf line 68, in output "ec2_instance.master0.priv": 68: output "ec2_instance.master0.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Attribute redefined
on instances-master1.tf line 13, in resource "aws_instance" "master1": 13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "50", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-master1.tf:12,3-19. Each argument may be set only once.
Error: Attribute redefined
on instances-master1.tf line 14, in resource "aws_instance" "master1": 14: ebs_block_device = { "device_name" = "/dev/sdh", "volume_type" = "gp2", "volume_size" = "15", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-master1.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-master1.tf line 68, in output "ec2_instance.master1.priv": 68: output "ec2_instance.master1.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Attribute redefined
on instances-master2.tf line 13, in resource "aws_instance" "master2": 13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "50", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-master2.tf:12,3-19. Each argument may be set only once.
Error: Attribute redefined
on instances-master2.tf line 14, in resource "aws_instance" "master2": 14: ebs_block_device = { "device_name" = "/dev/sdh", "volume_type" = "gp2", "volume_size" = "15", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-master2.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-master2.tf line 68, in output "ec2_instance.master2.priv": 68: output "ec2_instance.master2.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Attribute redefined
on instances-worker0.tf line 13, in resource "aws_instance" "worker0": 13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "100", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-worker0.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-worker0.tf line 67, in output "ec2_instance.worker0.priv": 67: output "ec2_instance.worker0.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Attribute redefined
on instances-worker1.tf line 13, in resource "aws_instance" "worker1": 13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "100", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-worker1.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-worker1.tf line 67, in output "ec2_instance.worker1.priv": 67: output "ec2_instance.worker1.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Attribute redefined
on instances-worker2.tf line 13, in resource "aws_instance" "worker2": 13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "100", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-worker2.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-worker2.tf line 67, in output "ec2_instance.worker2.priv": 67: output "ec2_instance.worker2.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
Error: Attribute redefined
on instances-worker3.tf line 13, in resource "aws_instance" "worker3": 13: ebs_block_device = { "device_name" = "/dev/sdg", "volume_type" = "gp2", "volume_size" = "100", "delete_on_termination" = true, "encrypted" = true }
The argument "ebs_block_device" was already set at instances-worker3.tf:12,3-19. Each argument may be set only once.
Error: Invalid output name
on instances-worker3.tf line 67, in output "ec2_instance.worker3.priv": 67: output "ec2_instance.worker3.priv" {
A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.