|
| 1 | +# Hello Universe TF |
| 2 | + |
| 3 | +This folder contains the demo code for the [Deploy App Workloads with a PCG](https://docs.spectrocloud.com/clusters/pcg/deploy-app-pcg) tutorial. Use the code in this directory with the tutorial. |
| 4 | + |
| 5 | +To get started, review the [prerequisites](#prerequisites). Next, follow the steps in the tutorial to deploy a VMware cluster and add-on pack. |
| 6 | +Use the [terraform.tfvars](./terraform.tfvars) file to provide the required variables. |
| 7 | + |
| 8 | +## Prerequisites |
| 9 | + |
| 10 | +You will need the following items before getting started: |
| 11 | + |
| 12 | +1. A Palette API key. |
| 13 | +2. A VMware PCG added to your Palette account. |
| 14 | +3. A public SSH key that will be used to access the cluster nodes. If not provided, a new key pair will be generated. |
| 15 | + |
| 16 | +> [!NOTE] |
| 17 | +> This Terraform code will deploy the resources specified in the template to **VMware vSphere**. |
| 18 | +
|
| 19 | +## Requirements |
| 20 | + |
| 21 | +| Name | Version | |
| 22 | +| --------------------------------------------------------------------------------- | --------- | |
| 23 | +| <a name="requirement_local"></a> [local](#requirement_local) | 2.4.1 | |
| 24 | +| <a name="requirement_spectrocloud"></a> [spectrocloud](#requirement_spectrocloud) | >= 0.16.1 | |
| 25 | +| <a name="requirement_tls"></a> [tls](#requirement_tls) | 4.0.4 | |
| 26 | +| <a name="requirement_vsphere"></a> [vsphere](#requirement_vsphere) | >= 2.6.1 | |
| 27 | + |
| 28 | +## Providers |
| 29 | + |
| 30 | +| Name | Version | |
| 31 | +| --------------------------------------------------------------------------- | ------- | |
| 32 | +| <a name="provider_local"></a> [local](#provider_local) | 2.4.1 | |
| 33 | +| <a name="provider_spectrocloud"></a> [spectrocloud](#provider_spectrocloud) | 0.17.4 | |
| 34 | +| <a name="provider_tls"></a> [tls](#provider_tls) | 4.0.4 | |
| 35 | + |
| 36 | +## Modules |
| 37 | + |
| 38 | +No modules. |
| 39 | + |
| 40 | +## Resources |
| 41 | + |
| 42 | +| Name | Type | |
| 43 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | |
| 44 | +| [local_file.public_key_file](https://registry.terraform.io/providers/hashicorp/local/2.4.1/docs/resources/file) | resource | |
| 45 | +| [local_sensitive_file.private_key_file](https://registry.terraform.io/providers/hashicorp/local/2.4.1/docs/resources/sensitive_file) | resource | |
| 46 | +| [spectrocloud_cluster_profile.profile](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/resources/cluster_profile) | resource | |
| 47 | +| [spectrocloud_cluster_vsphere.cluster](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/resources/cluster_vsphere) | resource | |
| 48 | +| [tls_private_key.tutorial_ssh_key](https://registry.terraform.io/providers/hashicorp/tls/4.0.4/docs/resources/private_key) | resource | |
| 49 | +| [spectrocloud_cloudaccount_vsphere.account](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/cloudaccount_vsphere) | data source | |
| 50 | +| [spectrocloud_pack.cni](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | |
| 51 | +| [spectrocloud_pack.csi](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | |
| 52 | +| [spectrocloud_pack.hellouniverse](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | |
| 53 | +| [spectrocloud_pack.k8s](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | |
| 54 | +| [spectrocloud_pack.metallb](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | |
| 55 | +| [spectrocloud_pack.ubuntu](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | |
| 56 | +| [spectrocloud_registry.community_registry](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/registry) | data source | |
| 57 | +| [spectrocloud_registry.public_registry](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/registry) | data source | |
| 58 | + |
| 59 | +## Inputs |
| 60 | + |
| 61 | +| Name | Description | Type | Default | Required | |
| 62 | +| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------: | |
| 63 | +| <a name="input_cluster_name"></a> [cluster_name](#input_cluster_name) | The name of the cluster. | `string` | `"pcg-tutorial-cluster"` | no | |
| 64 | +| <a name="input_cluster_profile_description"></a> [cluster_profile_description](#input_cluster_profile_description) | Provide a description of the cluster profile. | `string` | `"My cluster profile as part of the PCG tutorial."` | no | |
| 65 | +| <a name="input_cluster_profile_name"></a> [cluster_profile_name](#input_cluster_profile_name) | The name of the cluster profile. | `string` | `"pcg-tutorial-profile"` | no | |
| 66 | +| <a name="input_datacenter_name"></a> [datacenter_name](#input_datacenter_name) | The name of the datacenter in vSphere.. | `string` | n/a | yes | |
| 67 | +| <a name="input_datastore_name"></a> [datastore_name](#input_datastore_name) | The name of the vSphere datastore. | `string` | n/a | yes | |
| 68 | +| <a name="input_folder_name"></a> [folder_name](#input_folder_name) | The name of the folder in vSphere. | `string` | n/a | yes | |
| 69 | +| <a name="input_metallb_ip"></a> [metallb_ip](#input_metallb_ip) | The IP address range for your MetalLB Load Balancer. | `string` | n/a | yes | |
| 70 | +| <a name="input_network_name"></a> [network_name](#input_network_name) | The name of the vSphere network. | `string` | n/a | yes | |
| 71 | +| <a name="input_pcg_name"></a> [pcg_name](#input_pcg_name) | The name of the PCG. | `string` | n/a | yes | |
| 72 | +| <a name="input_resource_pool_name"></a> [resource_pool_name](#input_resource_pool_name) | The name of the vSphere resource pool. | `string` | n/a | yes | |
| 73 | +| <a name="input_search_domain"></a> [search_domain](#input_search_domain) | The name of network search domain. | `string` | n/a | yes | |
| 74 | +| <a name="input_ssh_key"></a> [ssh_key](#input_ssh_key) | The path to the public key that will be added to the cluster nodes. If not provided, a new key pair will be generated. | `string` | n/a | yes | |
| 75 | +| <a name="input_ssh_key_private"></a> [ssh_key_private](#input_ssh_key_private) | The path to the private key that will be used to access the cluster nodes. If not provided, a new key pair will be generated. | `string` | n/a | yes | |
| 76 | +| <a name="input_tags"></a> [tags](#input_tags) | The default tags to apply to Palette resources | `list(string)` | <pre>[<br> "spectro-cloud-education",<br> "app:hello-universe",<br> "terraform_managed:true",<br> "repository:spectrocloud:tutorials",<br> "tutorial:DEPLOY_APP_WORKLOADS_WITH_A_PCG"<br>]</pre> | no | |
| 77 | +| <a name="input_vsphere_cluster"></a> [vsphere_cluster](#input_vsphere_cluster) | The name of your vSphere cluster. | `string` | n/a | yes | |
| 78 | + |
| 79 | +## Outputs |
| 80 | + |
| 81 | +| Name | Description | |
| 82 | +| -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | |
| 83 | +| <a name="output_Advisory"></a> [Advisory](#output_Advisory) | n/a | |
| 84 | +| <a name="output_ssh_connection_command"></a> [ssh_connection_command](#output_ssh_connection_command) | Command to use the generated private SSH key to access the nodes. | |
| 85 | +| <a name="output_ssh_connection_command_user"></a> [ssh_connection_command_user](#output_ssh_connection_command_user) | Command to use the user's private SSH key to access the nodes. | |
| 86 | +| <a name="output_ssh_key_location"></a> [ssh_key_location](#output_ssh_key_location) | Location of the generated private SSH key file | |
| 87 | +| <a name="output_ssh_public_key_location"></a> [ssh_public_key_location](#output_ssh_public_key_location) | Location of the generated public SSH key file | |
0 commit comments