gpt4 book ai didi

amazon-web-services - 地形错误 : Invalid value for module argument

转载 作者:行者123 更新时间:2023-12-03 08:24:34 25 4
gpt4 key购买 nike

我在 tf 计划中收到此错误:

Error: Invalid value for module argument

on ec2_asg.tf line 13, in module "ec2_asg":
13: subnets = [module.vpc.private_subnets]

The given value is not suitable for child module variable "subnets" defined at
.terraform/modules/ec2_asg/variables.tf:388,1-19: element 0: string required.
这是模块中的变量:
variable "subnets" {
description = "List of subnets for Application. e.g. ['subnet-8da92df7', 'subnet-9e5dc5f6', 'subnet-497eaf33']"
type = list(string)
}
这是在 .tf 文件中:
  ......
......
scaling_max = var.scaling_max_bi
subnets = [module.vpc.private_subnets]
security_groups = [aws_security_group.id]
有人可以帮我解决这个问题吗?

最佳答案

根据评论。
解决方案是改变:

subnets             = [module.vpc.private_subnets]
进入
subnets             = module.vpc.private_subnets

关于amazon-web-services - 地形错误 : Invalid value for module argument,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64382320/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com