Skip to content

Commit bdfa68a

Browse files
committed
chore: add support for EnableLegacyTypeSystemApplyErrors, EnableLegacyTypeSystemPlanErrors
1 parent 42bab1d commit bdfa68a

File tree

150 files changed

+802
-490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+802
-490
lines changed

cmd/tftemplate/resource.go.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212

1313
func Resource{{ .Resource }}() *schema.Resource {
1414
return &schema.Resource{
15+
EnableLegacyTypeSystemApplyErrors: true,
16+
EnableLegacyTypeSystemPlanErrors: true,
1517
CreateContext: Resource{{ .Resource }}Create,
1618
ReadContext: Resource{{ .Resource }}Read,
1719
UpdateContext: Resource{{ .Resource }}Update,

internal/services/account/project.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ import (
1515

1616
func ResourceProject() *schema.Resource {
1717
return &schema.Resource{
18-
CreateContext: resourceAccountProjectCreate,
19-
ReadContext: resourceAccountProjectRead,
20-
UpdateContext: resourceAccountProjectUpdate,
21-
DeleteContext: resourceAccountProjectDelete,
18+
EnableLegacyTypeSystemApplyErrors: true,
19+
EnableLegacyTypeSystemPlanErrors: true,
20+
EnableLegacyTypeSystemApplyErrors: true,
21+
EnableLegacyTypeSystemPlanErrors: true,
22+
CreateContext: resourceAccountProjectCreate,
23+
ReadContext: resourceAccountProjectRead,
24+
UpdateContext: resourceAccountProjectUpdate,
25+
DeleteContext: resourceAccountProjectDelete,
2226
Importer: &schema.ResourceImporter{
2327
StateContext: schema.ImportStatePassthroughContext,
2428
},

internal/services/applesilicon/server.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ import (
1919

2020
func ResourceServer() *schema.Resource {
2121
return &schema.Resource{
22-
CreateContext: ResourceAppleSiliconServerCreate,
23-
ReadContext: ResourceAppleSiliconServerRead,
24-
UpdateContext: ResourceAppleSiliconServerUpdate,
25-
DeleteContext: ResourceAppleSiliconServerDelete,
22+
EnableLegacyTypeSystemApplyErrors: true,
23+
EnableLegacyTypeSystemPlanErrors: true,
24+
CreateContext: ResourceAppleSiliconServerCreate,
25+
ReadContext: ResourceAppleSiliconServerRead,
26+
UpdateContext: ResourceAppleSiliconServerUpdate,
27+
DeleteContext: ResourceAppleSiliconServerDelete,
2628
Timeouts: &schema.ResourceTimeout{
2729
Create: schema.DefaultTimeout(defaultAppleSiliconServerTimeout),
2830
Default: schema.DefaultTimeout(defaultAppleSiliconServerTimeout),

internal/services/az/availability_zones_data_source.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import (
1414

1515
func DataSourceAvailabilityZones() *schema.Resource {
1616
return &schema.Resource{
17-
ReadWithoutTimeout: dataSourceAvailabilityZonesRead,
17+
EnableLegacyTypeSystemApplyErrors: true,
18+
EnableLegacyTypeSystemPlanErrors: true,
19+
ReadWithoutTimeout: dataSourceAvailabilityZonesRead,
1820

1921
Timeouts: &schema.ResourceTimeout{
2022
Read: schema.DefaultTimeout(20 * time.Minute),

internal/services/baremetal/easy_partitioning_data_source.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const (
2121

2222
func DataEasyPartitioning() *schema.Resource {
2323
return &schema.Resource{
24-
ReadContext: dataEasyPartitioningRead,
24+
EnableLegacyTypeSystemApplyErrors: true,
25+
EnableLegacyTypeSystemPlanErrors: true,
26+
ReadContext: dataEasyPartitioningRead,
2527
Schema: map[string]*schema.Schema{
2628
"offer_id": {
2729
Type: schema.TypeString,

internal/services/baremetal/offer_data_source.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import (
1515

1616
func DataSourceOffer() *schema.Resource {
1717
return &schema.Resource{
18-
ReadContext: dataSourceOfferRead,
18+
EnableLegacyTypeSystemApplyErrors: true,
19+
EnableLegacyTypeSystemPlanErrors: true,
20+
ReadContext: dataSourceOfferRead,
1921

2022
Schema: map[string]*schema.Schema{
2123
"name": {

internal/services/baremetal/option_data_source.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import (
1515

1616
func DataSourceOption() *schema.Resource {
1717
return &schema.Resource{
18-
ReadContext: dataSourceOptionRead,
18+
EnableLegacyTypeSystemApplyErrors: true,
19+
EnableLegacyTypeSystemPlanErrors: true,
20+
ReadContext: dataSourceOptionRead,
1921
Schema: map[string]*schema.Schema{
2022
"name": {
2123
Type: schema.TypeString,

internal/services/baremetal/os_data_source.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import (
1515

1616
func DataSourceOS() *schema.Resource {
1717
return &schema.Resource{
18-
ReadContext: DataSourceOSRead,
18+
EnableLegacyTypeSystemApplyErrors: true,
19+
EnableLegacyTypeSystemPlanErrors: true,
20+
ReadContext: DataSourceOSRead,
1921
Schema: map[string]*schema.Schema{
2022
"name": {
2123
Type: schema.TypeString,

internal/services/baremetal/server.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ import (
2929

3030
func ResourceServer() *schema.Resource {
3131
return &schema.Resource{
32-
CreateContext: ResourceServerCreate,
33-
ReadContext: ResourceServerRead,
34-
UpdateContext: ResourceServerUpdate,
35-
DeleteContext: ResourceServerDelete,
32+
EnableLegacyTypeSystemApplyErrors: true,
33+
EnableLegacyTypeSystemPlanErrors: true,
34+
CreateContext: ResourceServerCreate,
35+
ReadContext: ResourceServerRead,
36+
UpdateContext: ResourceServerUpdate,
37+
DeleteContext: ResourceServerDelete,
3638
Importer: &schema.ResourceImporter{
3739
StateContext: schema.ImportStatePassthroughContext,
3840
},
@@ -301,6 +303,8 @@ If this behaviour is wanted, please set 'reinstall_on_ssh_key_changes' argument
301303

302304
func ResourceServerIP() *schema.Resource {
303305
return &schema.Resource{
306+
EnableLegacyTypeSystemApplyErrors: true,
307+
EnableLegacyTypeSystemPlanErrors: true,
304308
Schema: map[string]*schema.Schema{
305309
"id": {
306310
Type: schema.TypeString,

internal/services/billing/consumption_data_source.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import (
1515

1616
func DataSourceConsumptions() *schema.Resource {
1717
return &schema.Resource{
18-
ReadContext: DataSourceBillingConsumptionsRead,
18+
EnableLegacyTypeSystemApplyErrors: true,
19+
EnableLegacyTypeSystemPlanErrors: true,
20+
ReadContext: DataSourceBillingConsumptionsRead,
1921
Schema: map[string]*schema.Schema{
2022
"organization_id": account.OrganizationIDSchema(),
2123
"project_id": account.ProjectIDSchema(),

0 commit comments

Comments
 (0)