diff --git a/tencentcloud/resource_tc_private_dns_zone_vpc_attachment.go b/tencentcloud/resource_tc_private_dns_zone_vpc_attachment.go index 6d7aeb3804..e3c8826f76 100644 --- a/tencentcloud/resource_tc_private_dns_zone_vpc_attachment.go +++ b/tencentcloud/resource_tc_private_dns_zone_vpc_attachment.go @@ -36,8 +36,16 @@ Import PrivateDns zone_vpc_attachment can be imported using the id, e.g. +Add Vpc Set + +``` +terraform import tencentcloud_private_dns_zone_vpc_attachment.example zone-6t11lof0#vpc_set#vpc-jdx11z0t#ap-guangzhou# +``` + +Add Account Vpc Set + ``` -terraform import tencentcloud_private_dns_zone_vpc_attachment.example zone_vpc_attachment_id +terraform import tencentcloud_private_dns_zone_vpc_attachment.example zone-980faacc#account_vpc_set#vpc-axrsmmrv#ap-guangzhou#100022770164 ``` */ package tencentcloud diff --git a/tencentcloud/resource_tc_private_dns_zone_vpc_attachment_test.go b/tencentcloud/resource_tc_private_dns_zone_vpc_attachment_test.go index 89464bdb51..ad497a3158 100644 --- a/tencentcloud/resource_tc_private_dns_zone_vpc_attachment_test.go +++ b/tencentcloud/resource_tc_private_dns_zone_vpc_attachment_test.go @@ -61,4 +61,5 @@ resource "tencentcloud_private_dns_zone_vpc_attachment" "example2" { region = "ap-guangzhou" uin = "100022770164" } -}` +} +` diff --git a/website/docs/r/private_dns_zone_vpc_attachment.html.markdown b/website/docs/r/private_dns_zone_vpc_attachment.html.markdown new file mode 100644 index 0000000000..1a569fa974 --- /dev/null +++ b/website/docs/r/private_dns_zone_vpc_attachment.html.markdown @@ -0,0 +1,87 @@ +--- +subcategory: "PrivateDNS" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_private_dns_zone_vpc_attachment" +sidebar_current: "docs-tencentcloud-resource-private_dns_zone_vpc_attachment" +description: |- + Provides a resource to create a PrivateDns zone_vpc_attachment +--- + +# tencentcloud_private_dns_zone_vpc_attachment + +Provides a resource to create a PrivateDns zone_vpc_attachment + +~> **NOTE:** If you need to bind account A to account B's VPC resources, you need to first grant role authorization to account A. + +## Example Usage + +### Append VPC associated with private dns zone + +```hcl +resource "tencentcloud_private_dns_zone_vpc_attachment" "example" { + zone_id = "zone-6t11lof0" + + vpc_set { + uniq_vpc_id = "vpc-jdx11z0t" + region = "ap-guangzhou" + } +} +``` + +### Add VPC information for associated accounts in the private dns zone + +```hcl +resource "tencentcloud_private_dns_zone_vpc_attachment" "example" { + zone_id = "zone-6t11lof0" + + account_vpc_set { + uniq_vpc_id = "vpc-82znjzn3" + region = "ap-guangzhou" + uin = "100017155920" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `zone_id` - (Required, String, ForceNew) PrivateZone ID. +* `account_vpc_set` - (Optional, List, ForceNew) New add account vpc info. +* `vpc_set` - (Optional, List, ForceNew) New add vpc info. + +The `account_vpc_set` object supports the following: + +* `region` - (Required, String) Vpc region. +* `uin` - (Required, String) Vpc owner uin. To grant role authorization to this account. +* `uniq_vpc_id` - (Required, String) Uniq Vpc Id. + +The `vpc_set` object supports the following: + +* `region` - (Required, String) Vpc region. +* `uniq_vpc_id` - (Required, String) Uniq Vpc Id. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + +## Import + +PrivateDns zone_vpc_attachment can be imported using the id, e.g. + +Add Vpc Set + +``` +terraform import tencentcloud_private_dns_zone_vpc_attachment.example zone-6t11lof0#vpc_set#vpc-jdx11z0t#ap-guangzhou# +``` + +Add Account Vpc Set + +``` +terraform import tencentcloud_private_dns_zone_vpc_attachment.example zone-980faacc#account_vpc_set#vpc-axrsmmrv#ap-guangzhou#100022770164 +``` + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index b9ba19417f..e4bf027f82 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -2108,6 +2108,9 @@
  • tencentcloud_private_dns_zone
  • +
  • + tencentcloud_private_dns_zone_vpc_attachment +