Skip to content

Commit

Permalink
PLT-879: removed default value for azure azs (#388)
Browse files Browse the repository at this point in the history
* PLT-879: removed default value for azure azs

* MAAS cluster added default value to resource pool

* changed azs to optional field

* Update spectrocloud/resource_cluster_maas.go

Co-authored-by: nikchern <[email protected]>

---------

Co-authored-by: nikchern <[email protected]>
  • Loading branch information
SivaanandM and nikchern authored Dec 8, 2023
1 parent 71a6e5b commit f524376
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spectrocloud/resource_cluster_azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func resourceClusterAzure() *schema.Resource {
},
"azs": {
Type: schema.TypeSet,
Required: true,
Optional: true,
Set: schema.HashString,
Elem: &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 3 additions & 0 deletions spectrocloud/resource_cluster_maas.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,9 @@ func toMachinePoolMaas(machinePool interface{}) (*models.V1MaasMachinePoolConfig
if len(m["placement"].([]interface{})) > 0 {
Placement := m["placement"].([]interface{})[0].(map[string]interface{})
mp.CloudConfig.ResourcePool = types.Ptr(Placement["resource_pool"].(string))
} else {
rp := ""
mp.CloudConfig.ResourcePool = &rp // backend is not accepting nil, rather pointer to empty string.
}

if !controlPlane {
Expand Down

0 comments on commit f524376

Please sign in to comment.