Skip to content

Commit

Permalink
PLT-1527:Added support custom cloud profile creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Dec 20, 2024
1 parent 74f7bcc commit 09dabf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/resources/cluster_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ Refer to the [Import section](/docs#import) to learn more.

### Optional

- `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`.
- `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`.
- `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).
- `description` (String)
- `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))
Expand Down
13 changes: 7 additions & 6 deletions spectrocloud/resource_cluster_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ func resourceClusterProfile() *schema.Resource {
Optional: true,
},
"cloud": {
Type: schema.TypeString,
Default: "all",
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"all", "aws", "azure", "gcp", "vsphere", "openstack", "maas", "virtual", "baremetal", "eks", "aks", "edge", "edge-native", "tencent", "tke", "generic", "gke"}, false),
ForceNew: true,
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`," +
Type: schema.TypeString,
Default: "all",
Optional: true,
// Removing validation to support custom clouds
// ValidateFunc: validation.StringInSlice([]string{"all", "aws", "azure", "gcp", "vsphere", "openstack", "maas", "virtual", "baremetal", "eks", "aks", "edge", "edge-native", "tencent", "tke", "generic", "gke"}, false),
ForceNew: true,
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`." +
"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`.",
},
"type": {
Expand Down

0 comments on commit 09dabf8

Please sign in to comment.