Skip to main content
TerraformDataSource represents a data source in Terraform.

Meta-Arguments

All data sources support the following meta-arguments:
PropertyTypeDescription
dependsOnITerraformAddressable[]Explicit dependencies.
countnumber | TerraformCountData source count.
providerTerraformProviderSpecific provider instance.
forEachTerraformIteratorIterator for multiple data sources.

Methods

interpolationForAttribute()

interpolationForAttribute(attr: string): IResolvable
Returns an interpolation token for a specific attribute.

getStringAttribute()

getStringAttribute(name: string): string
Returns a string attribute value.

getNumberAttribute()

getNumberAttribute(name: string): number
Returns a number attribute value.

getBooleanAttribute()

getBooleanAttribute(name: string): boolean
Returns a boolean attribute value.

getListAttribute()

getListAttribute(name: string): string[]
Returns a list attribute value.

getMapAttribute()

getMapAttribute(name: string): Record<string, any>
Returns a map attribute value.