connection_string = "pgm-f8z03v853neh87k8.pg.rds.aliyuncs.com" connection_string_prefix = "pgm-f8z03v853neh87k8" create_time = "2024-10-31T02:29:36Z" db_instance_ip_array_attribute = null db_instance_ip_array_name = null db_instance_storage_type = "cloud_essd" db_instance_type ...
在定义资源的过程中,使用output关键字定义Output Variables。例如,下面是一个定义一个名为example_output_variable的Output Variables的例子: output "example_output_variable" { value = "example_value" } 在需要使用Output Variables的资源定义中,使用var关键字定义需要使用的Output Variables。例如,下面是一个使用Outp...
connection_string = "pgm-f8z03v853neh87k8.pg.rds.aliyuncs.com" connection_string_prefix = "pgm-f8z03v853neh87k8" create_time = "2024-10-31T02:29:36Z" db_instance_ip_array_attribute = null db_instance_ip_array_name = null db_instance_storage_type = "cloud_essd" db_instance_type ...
file读取指定路径下的文件内容,并将其作为 string 返回。 > file("${path.module}/hello.txt") Hello World jsondecode函数 jsondecode将一个给定的 string 解释为 JSON,返回该字符串的解码结果。 该函数以如下方式将 JSON 值映射到Terraform 语言 type: Terraform 语言的自动类型转换规则意味着你通常不需要担心一...
variable "regions" { type = map(object({ ami_id = string instance_type = string })) default = { us-east-1 = { ami_id = "ami-0c55b159cbfafe1f0" instance_type = "t2.micro" } us-west-2 = { ami_id = "ami-0a54c984b9f908c81" instance_type = "t2.micro" } } } 你可以...
使用variable 定义变量,使用 -var/-var-file/TF_VAR_name/UI-Input 给变量赋值使用 output 定义输出使用 module 组织 tf 文件 Store...一个provider例子的执行流程 [image] 命令行工具: terraform cli 配置语言(语法) The main purpose of the Terraform language is...= aws.west Provisioner: 同 vagrant,启...
jsondecode将一个给定的 string 解释为 JSON,返回该字符串的解码结果。 该函数以如下方式将 JSON 值映射到Terraform 语言 type: Terraform 语言的自动类型转换规则意味着你通常不需要担心一个给定的值到底会产生什么类型,只需以直观的方式使用结果即可。
description: a literal JSON string,notinterpreted as a template. {"variable":{"example":{"type":"string","default":"hello"}}} outputblocks Thedescriptionandsensitivearguments are interpreted as literal JSON values. Thedescriptionstring is not interpreted as a string template. ...
{string:'str',number:123,boolean:true,stringList:['str1','str2','str3'],numberList:[111,222,333],booleanList:[true,false,true],tuple:['str',123,true],object:{arg1:'str',arg2:123,arg3:true},objectList:[{arg1:'str'},{arg1:'str'}],objectListForVariable:list({arg1:'str'},{...
Create local Variable Object Map of Values to Select Conditionally Lookup Value to Use Full Array Values and Conditional Lookup Example Wrap Up Related: If you’re new to Terraform, or are looking for a bit more information, then we recommend you check out our “Get Started with Terraform on...