From a9cd0dce53c73d296682b39de752f3c8f29f9574 Mon Sep 17 00:00:00 2001 From: hellertang Date: Wed, 6 Nov 2024 15:35:34 +0800 Subject: [PATCH 1/2] add notify routes --- tencentcloud/provider.md | 1 + .../vpc/resource_tc_vpc_notify_routes.go | 32 ----------- .../vpc/resource_tc_vpc_notify_routes.md | 28 ++++++++++ .../docs/r/vpc_notify_routes.html.markdown | 55 +++++++++++++++++++ website/tencentcloud.erb | 3 + 5 files changed, 87 insertions(+), 32 deletions(-) create mode 100644 tencentcloud/services/vpc/resource_tc_vpc_notify_routes.md create mode 100644 website/docs/r/vpc_notify_routes.html.markdown diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md index 0adf55bdaa..76a854d98c 100644 --- a/tencentcloud/provider.md +++ b/tencentcloud/provider.md @@ -1246,6 +1246,7 @@ Virtual Private Cloud(VPC) tencentcloud_vpc_ipv6_subnet_cidr_block tencentcloud_vpc_ipv6_eni_address tencentcloud_vpc_local_gateway + tencentcloud_vpc_notify_routes tencentcloud_vpc_resume_snapshot_instance tencentcloud_vpc_peer_connect_manager tencentcloud_vpc_peer_connect_accept_operation diff --git a/tencentcloud/services/vpc/resource_tc_vpc_notify_routes.go b/tencentcloud/services/vpc/resource_tc_vpc_notify_routes.go index 949133c244..3a11ecbf96 100644 --- a/tencentcloud/services/vpc/resource_tc_vpc_notify_routes.go +++ b/tencentcloud/services/vpc/resource_tc_vpc_notify_routes.go @@ -1,35 +1,3 @@ -/* -Provides a resource to create a vpc notify_routes - -# Example Usage - -```hcl - - resource "tencentcloud_vpc" "vpc" { - name = "vpc-example" - cidr_block = "10.0.0.0/16" - } - - resource "tencentcloud_route_table" "route_table" { - vpc_id = tencentcloud_vpc.vpc.id - name = "tf-example" - } - - resource "tencentcloud_vpc_notify_routes" "example" { - route_table_id = tencentcloud_route_table.route_table.id - route_item_ids = ["rti-i8bap903"] - } - -``` - -# Import - -vpc notify_routes can be imported using the id, e.g. - -``` -terraform import tencentcloud_vpc_notify_routes.notify_routes notify_routes_id -``` -*/ package vpc import ( diff --git a/tencentcloud/services/vpc/resource_tc_vpc_notify_routes.md b/tencentcloud/services/vpc/resource_tc_vpc_notify_routes.md new file mode 100644 index 0000000000..c1cc9c47d3 --- /dev/null +++ b/tencentcloud/services/vpc/resource_tc_vpc_notify_routes.md @@ -0,0 +1,28 @@ +Provides a resource to create a vpc notify_routes + +Example Usage + +```hcl +resource "tencentcloud_vpc" "vpc" { + name = "vpc-example" + cidr_block = "10.0.0.0/16" +} + +resource "tencentcloud_route_table" "route_table" { + vpc_id = tencentcloud_vpc.vpc.id + name = "tf-example" +} + +resource "tencentcloud_vpc_notify_routes" "example" { + route_table_id = tencentcloud_route_table.route_table.id + route_item_ids = ["rti-i8bap903"] +} +``` + +Import + +vpc notify_routes can be imported using the id, e.g. + +``` +terraform import tencentcloud_vpc_notify_routes.notify_routes route_table_id#route_item_id +``` diff --git a/website/docs/r/vpc_notify_routes.html.markdown b/website/docs/r/vpc_notify_routes.html.markdown new file mode 100644 index 0000000000..e8cdab2fa3 --- /dev/null +++ b/website/docs/r/vpc_notify_routes.html.markdown @@ -0,0 +1,55 @@ +--- +subcategory: "Virtual Private Cloud(VPC)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_vpc_notify_routes" +sidebar_current: "docs-tencentcloud-resource-vpc_notify_routes" +description: |- + Provides a resource to create a vpc notify_routes +--- + +# tencentcloud_vpc_notify_routes + +Provides a resource to create a vpc notify_routes + +## Example Usage + +```hcl +resource "tencentcloud_vpc" "vpc" { + name = "vpc-example" + cidr_block = "10.0.0.0/16" +} + +resource "tencentcloud_route_table" "route_table" { + vpc_id = tencentcloud_vpc.vpc.id + name = "tf-example" +} + +resource "tencentcloud_vpc_notify_routes" "example" { + route_table_id = tencentcloud_route_table.route_table.id + route_item_ids = ["rti-i8bap903"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `route_item_ids` - (Required, Set: [`String`], ForceNew) The unique ID of the routing policy. +* `route_table_id` - (Required, String, ForceNew) The unique ID of the routing table. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. +* `published_to_vbc` - If published to vbc. + + +## Import + +vpc notify_routes can be imported using the id, e.g. + +``` +terraform import tencentcloud_vpc_notify_routes.notify_routes route_table_id#route_item_id +``` + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index 2341463db9..9fb127a346 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -6410,6 +6410,9 @@
  • tencentcloud_vpc_net_detect
  • +
  • + tencentcloud_vpc_notify_routes +
  • tencentcloud_vpc_peer_connect_accept_operation
  • From fd7a7e3bd29821f7870ebea7e7dcb581cd299dde Mon Sep 17 00:00:00 2001 From: hellertang Date: Wed, 6 Nov 2024 15:41:34 +0800 Subject: [PATCH 2/2] add changelog --- .changelog/2941.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/2941.txt diff --git a/.changelog/2941.txt b/.changelog/2941.txt new file mode 100644 index 0000000000..c5f3181011 --- /dev/null +++ b/.changelog/2941.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +tencentcloud_vpc_notify_routes +``` \ No newline at end of file