Skip to content

Commit 44103a1

Browse files
authored
fix(network): ipv4 prefix and length must be computed to avoid errors during creation (#779)
1 parent c06b08e commit 44103a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stackit/internal/services/iaas/network/resource.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ func (r *networkResource) Schema(_ context.Context, _ resource.SchemaRequest, re
213213
"ipv4_prefix": schema.StringAttribute{
214214
Description: "The IPv4 prefix of the network (CIDR).",
215215
Optional: true,
216+
Computed: true,
216217
Validators: []validator.String{
217218
validate.CIDR(),
218219
},
@@ -222,6 +223,7 @@ func (r *networkResource) Schema(_ context.Context, _ resource.SchemaRequest, re
222223
},
223224
"ipv4_prefix_length": schema.Int64Attribute{
224225
Description: "The IPv4 prefix length of the network.",
226+
Computed: true,
225227
Optional: true,
226228
},
227229
"prefixes": schema.ListAttribute{

0 commit comments

Comments
 (0)