我有以下.tf文件:
provider "aws" {
region = "us-east-1"
}
module "asg1"{
source = "../service/ec2"
app = ${var.app}
env = ${var.env}
...
}
module "asg2"{
source = "../service/acm"
app = ${var.app}
env = ${var.env}
...
}
module "asg3"{
source = "../service/api"
app = ${var.app}
env = ${var.env}
...
}
在每次通话中只有源发生变化,其余一切保持不变。有没有办法在一个电话中做到这一点?而不是为每个模块创建单独的代码块?