Skip to content

Commit

Permalink
updated Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
3pings committed Jul 27, 2022
1 parent 367e6dd commit 813a35e
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 44 deletions.
Binary file added .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.45.0
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.74.1
hooks:
- id: terraform_fmt
- id: terraform_docs
Expand Down
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,41 @@ module "pwp-edge01" {
```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_spectrocloud"></a> [spectrocloud](#requirement\_spectrocloud) | >= 0.8.3 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_spectrocloud"></a> [spectrocloud](#provider\_spectrocloud) | >= 0.8.3 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [spectrocloud_appliance.this](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/resources/appliance) | resource |
| [spectrocloud_cluster_import.this](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/resources/cluster_import) | resource |
| [spectrocloud_cluster_profile.this](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/cluster_profile) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cluster_profiles"></a> [cluster\_profiles](#input\_cluster\_profiles) | Values for the profile(s) to be used for cluster creation. | <pre>list(object({<br> name = string<br> tag = optional(string)<br> packs = optional(list(object({<br> name = string<br> tag = string<br> values = optional(string)<br> manifest = optional(list(object({<br> name = string<br> tag = string<br> content = string<br> })))<br> })))<br> }))</pre> | n/a | yes |
| <a name="input_cluster_tags"></a> [cluster\_tags](#input\_cluster\_tags) | Tags to be added to the profile. key:value | `list(string)` | `[]` | no |
| <a name="input_edge_server"></a> [edge\_server](#input\_edge\_server) | Values for the attributes of the edge server. | <pre>list(object({<br> name = string<br> uuid = string<br> control_plane = bool<br> }))</pre> | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | Name of the cluster to be created. | `string` | n/a | yes |
| <a name="input_node_labels"></a> [node\_labels](#input\_node\_labels) | A map of labels to use on all nodes. | `map(string)` | `{}` | no |

## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
76 changes: 38 additions & 38 deletions examples/cluster.tf.tf
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
module "pwp-edge01" {
source = "spectrocloud/edge/palette"
# Store Number/Location
name = "pwp-edge"
cluster_tags = [
"vip:10.239.10.10"
]
node_labels = {
location = "pittsburgh"
source = "spectrocloud/edge/palette"
# Store Number/Location
name = "pwp-edge"
cluster_tags = [
"vip:10.239.10.10"
]
node_labels = {
location = "pittsburgh"
}
# List of UUIDs for the devices
edge_server = [
{
name = "pwp-edge-01"
uuid = "9bbe408fb752"
control_plane = true
},
{
name = "pwp-edge-02"
uuid = "7928a5e2544e"
control_plane = false
},
{
name = "pwp-edge-03"
uuid = "ca315a19fd96"
control_plane = false
}
# List of UUIDs for the devices
edge_server = [
]
# Profiles to be added
cluster_profiles = [
{
name = "edge-ubuntu-k3s"
tag = "1.0.0"
packs = [
{
name = "pwp-edge-01"
uuid = "9bbe408fb752"
control_plane = true
},
{
name = "pwp-edge-02"
uuid = "7928a5e2544e"
control_plane = false
},
{
name = "pwp-edge-03"
uuid = "ca315a19fd96"
control_plane = false
name = "prod-ubuntu-k3s"
tag = "1.21.12-k3s0"
values = file(local.value_files["k3s_config"].location)
}
]
# Profiles to be added
cluster_profiles = [
{
name = "edge-ubuntu-k3s"
tag = "1.0.0"
packs = [
{
name = "prod-ubuntu-k3s"
tag = "1.21.12-k3s0"
values = file(local.value_files["k3s_config"].location)
}
]
}
]
]
}
]
}

4 changes: 2 additions & 2 deletions examples/terraform.example.tfvars
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sc_host = ""
sc_api_key = ""
sc_host = ""
sc_api_key = ""
sc_project_name = ""
7 changes: 5 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
variable "edge_server" {
description = "Values for the attributes of the edge server."
type = list(object({
name = string
uuid = string
Expand All @@ -12,14 +13,16 @@ variable "cluster_tags" {
}
variable "node_labels" {
type = map(string)
description = "A map of labels to use on all nodes"
description = "A map of labels to use on all nodes."
default = {}

}
variable "name" {
type = string
type = string
description = "Name of the cluster to be created."
}
variable "cluster_profiles" {
description = "Values for the profile(s) to be used for cluster creation."
type = list(object({
name = string
tag = optional(string)
Expand Down

0 comments on commit 813a35e

Please sign in to comment.