如果variable的目的是作为dynamic块的来源被使用于resource内部的,由于provider结构的相对稳定以及这种dynamic块一般使用的场景里会涉及到类型不同的成员,所以object似乎更合适。
variable"foo"{type=object({ name=stringid=numberfoobar=string#or bool, number, etc...}) }resource"null_resource"{triggers={ some_name=var.foo.name some_id=var.foo.id some_foobar=var.foo.foobar } } ... and then call it, explicitly setting the optional properties tonull ...
availability_zone = var.availability_zones[count.index] # By referencing the aws_vpc.main object, Terraform knows that the subnet # must be created only after the VPC is created. vpc_id = aws_vpc.main.id # Built-in functions and operators can be used for simple transformations of # value...
我有这个资源和这个带有这些变量的动态块: variable "services" { description = "Map of the Services" type = map(object({ port = number uri = optional(string) })) } services = { "auth-service" = { port = 3050 uri = "example1" } "clone-service" = { port = 3040 } } resource "k...
{ type = string description ="Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."default ="rg"}variable"msi_id"{ type = string description ="(Optional) Manage identity id that be used as authentication method. Defau...
OSS: An Object Storage Service (OSS) bucket. ->NOTE:From version 1.232.0,typecan be set toALB,NLB,ENI,OSS. weight- (Required, Int) The weight of Endpoint N in the endpoint group. Valid values:0to255. ->NOTE:If the weight of a terminal node is set to0, global acceleration will ...
variable"helm_release"{description="A Release is an instance of a chart running in a Kubernetes cluster. https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release"default={demo={chart_path="/charts/SecretProviderClass"values_paths=["/charts/SecretProviderClass/values.yaml...
# options: ipvs|iptablesvariable"proxy_mode"{ description ="Proxy mode is option of kube-proxy."default ="ipvs"}variable"service_cidr"{ description ="The kubernetes service cidr block. It cannot be equals to vpc's or vswitch's or pod's and cannot be in them."default ="192.168.0.0/16...
context Single object for setting entire context at once.See description of individual variables for details.Leave string and numeric variables as null to use default value.Individual variable settings (non-null) override settings in context object,except for attributes, tags, and additional_tag_map,...
variable"agent_count"{ default =3}# The following two variable declarations are placeholder references.# Set the values for these variable in terraform.tfvarsvariable"aks_service_principal_app_id"{ default =""}variable"aks_service_principal_client_secret"{ default =""}variable"cluster_name"{ defa...