Skip to content

Commit 8f3eec2

Browse files
author
Etourneau Gwenn
authored
Recreate vpc peering resource is a field is change (#90)
1 parent 8892892 commit 8f3eec2

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

managed/resource_vpc_peering.go

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -41,49 +41,57 @@ func (r resourceVPCPeeringType) GetSchema(_ context.Context) (tfsdk.Schema, diag
4141
Computed: true,
4242
},
4343
"name": {
44-
Description: "The name of the VPC peering.",
45-
Type: types.StringType,
46-
Required: true,
44+
Description: "The name of the VPC peering.",
45+
Type: types.StringType,
46+
Required: true,
47+
PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()},
4748
},
4849
"yugabytedb_vpc_id": {
49-
Description: "The ID of the VPC where the YugabyteDB cluster is deployed.",
50-
Type: types.StringType,
51-
Required: true,
50+
Description: "The ID of the VPC where the YugabyteDB cluster is deployed.",
51+
Type: types.StringType,
52+
Required: true,
53+
PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()},
5254
},
5355
"application_vpc_info": {
5456
Description: "The details for the VPC where the application is deployed.",
5557
Required: true,
5658
Attributes: tfsdk.SingleNestedAttributes(map[string]tfsdk.Attribute{
5759
"cloud": {
58-
Description: "The cloud provider (AWS, AZURE or GCP) where the application is deployed.",
59-
Type: types.StringType,
60-
Required: true,
60+
Description: "The cloud provider (AWS, AZURE or GCP) where the application is deployed.",
61+
Type: types.StringType,
62+
Required: true,
63+
PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()},
6164
},
6265
"project": {
63-
Description: "The project ID for GCP.",
64-
Type: types.StringType,
65-
Optional: true,
66+
Description: "The project ID for GCP.",
67+
Type: types.StringType,
68+
Optional: true,
69+
PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()},
6670
},
6771
"account_id": {
68-
Description: "The account ID for AWS.",
69-
Type: types.StringType,
70-
Optional: true,
72+
Description: "The account ID for AWS.",
73+
Type: types.StringType,
74+
Optional: true,
75+
PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()},
7176
},
7277
"region": {
73-
Description: "The region where the application is deployed.",
74-
Type: types.StringType,
75-
Optional: true,
78+
Description: "The region where the application is deployed.",
79+
Type: types.StringType,
80+
Optional: true,
81+
PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()},
7682
},
7783
"vpc_id": {
78-
Description: "The ID of the VPC in which the application is deployed.",
79-
Type: types.StringType,
80-
Required: true,
84+
Description: "The ID of the VPC in which the application is deployed.",
85+
Type: types.StringType,
86+
Required: true,
87+
PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()},
8188
},
8289
"cidr": {
83-
Description: "The CIDR of the VPC in which the application is deployed.",
84-
Type: types.StringType,
85-
Computed: true,
86-
Optional: true,
90+
Description: "The CIDR of the VPC in which the application is deployed.",
91+
Type: types.StringType,
92+
Computed: true,
93+
Optional: true,
94+
PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()},
8795
},
8896
}),
8997
},

0 commit comments

Comments
 (0)