diff --git a/.changelog/347.txt b/.changelog/347.txt new file mode 100644 index 00000000..386992b8 --- /dev/null +++ b/.changelog/347.txt @@ -0,0 +1,3 @@ +```release-note:chore +`resource/cloudavenue_edgegateway_app_port_profile` is a resource moved from `cloudavenue_network_app_port_profile`. +``` diff --git a/docs/resources/network_app_port_profile.md b/docs/resources/edgegateway_app_port_profile.md similarity index 79% rename from docs/resources/network_app_port_profile.md rename to docs/resources/edgegateway_app_port_profile.md index d408205e..f18d41c0 100644 --- a/docs/resources/network_app_port_profile.md +++ b/docs/resources/edgegateway_app_port_profile.md @@ -1,11 +1,11 @@ --- -page_title: "cloudavenue_network_app_port_profile Resource - cloudavenue" -subcategory: "Network" +page_title: "cloudavenue_edgegateway_app_port_profile Resource - cloudavenue" +subcategory: "Edge Gateway (Tier-1)" description: |- Provides a NSX-T App Port Profile resource --- -# cloudavenue_network_app_port_profile (Resource) +# cloudavenue_edgegateway_app_port_profile (Resource) Provides a NSX-T App Port Profile resource @@ -16,7 +16,7 @@ data "cloudavenue_vdc" "example" { name = "VDC_Test" } -resource "cloudavenue_network_app_port_profile" "example" { +resource "cloudavenue_edgegateway_app_port_profile" "example" { name = "example-rule" description = "Application port profile for example" vdc = data.cloudavenue_vdc.example.id @@ -68,5 +68,5 @@ Optional: Import is supported using the following syntax: ```shell -terraform import cloudavenue.network_app_port_profile vdc-or-vdc-group-id.RuleName +terraform import cloudavenue.edgegateway_app_port_profile vdc-or-vdc-group-id.RuleName ``` diff --git a/examples/resources/cloudavenue_edgegateway_app_port_profile/import.sh b/examples/resources/cloudavenue_edgegateway_app_port_profile/import.sh new file mode 100644 index 00000000..4f10b9e6 --- /dev/null +++ b/examples/resources/cloudavenue_edgegateway_app_port_profile/import.sh @@ -0,0 +1 @@ +terraform import cloudavenue.edgegateway_app_port_profile vdc-or-vdc-group-id.RuleName diff --git a/examples/resources/cloudavenue_network_app_port_profile/resource.tf b/examples/resources/cloudavenue_edgegateway_app_port_profile/resource.tf similarity index 84% rename from examples/resources/cloudavenue_network_app_port_profile/resource.tf rename to examples/resources/cloudavenue_edgegateway_app_port_profile/resource.tf index fd5d2211..4c7364dd 100644 --- a/examples/resources/cloudavenue_network_app_port_profile/resource.tf +++ b/examples/resources/cloudavenue_edgegateway_app_port_profile/resource.tf @@ -2,7 +2,7 @@ data "cloudavenue_vdc" "example" { name = "VDC_Test" } -resource "cloudavenue_network_app_port_profile" "example" { +resource "cloudavenue_edgegateway_app_port_profile" "example" { name = "example-rule" description = "Application port profile for example" vdc = data.cloudavenue_vdc.example.id diff --git a/examples/resources/cloudavenue_network_app_port_profile/import.sh b/examples/resources/cloudavenue_network_app_port_profile/import.sh deleted file mode 100644 index 993b7055..00000000 --- a/examples/resources/cloudavenue_network_app_port_profile/import.sh +++ /dev/null @@ -1 +0,0 @@ -terraform import cloudavenue.network_app_port_profile vdc-or-vdc-group-id.RuleName diff --git a/internal/provider/network/app_port_profile_resource.go b/internal/provider/edgegw/app_port_profile_resource.go similarity index 99% rename from internal/provider/network/app_port_profile_resource.go rename to internal/provider/edgegw/app_port_profile_resource.go index 0849ab7b..3474b64b 100644 --- a/internal/provider/network/app_port_profile_resource.go +++ b/internal/provider/edgegw/app_port_profile_resource.go @@ -1,5 +1,5 @@ // Package network provides a Terraform resource. -package network +package edgegw import ( "context" diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 83c37e5e..2e123e64 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -119,6 +119,7 @@ func (p *cloudavenueProvider) Resources(_ context.Context) []func() resource.Res // EDGE GATEWAY edgegw.NewEdgeGatewayResource, edgegw.NewFirewallResource, + edgegw.NewPortProfilesResource, // VDC vdc.NewVDCResource, @@ -153,7 +154,6 @@ func (p *cloudavenueProvider) Resources(_ context.Context) []func() resource.Res // NETWORK network.NewNetworkRoutedResource, network.NewNetworkIsolatedResource, - network.NewPortProfilesResource, } } diff --git a/internal/tests/network/app_port_profile_resource_test.go b/internal/tests/edgegw/app_port_profile_resource_test.go similarity index 93% rename from internal/tests/network/app_port_profile_resource_test.go rename to internal/tests/edgegw/app_port_profile_resource_test.go index dcbc73c1..758473a7 100644 --- a/internal/tests/network/app_port_profile_resource_test.go +++ b/internal/tests/edgegw/app_port_profile_resource_test.go @@ -1,4 +1,4 @@ -package network +package edgegw import ( "fmt" @@ -16,7 +16,7 @@ data "cloudavenue_vdc" "example" { name = "VDC_Test" } -resource "cloudavenue_network_app_port_profile" "example" { +resource "cloudavenue_edgegateway_app_port_profile" "example" { name = "example-rule" description = "Application port profile for example" vdc = data.cloudavenue_vdc.example.id @@ -42,7 +42,7 @@ data "cloudavenue_vdc" "example" { name = "VDC_Test" } -resource "cloudavenue_network_app_port_profile" "example" { +resource "cloudavenue_edgegateway_app_port_profile" "example" { name = "example-rule" description = "Application port profile for example" vdc = data.cloudavenue_vdc.example.id @@ -71,7 +71,7 @@ resource "cloudavenue_network_app_port_profile" "example" { ` func TestAccPortProfilesResource(t *testing.T) { - resourceName := "cloudavenue_network_app_port_profile.example" + resourceName := "cloudavenue_edgegateway_app_port_profile.example" resource.Test(t, resource.TestCase{ PreCheck: func() { tests.TestAccPreCheck(t) }, diff --git a/templates/resources/network_app_port_profile.md.tmpl b/templates/resources/edgegateway_app_port_profile.md.tmpl similarity index 92% rename from templates/resources/network_app_port_profile.md.tmpl rename to templates/resources/edgegateway_app_port_profile.md.tmpl index c0da58fb..4047fd28 100644 --- a/templates/resources/network_app_port_profile.md.tmpl +++ b/templates/resources/edgegateway_app_port_profile.md.tmpl @@ -1,6 +1,6 @@ --- page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" -subcategory: "Network" +subcategory: "Edge Gateway (Tier-1)" description: |- {{ .Description | plainmarkdown | trimspace | prefixlines " " }} ---