We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 471213d commit 09e236bCopy full SHA for 09e236b
1 file changed
rancher2/resource_rancher2_machine_config_v2.go
@@ -35,11 +35,8 @@ func resourceRancher2MachineConfigV2() *schema.Resource {
35
36
if useInterfaces {
37
subnetID, ok := cfg["vpc_subnet_id"].(string)
38
- if !ok {
39
- // Value is unknown; skip validation to avoid false positives.
40
- return nil
41
- }
42
- if strings.TrimSpace(subnetID) == "" {
+ // Treat missing or non-string values as empty to ensure validation
+ if !ok || strings.TrimSpace(subnetID) == "" {
43
return fmt.Errorf("linode_config.0.vpc_subnet_id must be set when linode_config.0.use_interfaces is true")
44
}
45
} else {
0 commit comments