resource "hauweicloud_vpc" "vpc" { for_each = { vpc_demo1 = "192.168.0.0/16" vpc_demo2 = "172.16.0.0/16" } name = each.key cidr = each.value } 在使用字符串集合类型表达时,"each.key" 等同于 "each.value",我们一般使用 each.key表示,另外
defaults.regex_replace_chars) # string_label_names are names of inputs that are strings (not list of strings) used as labels string_label_names = ["namespace", "tenant", "environment", "stage", "name"] normalized_labels = { for k in local.string_label_names : k => local.input[k...
当objet A和object B都引用自相同的底层数据时,只要你操作object A,就会修改到object B。在 while...
Terraform’sfor_eachrequires amapor aset of strings. Convert theflattenedlist to a map. for_each={for values in local.vnet_subnet :"${values.virtual_network_name}.${values.subnet_name}"=> values} Resulting Map: {"vnet1.subnet1"={virtual_network_name="vnet1",subnet_name="subnet1",addr...
For example, ifvar.listwere a list of strings, then the following expression would produce a tuple of strings with all-uppercase letters: [forsinvar.list:upper(s)] Thisforexpression iterates over each element ofvar.list, and then evaluates the expressionupper(s)withsset to each respective ...
那么kubernetes_manifest.secret资源中的lambda/闭包作用域迭代器变量(默认名称为each)将是一个list(...
// Output VPC output "vpc_id" { description = "The ID of the VPC." value = alicloud_cs_kubernetes.k8s[0].vpc_id } output "vswitch_ids" { description = "List ID of the VSwitches." value = [alicloud_cs_kubernetes.k8s.*.vswitch_ids] } output "nat_gateway_id" { value = alicl...
non_masquerade_cidrs List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. list(string) [ "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] no notification_config_topic The desired Pub/Sub topic to which notifications will be sent by GKE...
Use empty lines to separate logical groups of arguments within a block. For blocks that contain both arguments and "meta-arguments" (as defined by the Terraform language semantics), list meta-arguments first and separate them from other arguments with one blank line. Place meta-argument blocks ...
The Random provider supports the use of randomness within Terraform configurations. The provider resources can be used to generate a randomid,integer,password,pet,shuffle(random permutation of a list of strings),stringoruuid. Documentation, questions and discussions ...