У меня есть два репозитория terraform
1) инфра-клиент 2) global-infra - модуль-источник
план terraform -var-file = environment / staging / variables.tfvars - input = false
infra
- iam_group.tf
- variable.tf
- variable.tfvars
module "company_iam_groups" {
source = "git@github.com:<company>/global-terraform-modules.git/ /iam"
df_names = "${var.names}"
}
variable "names" {
type= "list"
description= "group name"
}
names = ["x-service", "x-client"]
global-terraform-modules
- iam
- main.tf
- variables.tf
main.tf
resource "aws_iam_group" "df-groups" {
count = "${length(var.df_names)}"
name = "${var.df_names[count.index]}"
}
variables.tf
variable "df_names" {
type = "list"
description = "group names"
}
, получая ошибку ниже
Error: Unsupported argument
on iam_group.tf line 3, in module "df_iam_groups":
3: df_names = "${var.names}"
An argument named "df_names" is not expected here.```