Skip to content

Commit

Permalink
Verify that project_id contains a value
Browse files Browse the repository at this point in the history
Empty project id is meaningless and also crashes the provider.

Signed-off-by: Kobi Samoray <[email protected]>
  • Loading branch information
ksamoray committed Dec 13, 2023
1 parent 62ef273 commit c780664
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nsxt/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,11 @@ func getContextSchema() *schema.Schema {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"project_id": {
Type: schema.TypeString,
Description: "Id of the project which the resource belongs to.",
Required: true,
ForceNew: true,
Type: schema.TypeString,
Description: "Id of the project which the resource belongs to.",
Required: true,
ForceNew: true,
ValidateFunc: validation.StringIsNotEmpty,
},
},
},
Expand Down

0 comments on commit c780664

Please sign in to comment.