}variable"user_information"{type= object({name=stringaddress=string})default= { name ="llj"address ="xa"} }variable"l"{type= list(any)default= [ { name ="llj"age =20} ] }variable"instance_types"{type= map(any)default= {"dev"=11"prod"="sw"} }terraformapply...
I am trying to write a clear documentation/description of my terraform modules. According to Hashicorp's doc, the description attribute will permit that, but I cannot find a way to describe an object type variable in details.Here's more or less I want to do :...
Terraform中输入变量 variable是Terraform重要的配置文件类型之一,通过对变量的集中管理,用户可以在资源文件中直接引用变量名进行赋值。首先需要先定义(声明)变量,放到一个.tf文件中,如: 创建variable.tf文件,配置参数的默认值 variable "access_key" {}variable "secret_key" {}variable "region" { default = "us-...
api_object store_id = data.dominos_store.store.store_id item_codes = data.dominos_menu_item.item.matches[*].code } Our variables.tf File variable "first_name" { type = string description = "Customer's first name" } variable "last_name" { type = string description = "Customer's ...
在terraform apply中,直接设置变量值会覆盖掉variable.tf中设置的默认值 2 从文件导入 为永久性存储一个变量的值,可以将其放在文件中保存。Terraform会自动加载当前目录下扩展名为.tfvars和.auto.tfvars的文件来填充定义的变量。如果以其他格式存放,可以使用-var-file选项来手动指定需要加载的变量值文件。这些文件使用Te...
Current Terraform Version Terraform v0.12.0-alpha4 (2c36829d3265661d8edbd5014de8090ea7e2a076) Proposal I like the object variable type and it would be nice to be able to define optional arguments which can carry null value too, to use: v...
Terraform then has 2 structural types: object and tuple. However, these are not really single types. They are catch-all labels for values that are themselves combination of other values. (This will become a bit clearer after we definemapsand contrast them withobjects) ...
variable "cluster_addons" { type = list(object({ name = string config = string })) default = [ { "name" = "terway-eniip", "config" = "", }, { "name" = "logtail-ds", "config" = "{\"IngressDashboardEnabled\":\"true\"}", }, { "name" = "nginx-i...
variable"cluster_addons"{ type = list(object({ name = string config = map(string) })) default = [# If use terway network, must specify addons with `terway-eniip` and param `pod_vswitch_ids`{"name"="terway-eniip","config"= {}, }, {"name"="csi-plugin","config"= {}, }, ...
variable "image_id" { type = string } 语法: expressions functions settings Resource: 定义资源的最小单位 Each resource is associated with a single resource type, which determines the kind of infrastructure object it manages and what arguments and other attributes the resource supports. ...