基本类型:string、number、bool 复合类型:list(<TYPE>)、set(<TYPE>)、map(<TYPE>)、object({<ATTR NAME> = <TYPE>, ... })、tuple([<TYPE>, ...]) 描述 简要描述每个变量的用途。例如: variable"image_id"{ type=string description="The id of the machine image (AMI) to use for the server...
network_id"` SubnetID types.String `tfsdk:"subnet_id"` IsAuditLog types.String `tfsdk:"is_audit_log"` Status types.String `tfsdk:"status"` CTime types.String `tfsdk:"ctime"` VipData types.List `tfsdk:"vip_data"` MasterNum types.List `...
variables.tf 里一般会写上变量的声明,例如这里需要声明腾讯云的 secret id 和 secret key 变量。 variable"tencentcloud_secret_id"{type=stringdescription="Set Tencent Cloud secret id."sensitive=truenullable=false}variable"tencentcloud_secret_key"{type=stringdescription="Set Tencent Cloud secret key."sensitiv...
type = string } variable "availability_zone_names" { type = list(string) default = ["us-west-1a"] } variable "docker_ports" { type = list(object({ internal = number external = number protocol = string })) default = [ { internal = 8300 external = 8300 protocol = "tcp" } ] } ...
// Don't list the files containing formatting inconsistencies $ terraform fmt -list=false -diff- 显示格式更改的差异 // Display diffs of formatting changes $ terraform fmt -diff 1、force-unlock terraform force-unlock用于删除当前配置状态上的锁,并不会修改用户的基础设施。配置是否可以进入锁状态取决于...
description = "List master nodes of cluster." value = [alicloud_cs_kubernetes.k8s.*.master_nodes] } variables.tf 该文件包含可传递到main.tf的变量,可帮助您自定义环境。 # common variables variable "availability_zone" { description = "The available zone to launch ecs instance and other resources...
创建名为variables.tf的文件并插入下列代码: Terraform variable"resource_group_location"{ type = string default ="eastus"description ="Location of the resource group."}variable"resource_group_name_prefix"{ type = string default ="rg"description ="Prefix of the resource group name that's combined ...
我希望将允许的位置列表作为字符串列表从variables.tf文件传递到main.tf,在那里执行分配。
4.3 配置 variables.tf 文件 以下展示了 variables.tf 文件的部分内容,完整代码请参考本教程结尾附件部分: # EC2 实例的其他参数内容已省略... variable "ddbversion" { description = "version of DolphinDB to install" type = string } variable "replace_dolphindb_lic" { description = "whether to replace...
type = string } output.tf vpc子模块输出变量,vpc子模块创建成功后,可以读取vpc相关信息,供上层或其他模块调用时读取 output "vpc_id" { description = "The ID of the VPC" value = module.vpc.vpc_id } output "vpc_arn" { description = "The ARN of the VPC" ...