Skip to content

Commit

Permalink
PLT-1527:Added support custom cloud profile creation. (#556)
Browse files Browse the repository at this point in the history
* PLT-1527:Added support custom cloud profile creation.

* ci fix

* ci fix

* removed edge in description
  • Loading branch information
SivaanandM authored Dec 20, 2024
1 parent 74f7bcc commit 0acb38e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
with:
go-version-file: go.mod

- name: Install Terraform CLI
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false

- name: Ensure reviewable
run: make check-diff

Expand Down
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-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-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 0acb38e

Please sign in to comment.