tencent cloud


Data Sources

Last updated: 2022-01-14 14:30:41

    Data sources allow Terraform to use information defined outside of Terraform, defined by another separate Terraform configuration, or modified by functions.

    Using Data Source

    A data source is accessed via a special kind of resource known as a data resource, declared using a data block as shown below:

    data "tencentcloud_availability_zones" "my_favourite_zone" {
     name = "ap-guangzhou-3"

    Referencing Data Source

    The syntax for referencing data from a data source is data.<type>.<name>.<attribute> as shown below:

    resource "tencentcloud_subnet" "app" {
     availability_zone = data.tencentcloud_availability_zones.default.zones.0.name

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support