在Terraform中,可以使用for_each参数来创建遍历map值的资源,而不是key。for_each参数允许我们根据map的值动态地创建资源实例。 下面是一个示例,展示如何使用for_each参数创建遍历map值的资源: 代码语言:txt 复制 variable "my_map" { type = map(string) default = { resource1 = "value1" resource2...
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有...
Reduce map(map(map(list(string))) terraform 需要技巧,但是flatten和for循环的组合可以让你达到目的。 我已经在控制台中用Terraformv0.14.5测试过了。 首先,我定义了一个复制输入结构的变量: variable "exception_expr_rule" { type = map default = { "project" = { "user" = { sqli-stable = [ "val...
id- The resource ID in terraform of Config Map. Import Serverless App Engine (SAE) Config Map can be imported using the id, e.g. $terraform import alicloud_sae_config_map.example <id>
可以使用Terraform中的templatefile函数中的yamlencode来实现。我已将manifest yaml文件更改如下:
route_map_id- ID of the RouteMap. It is available in 1.161.0+. status- (Computed) The status of route map. Valid values: ["Creating", "Active", "Deleting"]. Import CEN RouteMap can be imported using the id, e.g. $terraform import alicloud_cen_route_map.default <cen_id>:<route...
可以使用Terraform中的templatefile函数中的yamlencode来实现。我已将manifest yaml文件更改如下:
Current Terraform Version Terraform v0.12.6dev Use-cases While I found some examples on how to produce a list of maps, I am currently failing at producing a map of maps with a nested for loop. How would you go about producing: Outputs: a...
alisdairaddedexplaineda Terraform Core team member has described the root cause of this issue in codeexperiment/module_variable_optional_attrsand removednewnew issue not yet triagedlabelsJun 27, 2022 jbardinclosed this ascompletedJun 27, 2022
s *terraform.ResourceState, c *terraform.ResourceConfig, metainterface{})(*terraform.ResourceDiff, error){// Determine the list of computed variablesvarcomputed []stringkeys, ok := flatmap.Expand(flatmap.Flatten(c.Config),"key").([]interface{})if!ok {gotoAFTER ...