Skip to content

Commit

Permalink
bugfix: add at least one of the fields Computer, Required and Optiona…
Browse files Browse the repository at this point in the history
…l in the network's fields schems
  • Loading branch information
EmilGeorgiev committed Feb 23, 2024
1 parent 17de2eb commit 871f8ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions stackit/internal/data-sources/network/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ func (r *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, r
},
"nameservers": schema.ListAttribute{
Description: "List of DNS Servers/Nameservers.",
Required: false,
Optional: true,
ElementType: types.StringType,
Validators: []validator.List{
validate.NameServers(),
},
},
"network_id": schema.StringAttribute{
Description: "The ID of the network",
Required: true,
Computed: true,
},
"prefixes": schema.ListAttribute{
Required: true,
Computed: true,
ElementType: types.StringType,
Validators: []validator.List{
validate.Prefixes(),
},
},
"prefix_length_v4": schema.Int64Attribute{
Description: "prefix length",
Required: true,
Optional: true,
Validators: []validator.Int64{
validate.PrefixLengthV4(),
},
Expand Down
8 changes: 4 additions & 4 deletions stackit/internal/resources/network/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp
},
"nameservers": schema.ListAttribute{
Description: "List of DNS Servers/Nameservers.",
Required: false,
Optional: true,
ElementType: types.StringType,
Validators: []validator.List{
validate.NameServers(),
},
},
"network_id": schema.StringAttribute{
Description: "The ID of the network",
Required: true,
Computed: true,
},
"prefixes": schema.ListAttribute{
Required: true,
Computed: true,
ElementType: types.StringType,
Validators: []validator.List{
validate.Prefixes(),
},
},
"prefix_length_v4": schema.Int64Attribute{
Description: "prefix length",
Required: true,
Optional: true,
Validators: []validator.Int64{
validate.PrefixLengthV4(),
},
Expand Down

0 comments on commit 871f8ba

Please sign in to comment.