当objet A和object B都引用自相同的底层数据时,只要你操作object A,就会修改到object B。在 while...
variable "additional_asg_tags" { description = "A map of additional tags to add to the puppet server ASG." type = list(object({ key = string, value = string, propagate_at_launch = bool })) default = [] } Run Code Online (Sandbox Code Playgroud) 我已经尝试了所有我能想到的方法来...
{ type = list(string) default = ["cn-north-1a"] } variable "docker_ports" { type = list(object({ internal = number external = number protocol = string })) default = [{ internal = 8300 external = 8300 protocol = "tcp" }] } 自定义验证规则 我们可以使用 validation嵌套块为输入变量...
// Don't list the files containing formatting inconsistencies $ terraformfmt-list=false -diff- 显示格式更改的差异 // Display diffs of formatting changes $ terraformfmt-diff 1、force-unlock terraform force-unlock用于删除当前配置状态上的锁,并不会修改用户的基础设施。配置是否可以进入锁状态取决于后端服...
输入变量如下所示: \n variable"sample_variable"{\n type = list(object({\n name =string\n description = optional(string)\n secure = optional(bool)\n type =string\n use_default = optional(bool)\nvalue=string\n }))\n sensitive =true\n description ="A list of objects with sensitive va...
Description: "The network id of the mysql instance", Required: true, }, "vip_data": schema.ListNestedAttribute{ Description: "The vip data of the mysql instance", Computed: true, NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ ...
type = list(object({ internal = number external = number protocol = string })) default = [{ internal = 8300 external = 8300 protocol = "tcp" }] } 自定义验证规则 我们可以使用 validation嵌套块为输入变量指定自定义验证规则,该特性在 Terraform 0.13.0之后的版本支持,例如: ...
(), }, }, "network_id": schema.StringAttribute{ Description: "The network id of the mysql instance", Required: true, }, "vip_data": schema.ListNestedAttribute{ Description: "The vip data of the mysql instance", Computed: true, NestedObject: schema.NestedAttributeObject{ Attributes: map[...
variable "security_group_ids" { type = list(string) default = ["sg-13f5gejti0pvk3n6nu503***"] } variable "volumes" { type = list(object({ volume_type = string size = number delete_with_instance = bool })) default = [{ volume_type = PTSSD size = 50 delete_with_instance =...
type = list(object({ internal = number external = number protocol = string })) default = [ { internal = 8300 external = 8300 protocol = "tcp" } ] } 输出变量定义了一个模块对外返回的变量,通过output块来定义,如下: output "instance_ip_addr" { ...