Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 567 Bytes

File metadata and controls

19 lines (14 loc) · 567 Bytes

Terraform Data Sources

Terraform data sources allow data to be fetched to be used in Terraform configuration.

In TypeScript, a Terraform data source can fetches the AWS region can be expressed by DataAwsRegion.

.....
import { DataAwsRegion } from './gen/providers/aws'

export class HelloTerraform extends TerraformStack {
    constructor(scope: Construct, id: string) {
        super(scope, id);

        .....
        const region = new DataAwsRegion(this, 'region')
    }
}