tencent cloud

All product documents
Resource
Last updated: 2024-12-02 16:01:33
Resource
Last updated: 2024-12-02 16:01:33
Resources are the most important element in the Terraform language. A resource is defined using a resource block, which describes one or more infrastructure objects, such as VPC and VM.

Resource syntax

A resource is defined using a resource block, which contains the resource keyword, resource type, resource name, and resource block body as shown below:
resource "tencentcloud_vpc" "foo" {
name = "ci-temp-test-updated"
cidr_block = "10.0.0.0/16"
dns_servers = ["119.29.29.29", "8.8.8.8"]
is_multicast = false

tags = {
"test" = "test"
}
}

Resource reference

A resource attribute is referenced in the syntax format of <Resource type>.<Name>.<Attribute> as shown below:
tencentcloud_vpc.foo.resource # ci-temp-test-updated

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

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
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon