Skip to content

Commit

Permalink
Add deprecation messages to ecx_ terraform resources using Fabric v3 …
Browse files Browse the repository at this point in the history
…API SDK
  • Loading branch information
thogarty committed Nov 3, 2023
1 parent d161d42 commit ce41573
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
7 changes: 4 additions & 3 deletions equinix/data_source_ecx_l2_sellerprofile.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ var ecxL2SellerProfileAdditionalInfosDescriptions = map[string]string{

func dataSourceECXL2SellerProfile() *schema.Resource {
return &schema.Resource{
ReadContext: dataSourceECXL2SellerProfileRead,
Description: "Use this data source to get details of Equinix Fabric layer 2 seller profile with a given name and / or organization",
Schema: createECXL2SellerProfileSchema(),
DeprecationMessage: "This resource is deprecated. End of Life will be June 30th, 2024. Use equinix_fabric_service_profile instead.",
ReadContext: dataSourceECXL2SellerProfileRead,
Description: "Use this data source to get details of Equinix Fabric layer 2 seller profile with a given name and / or organization",
Schema: createECXL2SellerProfileSchema(),
}
}

Expand Down
5 changes: 3 additions & 2 deletions equinix/data_source_ecx_l2_sellerprofiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ var ecxL2SellerProfilesDescriptions = map[string]string{

func dataSourceECXL2SellerProfiles() *schema.Resource {
return &schema.Resource{
ReadContext: dataSourceECXL2SellerProfilesRead,
Description: "Use this data source to get list of Equinix Fabric layer 2 seller profiles",
DeprecationMessage: "This resource is deprecated. End of Life will be June 30th, 2024. Use equinix_fabric_service_profiles instead.",
ReadContext: dataSourceECXL2SellerProfilesRead,
Description: "Use this data source to get list of Equinix Fabric layer 2 seller profiles",
Schema: map[string]*schema.Schema{
ecxL2SellerProfilesSchemaNames["NameRegex"]: {
Type: schema.TypeString,
Expand Down
5 changes: 3 additions & 2 deletions equinix/data_source_ecx_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ var ecxPortDescriptions = map[string]string{

func dataSourceECXPort() *schema.Resource {
return &schema.Resource{
ReadContext: dataSourceECXPortRead,
Description: "Use this data source to get details of Equinix Fabric port with a given name",
DeprecationMessage: "This resource is deprecated. End of Life will be June 30th, 2024. Use equinix_fabric_port and equinix_fabric_ports instead.",
ReadContext: dataSourceECXPortRead,
Description: "Use this data source to get details of Equinix Fabric port with a given name",
Schema: map[string]*schema.Schema{
ecxPortSchemaNames["UUID"]: {
Type: schema.TypeString,
Expand Down
9 changes: 5 additions & 4 deletions equinix/resource_ecx_l2_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ type (

func resourceECXL2Connection() *schema.Resource {
return &schema.Resource{
CreateContext: resourceECXL2ConnectionCreate,
ReadContext: resourceECXL2ConnectionRead,
UpdateContext: resourceECXL2ConnectionUpdate,
DeleteContext: resourceECXL2ConnectionDelete,
DeprecationMessage: "This resource is deprecated. End of Life will be June 30th, 2024. Use equinix_fabric_connection instead.",
CreateContext: resourceECXL2ConnectionCreate,
ReadContext: resourceECXL2ConnectionRead,
UpdateContext: resourceECXL2ConnectionUpdate,
DeleteContext: resourceECXL2ConnectionDelete,
Importer: &schema.ResourceImporter{
StateContext: func(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
// The expected ID to import redundant connections is '(primaryID):(secondaryID)', e.g.,
Expand Down
9 changes: 5 additions & 4 deletions equinix/resource_ecx_l2_serviceprofile.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ var ecxL2ServiceProfileSpeedBandDescriptions = map[string]string{

func resourceECXL2ServiceProfile() *schema.Resource {
return &schema.Resource{
CreateContext: resourceECXL2ServiceProfileCreate,
ReadContext: resourceECXL2ServiceProfileRead,
UpdateContext: resourceECXL2ServiceProfileUpdate,
DeleteContext: resourceECXL2ServiceProfileDelete,
DeprecationMessage: "This resource is deprecated. End of Life will be June 30th, 2024. Use equinix_fabric_service_profile instead.",
CreateContext: resourceECXL2ServiceProfileCreate,
ReadContext: resourceECXL2ServiceProfileRead,
UpdateContext: resourceECXL2ServiceProfileUpdate,
DeleteContext: resourceECXL2ServiceProfileDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down

0 comments on commit ce41573

Please sign in to comment.