Skip to content

Commit

Permalink
feat/private_dns
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenEarth committed Sep 20, 2023
1 parent cb4005a commit 77962e1
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 2 deletions.
10 changes: 9 additions & 1 deletion tencentcloud/resource_tc_private_dns_zone_vpc_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ resource "tencentcloud_private_dns_zone_vpc_attachment" "example2" {
region = "ap-guangzhou"
uin = "100022770164"
}
}`
}
`
87 changes: 87 additions & 0 deletions website/docs/r/private_dns_zone_vpc_attachment.html.markdown
Original file line number Diff line number Diff line change
@@ -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
```

3 changes: 3 additions & 0 deletions website/tencentcloud.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2108,6 +2108,9 @@
<li>
<a href="/docs/providers/tencentcloud/r/private_dns_zone.html">tencentcloud_private_dns_zone</a>
</li>
<li>
<a href="/docs/providers/tencentcloud/r/private_dns_zone_vpc_attachment.html">tencentcloud_private_dns_zone_vpc_attachment</a>
</li>
</ul>
</li>
</ul>
Expand Down

0 comments on commit 77962e1

Please sign in to comment.