diff --git a/docs/resources/cluster_azure.md b/docs/resources/cluster_azure.md index fd4c457a..4071ff9f 100644 --- a/docs/resources/cluster_azure.md +++ b/docs/resources/cluster_azure.md @@ -131,6 +131,40 @@ Required: - `ssh_key` (String) SSH key to be used for the cluster nodes. - `subscription_id` (String) Azure subscription ID. This can be found in the Azure portal under `Subscriptions`. +Optional: + +- `control_plane_subnet` (Block List, Max: 1) (see [below for nested schema](#nestedblock--cloud_config--control_plane_subnet)) +- `network_resource_group` (String) Azure network resource group in which the cluster is to be provisioned. +- `virtual_network_cidr_block` (String) Azure virtual network cidr block in which the cluster is to be provisioned. +- `virtual_network_name` (String) Azure virtual network in which the cluster is to be provisioned. +- `worker_node_subnet` (Block List, Max: 1) (see [below for nested schema](#nestedblock--cloud_config--worker_node_subnet)) + + +### Nested Schema for `cloud_config.control_plane_subnet` + +Required: + +- `cidr_block` (String) CidrBlock is the CIDR block to be used when the provider creates a managed virtual network. +- `name` (String) Name of the subnet. + +Optional: + +- `security_group_name` (String) Network Security Group(NSG) to be attached to subnet. + + + +### Nested Schema for `cloud_config.worker_node_subnet` + +Required: + +- `cidr_block` (String) CidrBlock is the CIDR block to be used when the provider creates a managed virtual network. +- `name` (String) Name of the subnet. + +Optional: + +- `security_group_name` (String) Network Security Group(NSG) to be attached to subnet. + + ### Nested Schema for `machine_pool` diff --git a/docs/resources/cluster_group.md b/docs/resources/cluster_group.md index a7391409..342f4327 100644 --- a/docs/resources/cluster_group.md +++ b/docs/resources/cluster_group.md @@ -51,6 +51,7 @@ resource "spectrocloud_cluster_group" "cg" { ### Optional +- `cluster_profile` (Block List) (see [below for nested schema](#nestedblock--cluster_profile)) - `clusters` (Block List) A list of clusters to include in the cluster group. (see [below for nested schema](#nestedblock--clusters)) - `context` (String) The context of the Cluster group. Allowed values are `project` or `tenant`. Defaults to `tenant`. 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). - `tags` (Set of String) A list of tags to be applied to the cluster group. Tags must be in the form of `key:value`. @@ -73,6 +74,48 @@ Optional: - `values` (String) + +### Nested Schema for `cluster_profile` + +Required: + +- `id` (String) The ID of the cluster profile. + +Optional: + +- `pack` (Block List) For packs of type `spectro`, `helm`, and `manifest`, at least one pack must be specified. (see [below for nested schema](#nestedblock--cluster_profile--pack)) + + +### Nested Schema for `cluster_profile.pack` + +Required: + +- `name` (String) The name of the pack. The name must be unique within the cluster profile. + +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. 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. + + +### Nested Schema for `cluster_profile.pack.manifest` + +Required: + +- `content` (String) The content of the manifest. The content is the YAML content of the manifest. +- `name` (String) The name of the manifest. The name must be unique within the pack. + +Read-Only: + +- `uid` (String) + + + + ### Nested Schema for `clusters` diff --git a/examples/resources/spectrocloud_cluster_azure/resource.tf b/examples/resources/spectrocloud_cluster_azure/resource.tf index 50c889c5..2c2d01dc 100644 --- a/examples/resources/spectrocloud_cluster_azure/resource.tf +++ b/examples/resources/spectrocloud_cluster_azure/resource.tf @@ -20,19 +20,19 @@ resource "spectrocloud_cluster_azure" "cluster" { ssh_key = var.cluster_ssh_public_key //Static placement config -# network_resource_group = "test-resource-group" -# virtual_network_name = "test-network-name" -# virtual_network_cidr_block = "10.0.0.9/10" -# control_plane_subnet { -# name="cp_subnet_name" -# cidr_block="10.0.0.9/16" -# security_group_name="cp_subnet_security_name" -# } -# worker_node_subnet { -# name="worker_subnet_name" -# cidr_block="10.0.0.9/16" -# security_group_name="worker_subnet_security_name" -# } + # network_resource_group = "test-resource-group" + # virtual_network_name = "test-network-name" + # virtual_network_cidr_block = "10.0.0.9/10" + # control_plane_subnet { + # name="cp_subnet_name" + # cidr_block="10.0.0.9/16" + # security_group_name="cp_subnet_security_name" + # } + # worker_node_subnet { + # name="worker_subnet_name" + # cidr_block="10.0.0.9/16" + # security_group_name="worker_subnet_security_name" + # } }