有没有办法获取 terraform 提供者的属性并将其存储为局部变量?
Is there a way to get terraform provider's attribute and store it as a local variable?
我在最顶层模块中定义了一个提供程序,有没有办法在子模块中访问它的属性?
一个例子:
最顶层模块:
provider "google" {
project = "foo"
}
module "child" {
source = "./child"
}
子模块:
locals {
foo = google.project // this won't work (probably because it clashes with alias access syntax)
}
我在最顶层模块中定义了一个提供程序,有没有办法在子模块中访问它的属性?
一个例子:
最顶层模块:
provider "google" {
project = "foo"
}
module "child" {
source = "./child"
}
子模块:
locals {
foo = google.project // this won't work (probably because it clashes with alias access syntax)
}