fix: exclude zero address as for inadmissable cases (#650)
* fix: exclude zero address as for inadmissable cases * fix: review finding
This commit is contained in:
parent
0912ca0246
commit
2ec95dc20f
7 changed files with 61 additions and 9 deletions
|
|
@ -200,7 +200,7 @@ func (r *networkResource) Schema(_ context.Context, _ resource.SchemaRequest, re
|
|||
Optional: true,
|
||||
Computed: true,
|
||||
Validators: []validator.String{
|
||||
validate.IP(),
|
||||
validate.IP(false),
|
||||
},
|
||||
},
|
||||
"ipv4_nameservers": schema.ListAttribute{
|
||||
|
|
@ -252,7 +252,7 @@ func (r *networkResource) Schema(_ context.Context, _ resource.SchemaRequest, re
|
|||
Optional: true,
|
||||
Computed: true,
|
||||
Validators: []validator.String{
|
||||
validate.IP(),
|
||||
validate.IP(false),
|
||||
},
|
||||
},
|
||||
"ipv6_nameservers": schema.ListAttribute{
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ func (r *networkAreaRouteResource) Schema(_ context.Context, _ resource.SchemaRe
|
|||
stringplanmodifier.RequiresReplace(),
|
||||
},
|
||||
Validators: []validator.String{
|
||||
validate.IP(),
|
||||
validate.IP(false),
|
||||
},
|
||||
},
|
||||
"prefix": schema.StringAttribute{
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ func (r *networkInterfaceResource) Schema(_ context.Context, _ resource.SchemaRe
|
|||
Optional: true,
|
||||
Computed: true,
|
||||
Validators: []validator.String{
|
||||
validate.IP(),
|
||||
validate.IP(false),
|
||||
},
|
||||
PlanModifiers: []planmodifier.String{
|
||||
stringplanmodifier.RequiresReplace(),
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ func (r *publicIpResource) Schema(_ context.Context, _ resource.SchemaRequest, r
|
|||
stringplanmodifier.UseStateForUnknown(),
|
||||
},
|
||||
Validators: []validator.String{
|
||||
validate.IP(),
|
||||
validate.IP(false),
|
||||
},
|
||||
},
|
||||
"network_interface_id": schema.StringAttribute{
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ func (r *publicIpAssociateResource) Schema(_ context.Context, _ resource.SchemaR
|
|||
stringplanmodifier.UseStateForUnknown(),
|
||||
},
|
||||
Validators: []validator.String{
|
||||
validate.IP(),
|
||||
validate.IP(false),
|
||||
},
|
||||
},
|
||||
"network_interface_id": schema.StringAttribute{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue