Skip to content

Commit d9253ec

Browse files
committed
CDPCP-14613 - mark instance_count_by_group and multi_az as computed to not to get complain upon deployment finish in case they are not specified
1 parent ce989db commit d9253ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

resources/environments/schema_freeipa.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ package environments
1212

1313
import (
1414
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
15+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
1516
"github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
17+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int32default"
1618
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier"
1719
"github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier"
1820
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
@@ -48,6 +50,8 @@ var FreeIpaSchema = schema.SingleNestedAttribute{
4850
},
4951
"instance_count_by_group": schema.Int32Attribute{
5052
Optional: true,
53+
Computed: true,
54+
Default: int32default.StaticInt32(1),
5155
PlanModifiers: []planmodifier.Int32{
5256
int32planmodifier.UseStateForUnknown(),
5357
},
@@ -109,6 +113,8 @@ var FreeIpaSchema = schema.SingleNestedAttribute{
109113
},
110114
"multi_az": schema.BoolAttribute{
111115
Optional: true,
116+
Computed: true,
117+
Default: booldefault.StaticBool(false),
112118
PlanModifiers: []planmodifier.Bool{
113119
boolplanmodifier.UseStateForUnknown(),
114120
},

0 commit comments

Comments
 (0)