data的格式是一个列表,列表中的元素是map。我只想输出每个镜像中的image_name和image_id信息,就可以使用for循环,依次取出这两个参数,并存放在map对象中。 #查找Ubuntu的所有镜像版本 data "volcengine_images" "default" { name_regex= title("ubuntu") } output "image_info" { value = [for i in data....
default 变量的默认值 type 变量的类型 describtion 变量的描述信息 validation 定义变量的验证规则 sensitive 限制变量在 UI 中显示 nullable 变量是否可为空 variable 参数类型 any string number bool list set map objec...
type 允许对用户输入的变量类型进行强制约束。Terraform支持许多类型约束,包括string、number、bool、list、map、set、object、tuple和any。如果未指定类型,那么Terraform会设置默认约束类型为any。 还可以使用类型约束创建更复杂的对象和元组结构类型。 也可以通过环境变量来设置输入变量初始值。命名规范是TF_VAR_,其中是你...
5. data结构设计我们看下最后一种资源的结构设计,首先还是先看下官方的接口定义:type DataSource interface { // Metadata should return the full name of the data source, such as // examplecloud_thing. Metadata(context.Context, MetadataRequest, *MetadataResponse) // Schema should return the sc...
$catvariable"region"{// 变量名 region,不可用重复。花括号里面是参数type=string // 输入变量的类型 default="us-west-2"// 变量的默认值 description="AWS region"// 变量的描述}variable"amis"{type=map default={us-west-2="ami-002829755fa238bfa"}description="AWS ID"}variable"instance_type"{type...
你可以在此块中使用临时迭代变量。...不能生成 meta-argument 块,如lifecycle和provisioner块,因为 Terraform 必须先处理这些参数块,然后才能安全地评估表达式。...例如,一个模块可能会接受如下复杂的数据结构: variable "load_balancer_origin_groups" { type = map(object({ origins = set 43720 头文件为什么不...
Attributes: map[string]schema.Attribute{ "host": schema.StringAttribute{ Optional: true, }, "username": schema.StringAttribute{ Optional: true, }, "password": schema.StringAttribute{ Optional: true, Sensitive: true, }, }, } } 8.实现 provider data model ...
entity_typeThe entity type (client-id, user, ip) configA map of string attributes for the entity A resource for managing Kafka SCRAM user credentials. provider"kafka"{bootstrap_servers=["localhost:9092"]ca_cert=file("../secrets/ca.crt")client_cert=file("../secrets/terraform-cert.pem")cl...
job_name_map = { for job_prefix in [for job_name in [for py_name in data.aws_s3_bucket_objects.glue_job_objects_for_people_mdm_staging["hr-mysql-source1-python-scripts"].keys : split("/", py_name)[2] ] : split(".", job_name)[0]...
tags- (Optional, Map) The tag of the resource. Attributes Reference The following attributes are exported: id- The ID of the resource supplied above. create_time- Create time. Timeouts Thetimeoutsblock allows you to specifytimeoutsfor certain actions: ...