terraform error of unsupported argument when running TF plan

1.5k views Asked by At

I am getting this error when running terraform plan and it seems to be repeating for like 4-5 arguments.

Error: Unsupported argument

  on ec2_asg.tf line 56, in module "ec2_asg":
  56:   addtional_ssm_bootstrap_step_count     = var.addtional_ssm_bootstrap_step_count

An argument named "addtional_ssm_bootstrap_step_count" is not expected here.
Did you mean "additional_ssm_bootstrap_step_count"?


Error: Unsupported argument

  on ec2_asg.tf line 19, in module "ec2_asg":
  19:   encrypt_ebs_volume                     = var.encrypt_ebs_volume

An argument named "encrypt_ebs_volume" is not expected here.

How can I fix this?

This is the code in full:

module "ec2_asg" {
  source = "github.com/****"

  resource_name       = var.resource_name_bi
  environment         = var.environment
  key_pair            = var.key_pair_internal
  ec2_os              = var.ec2_os_bi
  image_id            = var.image_id_bi
  instance_type       = var.instance_type_bi
  asg_count           = var.asg_count_bi
  scaling_min         = var.scaling_min_bi
  scaling_max         = var.scaling_max_bi
  subnets             = [module.vpc.private_subnets]
  security_group_list = [aws_security_group.bi_asg.id]

  primary_ebs_volume_size                = var.primary_ebs_volume_size_bi
  primary_ebs_volume_type                = var.primary_ebs_volume_type_bi
  primary_ebs_volume_iops                = var.primary_ebs_volume_iops_bi
  encrypt_ebs_volume                     = var.encrypt_ebs_volume_bi
  secondary_ebs_volume_size              = var.secondary_ebs_volume_size_bi
  secondary_ebs_volume_type              = var.secondary_ebs_volume_type_bi
  secondary_ebs_volume_iops              = var.secondary_ebs_volume_iops_bi
1

There are 1 answers

0
Montgomery Watts On

I recommend that you look at the source code of the module you import to figure out what variables need to be passed. It's convention to place these in a variables.tf file, which will have descriptions of their use.