From 2ebba0073d0c28f54a64b9ac3ff77062a07a457f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=93=B2=E9=93=AD?= Date: Fri, 27 Oct 2023 10:54:51 +0800 Subject: [PATCH 1/4] feat: opt tr example --- example/transitRouterGrantRule/main.tf | 2 +- website/docs/r/transit_router_grant_rule.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/transitRouterGrantRule/main.tf b/example/transitRouterGrantRule/main.tf index 7a55ab73..c664b078 100644 --- a/example/transitRouterGrantRule/main.tf +++ b/example/transitRouterGrantRule/main.tf @@ -1,5 +1,5 @@ resource "volcengine_transit_router_grant_rule" "foo" { transit_router_id = "tr-2bzy39uy6u3282dx0efxiqyq0" - grant_account_id = "2000005141" + grant_account_id = "200000xxxx" description = "tf-test" } \ No newline at end of file diff --git a/website/docs/r/transit_router_grant_rule.html.markdown b/website/docs/r/transit_router_grant_rule.html.markdown index 473cba11..7a442a6d 100644 --- a/website/docs/r/transit_router_grant_rule.html.markdown +++ b/website/docs/r/transit_router_grant_rule.html.markdown @@ -12,7 +12,7 @@ Provides a resource to manage transit router grant rule ```hcl resource "volcengine_transit_router_grant_rule" "foo" { transit_router_id = "tr-2bzy39uy6u3282dx0efxiqyq0" - grant_account_id = "2000005141" + grant_account_id = "200000xxxx" description = "tf-test" } ``` From cad4ea44b8587f9e365821f41b5088e9f22994a0 Mon Sep 17 00:00:00 2001 From: "maoshuai.17" Date: Fri, 27 Oct 2023 11:02:04 +0800 Subject: [PATCH 2/4] feat: update tr peer attachments doc --- .../main.tf | 0 website/docs/d/transit_router_peer_attachments.html.markdown | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename example/{dataTransitRouterPeerAttacnments => dataTransitRouterPeerAttachments}/main.tf (100%) diff --git a/example/dataTransitRouterPeerAttacnments/main.tf b/example/dataTransitRouterPeerAttachments/main.tf similarity index 100% rename from example/dataTransitRouterPeerAttacnments/main.tf rename to example/dataTransitRouterPeerAttachments/main.tf diff --git a/website/docs/d/transit_router_peer_attachments.html.markdown b/website/docs/d/transit_router_peer_attachments.html.markdown index 09a52e05..f31b5e63 100644 --- a/website/docs/d/transit_router_peer_attachments.html.markdown +++ b/website/docs/d/transit_router_peer_attachments.html.markdown @@ -10,7 +10,9 @@ description: |- Use this data source to query detailed information of transit router peer attachments ## Example Usage ```hcl - +data "volcengine_transit_router_peer_attachments" "foo" { + ids = ["tr-attach-12be67d0yh2io17q7y1au****"] +} ``` ## Argument Reference The following arguments are supported: From 65748ca472a48d8081b731dd03c54226da5ac49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=93=B2=E9=93=AD?= Date: Fri, 27 Oct 2023 11:42:31 +0800 Subject: [PATCH 3/4] fix: rename shared tr --- ...sit_router_shared_transit_router_state.go} | 10 +++--- ...sit_router_shared_transit_router_state.go} | 0 ..._shared_transit_router_state.html.markdown | 34 +++++++++++++++++++ website/volcengine.erb | 3 ++ 4 files changed, 42 insertions(+), 5 deletions(-) rename volcengine/transit_router/shared_transit_router_state/{resource_volcengine_shared_transit_router_state.go => resource_volcengine_transit_router_shared_transit_router_state.go} (84%) rename volcengine/transit_router/shared_transit_router_state/{service_volcengine_shared_transit_router_state.go => service_volcengine_transit_router_shared_transit_router_state.go} (100%) create mode 100644 website/docs/r/transit_router_shared_transit_router_state.html.markdown diff --git a/volcengine/transit_router/shared_transit_router_state/resource_volcengine_shared_transit_router_state.go b/volcengine/transit_router/shared_transit_router_state/resource_volcengine_transit_router_shared_transit_router_state.go similarity index 84% rename from volcengine/transit_router/shared_transit_router_state/resource_volcengine_shared_transit_router_state.go rename to volcengine/transit_router/shared_transit_router_state/resource_volcengine_transit_router_shared_transit_router_state.go index 32640c7b..58711059 100644 --- a/volcengine/transit_router/shared_transit_router_state/resource_volcengine_shared_transit_router_state.go +++ b/volcengine/transit_router/shared_transit_router_state/resource_volcengine_transit_router_shared_transit_router_state.go @@ -15,7 +15,7 @@ import ( Import SharedTransitRouterState can be imported using the id, e.g. ``` -$ terraform import volcengine_shared_transit_router_state.default state:transitRouterId +$ terraform import volcengine_transit_router_shared_transit_router_state.default state:transitRouterId ``` */ @@ -59,7 +59,7 @@ func resourceVolcengineSharedTransitRouterStateCreate(d *schema.ResourceData, me service := NewSharedTransitRouterStateService(meta.(*ve.SdkClient)) err = service.Dispatcher.Create(service, d, ResourceVolcengineSharedTransitRouterState()) if err != nil { - return fmt.Errorf("error on creating shared_transit_router_state %q, %s", d.Id(), err) + return fmt.Errorf("error on creating volcengine_transit_router_shared_transit_router_state %q, %s", d.Id(), err) } return resourceVolcengineSharedTransitRouterStateRead(d, meta) } @@ -68,7 +68,7 @@ func resourceVolcengineSharedTransitRouterStateRead(d *schema.ResourceData, meta service := NewSharedTransitRouterStateService(meta.(*ve.SdkClient)) err = service.Dispatcher.Read(service, d, ResourceVolcengineSharedTransitRouterState()) if err != nil { - return fmt.Errorf("error on reading shared_transit_router_state %q, %s", d.Id(), err) + return fmt.Errorf("error on reading volcengine_transit_router_shared_transit_router_state %q, %s", d.Id(), err) } return err } @@ -77,7 +77,7 @@ func resourceVolcengineSharedTransitRouterStateUpdate(d *schema.ResourceData, me service := NewSharedTransitRouterStateService(meta.(*ve.SdkClient)) err = service.Dispatcher.Update(service, d, ResourceVolcengineSharedTransitRouterState()) if err != nil { - return fmt.Errorf("error on update shared_transit_router_state %q, %s", d.Id(), err) + return fmt.Errorf("error on update volcengine_transit_router_shared_transit_router_state %q, %s", d.Id(), err) } return err } @@ -86,7 +86,7 @@ func resourceVolcengineSharedTransitRouterStateDelete(d *schema.ResourceData, me service := NewSharedTransitRouterStateService(meta.(*ve.SdkClient)) err = service.Dispatcher.Delete(service, d, ResourceVolcengineSharedTransitRouterState()) if err != nil { - return fmt.Errorf("error on deleting shared_transit_router_state %q, %s", d.Id(), err) + return fmt.Errorf("error on deleting volcengine_transit_router_shared_transit_router_state %q, %s", d.Id(), err) } return err } diff --git a/volcengine/transit_router/shared_transit_router_state/service_volcengine_shared_transit_router_state.go b/volcengine/transit_router/shared_transit_router_state/service_volcengine_transit_router_shared_transit_router_state.go similarity index 100% rename from volcengine/transit_router/shared_transit_router_state/service_volcengine_shared_transit_router_state.go rename to volcengine/transit_router/shared_transit_router_state/service_volcengine_transit_router_shared_transit_router_state.go diff --git a/website/docs/r/transit_router_shared_transit_router_state.html.markdown b/website/docs/r/transit_router_shared_transit_router_state.html.markdown new file mode 100644 index 00000000..5c2b56ff --- /dev/null +++ b/website/docs/r/transit_router_shared_transit_router_state.html.markdown @@ -0,0 +1,34 @@ +--- +subcategory: "TRANSIT_ROUTER" +layout: "volcengine" +page_title: "Volcengine: volcengine_transit_router_shared_transit_router_state" +sidebar_current: "docs-volcengine-resource-transit_router_shared_transit_router_state" +description: |- + Provides a resource to manage transit router shared transit router state +--- +# volcengine_transit_router_shared_transit_router_state +Provides a resource to manage transit router shared transit router state +## Example Usage +```hcl +resource "volcengine_transit_router_shared_transit_router_state" "foo" { + transit_router_id = "tr-2bzy39uy6u3282dx0efxiqyq0" + action = "Reject" +} +``` +## Argument Reference +The following arguments are supported: +* `action` - (Required) `Accept` or `Reject` the shared transit router. +* `transit_router_id` - (Required, ForceNew) The id of the transit router. + +## Attributes Reference +In addition to all arguments above, the following attributes are exported: +* `id` - ID of the resource. + + + +## Import +SharedTransitRouterState can be imported using the id, e.g. +``` +$ terraform import volcengine_transit_router_shared_transit_router_state.default state:transitRouterId +``` + diff --git a/website/volcengine.erb b/website/volcengine.erb index 2f897748..883aaf88 100644 --- a/website/volcengine.erb +++ b/website/volcengine.erb @@ -1020,6 +1020,9 @@
  • transit_router_route_table_propagation
  • +
  • + transit_router_shared_transit_router_state +
  • transit_router
  • From f8fb99a54cfd51a6248d3f5d66376f2b84b73b28 Mon Sep 17 00:00:00 2001 From: "maoshuai.17" Date: Fri, 27 Oct 2023 11:46:07 +0800 Subject: [PATCH 4/4] fix: delete available resources example --- common/common_volcengine_version.go | 2 +- .../docs/d/available_resources.html.markdown | 39 ------------------- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 website/docs/d/available_resources.html.markdown diff --git a/common/common_volcengine_version.go b/common/common_volcengine_version.go index 091bfb8f..7f2750b4 100644 --- a/common/common_volcengine_version.go +++ b/common/common_volcengine_version.go @@ -2,5 +2,5 @@ package common const ( TerraformProviderName = "terraform-provider-volcengine" - TerraformProviderVersion = "0.0.118" + TerraformProviderVersion = "0.0.119" ) diff --git a/website/docs/d/available_resources.html.markdown b/website/docs/d/available_resources.html.markdown deleted file mode 100644 index 3658c5c8..00000000 --- a/website/docs/d/available_resources.html.markdown +++ /dev/null @@ -1,39 +0,0 @@ ---- -subcategory: "ECS" -layout: "volcengine" -page_title: "Volcengine: volcengine_available_resources" -sidebar_current: "docs-volcengine-datasource-available_resources" -description: |- - Use this data source to query detailed information of available resources ---- -# volcengine_available_resources -Use this data source to query detailed information of available resources -## Example Usage -```hcl -data "volcengine_available_resources" "foo" { - destination_resource = "InstanceType" -} -``` -## Argument Reference -The following arguments are supported: -* `destination_resource` - (Required) The type of resource to query. Valid values: `InstanceType`, `DedicatedHost`. -* `instance_charge_type` - (Optional) The charge type of instance. Valid values: `PostPaid`, `PrePaid`, `ReservedInstance`. Default is `PostPaid`. -* `instance_type_id` - (Optional) The id of instance type. -* `output_file` - (Optional) File name where to save data source results. -* `spot_strategy` - (Optional) The spot strategy of PostPaid instance. Valid values: `NoSpot`, `SpotAsPriceGo`. Default is `NoSpot`. -* `zone_id` - (Optional) The id of available zone. - -## Attributes Reference -In addition to all arguments above, the following attributes are exported: -* `available_zones` - The collection of query. - * `available_resources` - The resource information of the available zone. - * `supported_resources` - The supported resource information. - * `status` - The status of the resource. Valid values: `Available`, `SoldOut`. - * `value` - The value of the resource. - * `type` - The type of resource. Valid values: `InstanceType`, `DedicatedHost`. - * `region_id` - The id of the region. - * `status` - The resource status of the available zone. Valid values: `Available`, `SoldOut`. - * `zone_id` - The id of the available zone. -* `total_count` - The total count of query. - -