From b5f9e0b553950b52c34b45fcf28bb801831ee8a9 Mon Sep 17 00:00:00 2001 From: nikchern Date: Mon, 4 Sep 2023 08:27:40 -0700 Subject: [PATCH] PLT-655: Documentation update for cluster profile pack schema. (#337) * PLT-655: Documentation update for cluster profile pack schema. * Update spectrocloud/schemas/pack.go Co-authored-by: Karl Cardenas * Update spectrocloud/schemas/pack.go Co-authored-by: Karl Cardenas * Update spectrocloud/schemas/pack.go Co-authored-by: Karl Cardenas * PLT-655: Updating schema to document more attributes. * PLT-655: Refresh docs. --------- Co-authored-by: Karl Cardenas --- docs/data-sources/cluster_profile.md | 8 ++++---- docs/resources/addon_deployment.md | 10 +++++----- docs/resources/cluster_aks.md | 10 +++++----- docs/resources/cluster_aws.md | 10 +++++----- docs/resources/cluster_azure.md | 10 +++++----- docs/resources/cluster_coxedge.md | 10 +++++----- docs/resources/cluster_edge_native.md | 10 +++++----- docs/resources/cluster_edge_vsphere.md | 8 ++++---- docs/resources/cluster_eks.md | 10 +++++----- docs/resources/cluster_gcp.md | 10 +++++----- docs/resources/cluster_import.md | 8 ++++---- docs/resources/cluster_libvirt.md | 10 +++++----- docs/resources/cluster_maas.md | 10 +++++----- docs/resources/cluster_openstack.md | 10 +++++----- docs/resources/cluster_profile.md | 14 +++++++------- docs/resources/cluster_tke.md | 10 +++++----- docs/resources/cluster_vsphere.md | 8 ++++---- docs/resources/virtual_cluster.md | 10 +++++----- spectrocloud/resource_cluster_aks.go | 9 +++++++-- spectrocloud/resource_cluster_attachment.go | 10 ++++++++-- spectrocloud/resource_cluster_aws.go | 9 +++++++-- spectrocloud/resource_cluster_azure.go | 10 +++++++--- spectrocloud/resource_cluster_coxedge.go | 9 +++++++-- spectrocloud/resource_cluster_edge_native.go | 9 +++++++-- spectrocloud/resource_cluster_eks.go | 9 +++++++-- spectrocloud/resource_cluster_gcp.go | 9 +++++++-- spectrocloud/resource_cluster_libvirt.go | 9 +++++++-- spectrocloud/resource_cluster_maas.go | 9 +++++++-- spectrocloud/resource_cluster_openstack.go | 9 +++++++-- spectrocloud/resource_cluster_profile.go | 4 ++-- spectrocloud/resource_cluster_tke.go | 9 +++++++-- spectrocloud/resource_cluster_virtual.go | 9 +++++++-- spectrocloud/schemas/pack.go | 18 ++++++++++-------- 33 files changed, 192 insertions(+), 125 deletions(-) diff --git a/docs/data-sources/cluster_profile.md b/docs/data-sources/cluster_profile.md index 889746b6..eab36371 100644 --- a/docs/data-sources/cluster_profile.md +++ b/docs/data-sources/cluster_profile.md @@ -46,10 +46,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/addon_deployment.md b/docs/resources/addon_deployment.md index 4bb1524c..abe1b774 100644 --- a/docs/resources/addon_deployment.md +++ b/docs/resources/addon_deployment.md @@ -23,7 +23,7 @@ description: |- ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) @@ -52,10 +52,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_aks.md b/docs/resources/cluster_aks.md index 1449e343..5da64e81 100644 --- a/docs/resources/cluster_aks.md +++ b/docs/resources/cluster_aks.md @@ -101,7 +101,7 @@ resource "spectrocloud_cluster_aks" "cluster" { ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `cluster_rbac_binding` (Block List) (see [below for nested schema](#nestedblock--cluster_rbac_binding)) @@ -226,10 +226,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_aws.md b/docs/resources/cluster_aws.md index 1db31094..40731de3 100644 --- a/docs/resources/cluster_aws.md +++ b/docs/resources/cluster_aws.md @@ -132,7 +132,7 @@ resource "spectrocloud_cluster_aws" "cluster" { ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `cluster_rbac_binding` (Block List) (see [below for nested schema](#nestedblock--cluster_rbac_binding)) @@ -256,10 +256,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_azure.md b/docs/resources/cluster_azure.md index 8aadf8bf..7bfd7cbe 100644 --- a/docs/resources/cluster_azure.md +++ b/docs/resources/cluster_azure.md @@ -95,7 +95,7 @@ resource "spectrocloud_cluster_azure" "cluster" { ### Optional -- `apply_setting` (String) Apply setting for the cluster. This can be set to `on_create` or `on_update`. +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `cluster_rbac_binding` (Block List) (see [below for nested schema](#nestedblock--cluster_rbac_binding)) @@ -222,10 +222,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_coxedge.md b/docs/resources/cluster_coxedge.md index 8380940c..f6e99403 100644 --- a/docs/resources/cluster_coxedge.md +++ b/docs/resources/cluster_coxedge.md @@ -24,7 +24,7 @@ description: |- ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `cluster_rbac_binding` (Block List) (see [below for nested schema](#nestedblock--cluster_rbac_binding)) @@ -200,10 +200,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_edge_native.md b/docs/resources/cluster_edge_native.md index 19a16135..1425736b 100644 --- a/docs/resources/cluster_edge_native.md +++ b/docs/resources/cluster_edge_native.md @@ -25,7 +25,7 @@ description: |- ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cloud_account_id` (String) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) @@ -151,10 +151,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_edge_vsphere.md b/docs/resources/cluster_edge_vsphere.md index f691a324..a12f272c 100644 --- a/docs/resources/cluster_edge_vsphere.md +++ b/docs/resources/cluster_edge_vsphere.md @@ -176,10 +176,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_eks.md b/docs/resources/cluster_eks.md index 689ec089..06852e68 100644 --- a/docs/resources/cluster_eks.md +++ b/docs/resources/cluster_eks.md @@ -99,7 +99,7 @@ resource "spectrocloud_cluster_eks" "cluster" { ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `cluster_rbac_binding` (Block List) (see [below for nested schema](#nestedblock--cluster_rbac_binding)) @@ -238,10 +238,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_gcp.md b/docs/resources/cluster_gcp.md index cd9cdb3d..38fab817 100644 --- a/docs/resources/cluster_gcp.md +++ b/docs/resources/cluster_gcp.md @@ -92,7 +92,7 @@ resource "spectrocloud_cluster_gcp" "cluster" { ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `cluster_rbac_binding` (Block List) (see [below for nested schema](#nestedblock--cluster_rbac_binding)) @@ -210,10 +210,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_import.md b/docs/resources/cluster_import.md index a2eb149e..39ff3600 100644 --- a/docs/resources/cluster_import.md +++ b/docs/resources/cluster_import.md @@ -91,10 +91,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_libvirt.md b/docs/resources/cluster_libvirt.md index f4fb16a8..7ca9cac2 100644 --- a/docs/resources/cluster_libvirt.md +++ b/docs/resources/cluster_libvirt.md @@ -25,7 +25,7 @@ description: |- ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cloud_account_id` (String) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) @@ -206,10 +206,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_maas.md b/docs/resources/cluster_maas.md index 25f10434..e8ba3b96 100644 --- a/docs/resources/cluster_maas.md +++ b/docs/resources/cluster_maas.md @@ -100,7 +100,7 @@ resource "spectrocloud_cluster_maas" "cluster" { ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cloud_account_id` (String) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) @@ -237,10 +237,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_openstack.md b/docs/resources/cluster_openstack.md index 37b49e93..1f77cf46 100644 --- a/docs/resources/cluster_openstack.md +++ b/docs/resources/cluster_openstack.md @@ -92,7 +92,7 @@ resource "spectrocloud_cluster_openstack" "cluster" { ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `cluster_rbac_binding` (Block List) (see [below for nested schema](#nestedblock--cluster_rbac_binding)) @@ -215,10 +215,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_profile.md b/docs/resources/cluster_profile.md index 0628d345..37586d35 100644 --- a/docs/resources/cluster_profile.md +++ b/docs/resources/cluster_profile.md @@ -152,13 +152,13 @@ resource "spectrocloud_cluster_profile" "profile" { ### Optional -- `cloud` (String) -- `context` (String) Cluster context can be 'project' or 'tenant' or `system`. Defaults to 'project'. +- `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, nested, baremetal, eks, aks, edge, edge-native, libvirt, tencent, tke, coxedge, 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`. +- `context` (String) The context of the cluster profile. Allowed values are `project` or `tenant`. Default value is `project`. - `description` (String) - `pack` (Block List) (see [below for nested schema](#nestedblock--pack)) - `tags` (Set of String) A list of tags to be applied to the cluster. Tags must be in the form of `key:value`. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) -- `type` (String) +- `type` (String) Specify the cluster profile type to use. Allowed values are `cluster`, infra`, `add-on`, and `system`. These values map to the following User Interface (UI) labels. Use the value ' cluster ' for a **Full** cluster profile.For an Infrastructure cluster profile, use the value `infra`; for an Add-on cluster profile, use the value `add-on`.System cluster profiles can be specified using the value `system`. To learn more about cluster profiles, refer to the [Cluster Profile](https://docs.spectrocloud.com/cluster-profiles) documentation. Default value is `add-on`. - `version` (String) Version of the cluster profile. Defaults to '1.0.0'. ### Read-Only @@ -175,10 +175,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_tke.md b/docs/resources/cluster_tke.md index d413afa2..2f3216af 100644 --- a/docs/resources/cluster_tke.md +++ b/docs/resources/cluster_tke.md @@ -26,7 +26,7 @@ description: |- ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `cluster_rbac_binding` (Block List) (see [below for nested schema](#nestedblock--cluster_rbac_binding)) @@ -147,10 +147,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/cluster_vsphere.md b/docs/resources/cluster_vsphere.md index 4d63a126..a03c8fdd 100644 --- a/docs/resources/cluster_vsphere.md +++ b/docs/resources/cluster_vsphere.md @@ -177,10 +177,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/docs/resources/virtual_cluster.md b/docs/resources/virtual_cluster.md index 25ea39e7..7ec4bbb0 100644 --- a/docs/resources/virtual_cluster.md +++ b/docs/resources/virtual_cluster.md @@ -56,7 +56,7 @@ resource "spectrocloud_virtual_cluster" "cluster" { ### Optional -- `apply_setting` (String) +- `apply_setting` (String) The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. `DownloadAndInstallLater` will only download artifact and postpone install for later. Default value is `DownloadAndInstall`. - `backup_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--backup_policy)) - `cloud_config` (Block List, Max: 1) (see [below for nested schema](#nestedblock--cloud_config)) - `cluster_group_uid` (String) @@ -135,10 +135,10 @@ Required: Optional: - `manifest` (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack--manifest)) -- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. -- `tag` (String) The tag of the pack. The tag is the version of the pack. -- `type` (String) The type of the pack. The default value is `spectro`. -- `uid` (String) +- `registry_uid` (String) The registry UID of the pack. The registry UID is the unique identifier of the registry. This attribute is required if there is more than one registry that contains a pack with the same name. +- `tag` (String) The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. +- `type` (String) The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`. +- `uid` (String) The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`. - `values` (String) The values of the pack. The values are the configuration values of the pack. The values are specified in YAML format. diff --git a/spectrocloud/resource_cluster_aks.go b/spectrocloud/resource_cluster_aks.go index 7eef4aec..b7e16de8 100644 --- a/spectrocloud/resource_cluster_aks.go +++ b/spectrocloud/resource_cluster_aks.go @@ -56,8 +56,13 @@ func resourceClusterAks() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_attachment.go b/spectrocloud/resource_cluster_attachment.go index d49dfdfe..5c7fe0c1 100644 --- a/spectrocloud/resource_cluster_attachment.go +++ b/spectrocloud/resource_cluster_attachment.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/spectrocloud/hapi/models" "github.com/spectrocloud/palette-sdk-go/client" @@ -41,8 +42,13 @@ func resourceAddonDeployment() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, }, } diff --git a/spectrocloud/resource_cluster_aws.go b/spectrocloud/resource_cluster_aws.go index 7464fa60..cbec77d6 100644 --- a/spectrocloud/resource_cluster_aws.go +++ b/spectrocloud/resource_cluster_aws.go @@ -56,8 +56,13 @@ func resourceClusterAws() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_azure.go b/spectrocloud/resource_cluster_azure.go index 9f1a1fe3..3f16e47a 100644 --- a/spectrocloud/resource_cluster_azure.go +++ b/spectrocloud/resource_cluster_azure.go @@ -56,9 +56,13 @@ func resourceClusterAzure() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, - Description: "Apply setting for the cluster. This can be set to `on_create` or `on_update`.", + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_coxedge.go b/spectrocloud/resource_cluster_coxedge.go index cd234ab5..65ced376 100644 --- a/spectrocloud/resource_cluster_coxedge.go +++ b/spectrocloud/resource_cluster_coxedge.go @@ -54,8 +54,13 @@ func resourceClusterCoxEdge() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_edge_native.go b/spectrocloud/resource_cluster_edge_native.go index 5195cf5a..8c0950cd 100644 --- a/spectrocloud/resource_cluster_edge_native.go +++ b/spectrocloud/resource_cluster_edge_native.go @@ -55,8 +55,13 @@ func resourceClusterEdgeNative() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_eks.go b/spectrocloud/resource_cluster_eks.go index e30c6325..1b32f4d5 100644 --- a/spectrocloud/resource_cluster_eks.go +++ b/spectrocloud/resource_cluster_eks.go @@ -56,8 +56,13 @@ func resourceClusterEks() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_gcp.go b/spectrocloud/resource_cluster_gcp.go index 107859af..8b5c32c9 100644 --- a/spectrocloud/resource_cluster_gcp.go +++ b/spectrocloud/resource_cluster_gcp.go @@ -55,8 +55,13 @@ func resourceClusterGcp() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_libvirt.go b/spectrocloud/resource_cluster_libvirt.go index 627690cc..ac6f9d8e 100644 --- a/spectrocloud/resource_cluster_libvirt.go +++ b/spectrocloud/resource_cluster_libvirt.go @@ -57,8 +57,13 @@ func resourceClusterLibvirt() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_maas.go b/spectrocloud/resource_cluster_maas.go index 3a2dd835..59e41d80 100644 --- a/spectrocloud/resource_cluster_maas.go +++ b/spectrocloud/resource_cluster_maas.go @@ -55,8 +55,13 @@ func resourceClusterMaas() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_openstack.go b/spectrocloud/resource_cluster_openstack.go index 67b581b6..32899335 100644 --- a/spectrocloud/resource_cluster_openstack.go +++ b/spectrocloud/resource_cluster_openstack.go @@ -55,8 +55,13 @@ func resourceClusterOpenStack() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_profile.go b/spectrocloud/resource_cluster_profile.go index 0d966f29..6ec188f2 100644 --- a/spectrocloud/resource_cluster_profile.go +++ b/spectrocloud/resource_cluster_profile.go @@ -77,8 +77,8 @@ func resourceClusterProfile() *schema.Resource { Optional: true, Default: "add-on", ValidateFunc: validation.StringInSlice([]string{"add-on", "cluster", "infra", "system"}, false), - Description: "Specify the cluster profile type to use. Allowed values are `cluster`, infra`, `add-on`, and `system`. These values map to the following User Interface (UI) labels. Use the value ' cluster ' for a **Full** cluster profile." + "For an Infrastructure cluster profile, use the value `infra`; for an Add-on cluster profile, use the value `add-on`." + "System cluster profiles can be specified using the value `system`. To learn more about cluster profiles, refer to the [Cluster Profile](https://docs.spectrocloud.com/cluster-profiles) documentation. Default value is `add-on`.", - ForceNew: true, + Description: "Specify the cluster profile type to use. Allowed values are `cluster`, infra`, `add-on`, and `system`. These values map to the following User Interface (UI) labels. Use the value ' cluster ' for a **Full** cluster profile." + "For an Infrastructure cluster profile, use the value `infra`; for an Add-on cluster profile, use the value `add-on`." + "System cluster profiles can be specified using the value `system`. To learn more about cluster profiles, refer to the [Cluster Profile](https://docs.spectrocloud.com/cluster-profiles) documentation. Default value is `add-on`.", + ForceNew: true, }, "pack": schemas.PackSchema(), }, diff --git a/spectrocloud/resource_cluster_tke.go b/spectrocloud/resource_cluster_tke.go index cfac1436..bd0257bc 100644 --- a/spectrocloud/resource_cluster_tke.go +++ b/spectrocloud/resource_cluster_tke.go @@ -54,8 +54,13 @@ func resourceClusterTke() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_account_id": { Type: schema.TypeString, diff --git a/spectrocloud/resource_cluster_virtual.go b/spectrocloud/resource_cluster_virtual.go index 2c993f86..41ca8127 100644 --- a/spectrocloud/resource_cluster_virtual.go +++ b/spectrocloud/resource_cluster_virtual.go @@ -96,8 +96,13 @@ func resourceClusterVirtual() *schema.Resource { }, "cluster_profile": schemas.ClusterProfileSchema(), "apply_setting": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Default: "DownloadAndInstall", + ValidateFunc: validation.StringInSlice([]string{"DownloadAndInstall", "DownloadAndInstallLater"}, false), + Description: "The setting to apply the cluster profile. `DownloadAndInstall` will download and install packs in one action. " + + "`DownloadAndInstallLater` will only download artifact and postpone install for later. " + + "Default value is `DownloadAndInstall`.", }, "cloud_config_id": { Type: schema.TypeString, diff --git a/spectrocloud/schemas/pack.go b/spectrocloud/schemas/pack.go index 877ccdd2..d801d439 100644 --- a/spectrocloud/schemas/pack.go +++ b/spectrocloud/schemas/pack.go @@ -13,15 +13,16 @@ func PackSchema() *schema.Schema { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "uid": { - Type: schema.TypeString, - Computed: true, - Optional: true, + Type: schema.TypeString, + Computed: true, + Optional: true, + Description: "The unique identifier of the pack. The value can be looked up using the [`spectrocloud_pack`](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) data source. This value is required if the pack type is `spectro`.", }, "type": { Type: schema.TypeString, Optional: true, Default: "spectro", - Description: "The type of the pack. The default value is `spectro`.", + Description: "The type of the pack. Allowed values are `spectro`, `manifest` or `helm`. The default value is `spectro`.", }, "name": { Type: schema.TypeString, @@ -29,14 +30,15 @@ func PackSchema() *schema.Schema { Description: "The name of the pack. The name must be unique within the cluster profile. ", }, "registry_uid": { - Type: schema.TypeString, - Optional: true, - Description: "The registry UID of the pack. The registry UID is the unique identifier of the registry. ", + Type: schema.TypeString, + Optional: true, + Description: "The registry UID of the pack. The registry UID is the unique identifier of the registry. " + + "This attribute is required if there is more than one registry that contains a pack with the same name. ", }, "tag": { Type: schema.TypeString, Optional: true, - Description: "The tag of the pack. The tag is the version of the pack.", + Description: "The tag of the pack. The tag is the version of the pack. This attribute is required if the pack type is `spectro` or `helm`. ", }, "values": { Type: schema.TypeString,