Skip to content

Commit 09dabf8

Browse files
committed
PLT-1527:Added support custom cloud profile creation.
1 parent 74f7bcc commit 09dabf8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/resources/cluster_profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ Refer to the [Import section](/docs#import) to learn more.
379379

380380
### Optional
381381

382-
- `cloud` (String) Specify the infrastructure provider the cluster profile is for. Only Palette supported infrastructure providers can be used. The supported cloud types are - `all, aws, azure, gcp, vsphere, openstack, maas, virtual, baremetal, eks, aks, edge, edge-native, tencent, tke, generic, and gke`,If the value is set to `all`, then the type must be set to `add-on`. Otherwise, the cluster profile may be incompatible with other providers. Default value is `all`.
382+
- `cloud` (String) Specify the infrastructure provider the cluster profile is for. Only Palette supported infrastructure providers can be used. The supported cloud types are - `all, aws, azure, gcp, vsphere, openstack, maas, virtual, baremetal, eks, aks, edge, edge-native, tencent, tke, generic, and gke` or any custom cloud provider registered in Palette, e.g., `nutanix`.If the value is set to `all`, then the type must be set to `add-on`. Otherwise, the cluster profile may be incompatible with other providers. Default value is `all`.
383383
- `context` (String) The context of the cluster profile. Allowed values are `project` or `tenant`. Default value is `project`. If the `project` context is specified, the project name will sourced from the provider configuration parameter [`project_name`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs#schema).
384384
- `description` (String)
385385
- `pack` (Block List) For packs of type `spectro`, `helm`, and `manifest`, at least one pack must be specified. (see [below for nested schema](#nestedblock--pack))

spectrocloud/resource_cluster_profile.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ func resourceClusterProfile() *schema.Resource {
7070
Optional: true,
7171
},
7272
"cloud": {
73-
Type: schema.TypeString,
74-
Default: "all",
75-
Optional: true,
76-
ValidateFunc: validation.StringInSlice([]string{"all", "aws", "azure", "gcp", "vsphere", "openstack", "maas", "virtual", "baremetal", "eks", "aks", "edge", "edge-native", "tencent", "tke", "generic", "gke"}, false),
77-
ForceNew: true,
78-
Description: "Specify the infrastructure provider the cluster profile is for. Only Palette supported infrastructure providers can be used. The supported cloud types are - `all, aws, azure, gcp, vsphere, openstack, maas, virtual, baremetal, eks, aks, edge, edge-native, tencent, tke, generic, and gke`," +
73+
Type: schema.TypeString,
74+
Default: "all",
75+
Optional: true,
76+
// Removing validation to support custom clouds
77+
// ValidateFunc: validation.StringInSlice([]string{"all", "aws", "azure", "gcp", "vsphere", "openstack", "maas", "virtual", "baremetal", "eks", "aks", "edge", "edge-native", "tencent", "tke", "generic", "gke"}, false),
78+
ForceNew: true,
79+
Description: "Specify the infrastructure provider the cluster profile is for. Only Palette supported infrastructure providers can be used. The supported cloud types are - `all, aws, azure, gcp, vsphere, openstack, maas, virtual, baremetal, eks, aks, edge, edge-native, tencent, tke, generic, and gke` or any custom cloud provider registered in Palette, e.g., `nutanix`." +
7980
"If the value is set to `all`, then the type must be set to `add-on`. Otherwise, the cluster profile may be incompatible with other providers. Default value is `all`.",
8081
},
8182
"type": {

0 commit comments

Comments
 (0)