From 54977b7ec775493e92db8944ee7cd58fe8da2a5c Mon Sep 17 00:00:00 2001 From: Mickael Stanislas Date: Fri, 13 Dec 2024 11:35:51 +0100 Subject: [PATCH] chore: add deprecation notice --- .changelog/886.txt | 7 +++++++ docs/data-sources/network_isolated.md | 5 ++++- docs/data-sources/vdc_group.md | 4 ++-- docs/resources/network_isolated.md | 5 ++++- docs/resources/vdc_group.md | 4 ++-- go.mod | 3 +++ go.sum | 4 ++-- internal/provider/common/network/schema.go | 24 ++++++++++++++++++++++ internal/provider/vdc/vdc_group_schema.go | 4 ++++ 9 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 .changelog/886.txt diff --git a/.changelog/886.txt b/.changelog/886.txt new file mode 100644 index 00000000..6165858f --- /dev/null +++ b/.changelog/886.txt @@ -0,0 +1,7 @@ +```release-note:deprecation +`resource/cloudavenue_network_isolated` - The `cloudavenue_network_isolated` resource is deprecated and will be removed in the release v0.32.0. Please use the `cloudavenue_vdc_network_isolated` resource instead. +``` + +```release-note:deprecation +`datasource/cloudavenue_network_isolated` - The `cloudavenue_network_isolated` datasource is deprecated and will be removed in the release v0.32.0. Please use the `cloudavenue_vdc_network_isolated` datasource instead. +``` diff --git a/docs/data-sources/network_isolated.md b/docs/data-sources/network_isolated.md index 67f6e0cd..a1dbbf0a 100644 --- a/docs/data-sources/network_isolated.md +++ b/docs/data-sources/network_isolated.md @@ -3,11 +3,14 @@ page_title: "cloudavenue_network_isolated Data Source - cloudavenue" subcategory: "Network" description: |- Provides a Cloud Avenue VDC isolated Network data source to read data or reference existing network. + !> Resource deprecated The resource has renamed to cloudavenue_vdc_network_isolated https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/data-sources/vdc_network_isolated, it will be removed in the version v0.32.0 https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/20 of the provider. See the GitHub issue https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/880 for more information. --- # cloudavenue_network_isolated (Data Source) -Provides a Cloud Avenue VDC isolated Network data source to read data or reference existing network. +Provides a Cloud Avenue VDC isolated Network data source to read data or reference existing network. + + !> **Resource deprecated** The resource has renamed to [`cloudavenue_vdc_network_isolated`](https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/data-sources/vdc_network_isolated), it will be removed in the version [`v0.32.0`](https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/20) of the provider. See the [GitHub issue](https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/880) for more information. ## Example Usage diff --git a/docs/data-sources/vdc_group.md b/docs/data-sources/vdc_group.md index 1c5149b4..0a4ddec9 100644 --- a/docs/data-sources/vdc_group.md +++ b/docs/data-sources/vdc_group.md @@ -3,14 +3,14 @@ page_title: "cloudavenue_vdc_group Data Source - cloudavenue" subcategory: "vDC (Virtual Datacenter)" description: |- The cloudavenue_vdc_group data source allows you to retrieve informations about an existing VDC Group. - !> Resource deprecated The resource has renamed to cloudavenue_vdcg https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/data-sources/vdcg, it will be removed in the version v0.30.0 of the provider. + !> Resource deprecated The resource has renamed to cloudavenue_vdcg https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/data-sources/vdcg, it will be removed in the version v0.30.0 https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/18 of the provider. See the GitHub issue https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/869 for more information. --- # cloudavenue_vdc_group (Data Source) The `cloudavenue_vdc_group` data source allows you to retrieve informations about an existing VDC Group. - !> **Resource deprecated** The resource has renamed to [`cloudavenue_vdcg`](https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/data-sources/vdcg), it will be removed in the version `v0.30.0` of the provider. + !> **Resource deprecated** The resource has renamed to [`cloudavenue_vdcg`](https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/data-sources/vdcg), it will be removed in the version [`v0.30.0`](https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/18) of the provider. See the [GitHub issue](https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/869) for more information. ## Example Usage diff --git a/docs/resources/network_isolated.md b/docs/resources/network_isolated.md index f09d893b..3f9170a4 100644 --- a/docs/resources/network_isolated.md +++ b/docs/resources/network_isolated.md @@ -3,11 +3,14 @@ page_title: "cloudavenue_network_isolated Resource - cloudavenue" subcategory: "Network" description: |- Provides a Cloud Avenue VDC isolated Network. This can be used to create, modify, and delete VDC isolated networks. + !> Resource deprecated The resource has renamed to cloudavenue_vdc_network_isolated https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdc_network_isolated, it will be removed in the version v0.32.0 https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/20 of the provider. See the GitHub issue https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/880 for more information. --- # cloudavenue_network_isolated (Resource) -Provides a Cloud Avenue VDC isolated Network. This can be used to create, modify, and delete VDC isolated networks. +Provides a Cloud Avenue VDC isolated Network. This can be used to create, modify, and delete VDC isolated networks. + + !> **Resource deprecated** The resource has renamed to [`cloudavenue_vdc_network_isolated`](https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdc_network_isolated), it will be removed in the version [`v0.32.0`](https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/20) of the provider. See the [GitHub issue](https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/880) for more information. ## Example Usage diff --git a/docs/resources/vdc_group.md b/docs/resources/vdc_group.md index a4c4cda9..dbcf7690 100644 --- a/docs/resources/vdc_group.md +++ b/docs/resources/vdc_group.md @@ -3,14 +3,14 @@ page_title: "cloudavenue_vdc_group Resource - cloudavenue" subcategory: "vDC (Virtual Datacenter)" description: |- The cloudavenue_vdc_group resource allows you to manage VDC Group. - !> Resource deprecated The resource has renamed to cloudavenue_vdcg https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdcg, it will be removed in the version v0.30.0 of the provider. + !> Resource deprecated The resource has renamed to cloudavenue_vdcg https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdcg, it will be removed in the version v0.30.0 https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/18 of the provider. See the GitHub issue https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/869 for more information. --- # cloudavenue_vdc_group (Resource) The `cloudavenue_vdc_group` resource allows you to manage VDC Group. - !> **Resource deprecated** The resource has renamed to [`cloudavenue_vdcg`](https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdcg), it will be removed in the version `v0.30.0` of the provider. + !> **Resource deprecated** The resource has renamed to [`cloudavenue_vdcg`](https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdcg), it will be removed in the version [`v0.30.0`](https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/18) of the provider. See the [GitHub issue](https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/869) for more information. ## How to migrate existing resources diff --git a/go.mod b/go.mod index e6016fac..1506a90b 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.22.7 toolchain go1.23.3 +replace github.com/orange-cloudavenue/cloudavenue-sdk-go => ../cloudavenue-sdk-go + require ( github.com/FrangipaneTeam/terraform-analytic-tool v0.0.12 github.com/FrangipaneTeam/terraform-plugin-framework-planmodifiers v1.3.4 @@ -45,6 +47,7 @@ require ( github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect github.com/armon/go-radix v1.0.0 // indirect + github.com/avast/retry-go/v4 v4.6.0 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect diff --git a/go.sum b/go.sum index 4b75e17b..58d36f8b 100644 --- a/go.sum +++ b/go.sum @@ -35,6 +35,8 @@ github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhP github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/avast/retry-go/v4 v4.6.0 h1:K9xNA+KeB8HHc2aWFuLb25Offp+0iVRXEvFx8IinRJA= +github.com/avast/retry-go/v4 v4.6.0/go.mod h1:gvWlPhBVsvBbLkVGDg/KwvBv0bEkCOLRRSHKIr2PyOE= github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= @@ -250,8 +252,6 @@ github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/orange-cloudavenue/cloudavenue-sdk-go v0.15.1 h1:8KZ2/hWbuDTY9KZqr0TBgwD0r702KcVXBC/FOW1opM8= -github.com/orange-cloudavenue/cloudavenue-sdk-go v0.15.1/go.mod h1:nUx8sNedkNajCoMo+oAEgBmcUnSJcxezoqhhliqKmMs= github.com/orange-cloudavenue/common-go/utils v0.0.0-20240119163616-66b473d92339 h1:DEKcWLGbEhu/I6kn9NAXhVCFrbPhR+Ef7oLmpLVnnPM= github.com/orange-cloudavenue/common-go/utils v0.0.0-20240119163616-66b473d92339/go.mod h1:11JAFfGWVmhoT4AAORKsIC5M6nI+uDGSEOScMzavgPA= github.com/peterhellberg/link v1.2.0 h1:UA5pg3Gp/E0F2WdX7GERiNrPQrM1K6CVJUUWfHa4t6c= diff --git a/internal/provider/common/network/schema.go b/internal/provider/common/network/schema.go index 53667d66..522bd62f 100644 --- a/internal/provider/common/network/schema.go +++ b/internal/provider/common/network/schema.go @@ -292,6 +292,30 @@ func GetSchema(opts ...networkSchemaOpts) superschema.Schema { _schema.DataSource.MarkdownDescription = "Provides a Cloud Avenue VDC isolated Network data source to read data or reference existing network." _schema.Attributes["vdc"] = vdc.SuperSchema() + // * Add deprecated resource and data source + _schema.Resource.Deprecated = superschema.DeprecatedResource{ + DeprecationMessage: "The `cloudavenue_network_isolated` resource is deprecated. Please use the `cloudavenue_vdc_network_isolated` resource instead.", + ComputeMarkdownDeprecationMessage: true, + Renamed: true, + TargetResourceName: "cloudavenue_vdc_network_isolated", + TargetRelease: "v0.32.0", + LinkToMigrationGuide: "https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdc_group#how-to-migrate-existing-resources", + LinkToNewResourceDoc: "https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdc_network_isolated", + LinkToMilestone: "https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/20", + LinkToIssue: "https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/880", + } + + _schema.DataSource.Deprecated = superschema.DeprecatedResource{ + DeprecationMessage: "The `cloudavenue_network_isolated` data source is deprecated. Please use the `cloudavenue_vdc_network_isolated` data source instead.", + ComputeMarkdownDeprecationMessage: true, + Renamed: true, + TargetResourceName: "cloudavenue_vdc_network_isolated", + TargetRelease: "v0.32.0", + LinkToNewResourceDoc: "https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/data-sources/vdc_network_isolated", + LinkToMilestone: "https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/20", + LinkToIssue: "https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/880", + } + case ISOLATEDVAPP: // Add isolated vApp network specific attributes to the schema delete(_schema.Attributes, "prefix_length") diff --git a/internal/provider/vdc/vdc_group_schema.go b/internal/provider/vdc/vdc_group_schema.go index b186956f..9ced317b 100644 --- a/internal/provider/vdc/vdc_group_schema.go +++ b/internal/provider/vdc/vdc_group_schema.go @@ -29,6 +29,8 @@ func groupSchema() superschema.Schema { TargetRelease: "v0.30.0", LinkToMigrationGuide: "https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdc_group#how-to-migrate-existing-resources", LinkToNewResourceDoc: "https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/resources/vdcg", + LinkToMilestone: "https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/18", + LinkToIssue: "https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/869", }, }, DataSource: superschema.SchemaDetails{ @@ -40,6 +42,8 @@ func groupSchema() superschema.Schema { TargetResourceName: "cloudavenue_vdcg", TargetRelease: "v0.30.0", LinkToNewResourceDoc: "https://registry.terraform.io/providers/orange-cloudavenue/cloudavenue/latest/docs/data-sources/vdcg", + LinkToMilestone: "https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/milestone/18", + LinkToIssue: "https://github.com/orange-cloudavenue/terraform-provider-cloudavenue/issues/869", }, }, Attributes: map[string]superschema.Attribute{