Skip to content

Commit

Permalink
Merge pull request #80 from 3pings/main
Browse files Browse the repository at this point in the history
Added description option to modules.
  • Loading branch information
3pings authored Nov 29, 2021
2 parents f621ca7 + 3937652 commit b2adde0
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 31 deletions.
22 changes: 0 additions & 22 deletions modules/infra_provider/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,6 @@ variable "description" {
default = ""
description = "Description to be used to describe the infrastructure provider policy"
}
# variable "vc_cluster" {
# type = string
# description = "Name of the cluster you wish to make part of this provider within vCenter."
# }
# variable "vc_portgroup" {
# type = list(string)
# description = "Name of the portgroup(s) to be used in this provider"
# }
# variable "vc_datastore" {
# type = string
# description = "Name of the datastore to be used with this provider."
# }
# variable "vc_password" {
# sensitive = true
# type = string
# description = "Password of the account to be used with vCenter. This should be the password for the account used to register vCenter with Intersight."
# }
# variable "vc_resource_pool" {
# type = string
# description = "Name of the resource pool to be used with this provider."
# default = ""
# }
variable "instance_type_moid" {
type = string
description = "MOID of the Instance type mapped to this provider"
Expand Down
1 change: 1 addition & 0 deletions modules/ip_pool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_description"></a> [description](#input\_description) | Description to be used to describe the IP Pool Policy. | `string` | `""` | no |
| <a name="input_gateway"></a> [gateway](#input\_gateway) | Default gateway for this pool. | `string` | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | Name of the IP Pool to be created. | `string` | n/a | yes |
| <a name="input_netmask"></a> [netmask](#input\_netmask) | Subnet Mask for this pool. | `string` | n/a | yes |
Expand Down
3 changes: 2 additions & 1 deletion modules/ip_pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ data "intersight_organization_organization" "this" {

# Supports IPV4 today.
resource "intersight_ippool_pool" "this" {
name = var.name
name = var.name
description = var.description
ip_v4_blocks {
from = var.starting_address
size = var.pool_size
Expand Down
5 changes: 5 additions & 0 deletions modules/ip_pool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ variable "org_name" {
type = string
description = "Intersight Organization name"
}
variable "description" {
type = string
default = ""
description = "Description to be used to describe the IP Pool Policy."
}
variable "name" {
type = string
description = "Name of the IP Pool to be created."
Expand Down
1 change: 1 addition & 0 deletions modules/k8s_network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cni"></a> [cni](#input\_cni) | Supported CNI type. Currently we only support Calico.* Calico - Calico CNI plugin as described in https://github.com/projectcalico/cni-plugin. | `string` | `"Calico"` | no |
| <a name="input_description"></a> [description](#input\_description) | Description to be used to describe the k8s network profile. | `string` | `""` | no |
| <a name="input_org_name"></a> [org\_name](#input\_org\_name) | Intersight Organization name | `string` | n/a | yes |
| <a name="input_pod_cidr"></a> [pod\_cidr](#input\_pod\_cidr) | Pod CIDR Block to be used to assign POD IP Addresses. | `string` | `"100.65.0.0/16"` | no |
| <a name="input_policy_name"></a> [policy\_name](#input\_policy\_name) | Name of the policy. `_Network` and `_pod` will be added to the end of the name for the respective policies to be built. | `string` | n/a | yes |
Expand Down
1 change: 1 addition & 0 deletions modules/k8s_network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resource "intersight_kubernetes_network_policy" "this" {


name = var.policy_name
description = var.description
pod_network_cidr = var.pod_cidr
service_cidr = var.service_cidr
cni_type = var.cni
Expand Down
5 changes: 5 additions & 0 deletions modules/k8s_network/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ variable "org_name" {
type = string
description = "Intersight Organization name"
}
variable "description" {
type = string
default = ""
description = "Description to be used to describe the k8s network profile."
}
variable "policy_name" {
type = string
description = "Name of the policy. `_Network` and `_pod` will be added to the end of the name for the respective policies to be built."
Expand Down
1 change: 1 addition & 0 deletions modules/k8s_sysconfig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_description"></a> [description](#input\_description) | Description to be used to describe the K8s sysconfig profile. | `string` | `""` | no |
| <a name="input_dns_servers"></a> [dns\_servers](#input\_dns\_servers) | DNS Servers to be included in the Network Policy. | `list(string)` | n/a | yes |
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | Domain Name information for DNS search. | `string` | n/a | yes |
| <a name="input_ntp_servers"></a> [ntp\_servers](#input\_ntp\_servers) | NTP Servers to be included in the Network Policy. | `list(string)` | n/a | yes |
Expand Down
1 change: 1 addition & 0 deletions modules/k8s_sysconfig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ data "intersight_organization_organization" "this" {
resource "intersight_kubernetes_sys_config_policy" "this" {

name = var.policy_name
description = var.description
dns_servers = var.dns_servers
ntp_servers = var.ntp_servers
timezone = var.timezone
Expand Down
5 changes: 5 additions & 0 deletions modules/k8s_sysconfig/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ variable "org_name" {
type = string
description = "Intersight Organization name"
}
variable "description" {
type = string
default = ""
description = "Description to be used to describe the K8s sysconfig profile."
}
variable "policy_name" {
type = string
description = "Name of the policy. `_Network` and `_pod` will be added to the end of the name for the respective policies to be built."
Expand Down
1 change: 1 addition & 0 deletions modules/trusted_registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_description"></a> [description](#input\_description) | Description to be used to describe the trusted registry profile. | `string` | `""` | no |
| <a name="input_org_name"></a> [org\_name](#input\_org\_name) | Intersight Organization name | `string` | n/a | yes |
| <a name="input_policy_name"></a> [policy\_name](#input\_policy\_name) | Name of the policy. `_Network` and `_pod` will be added to the end of the name for the respective policies to be built. | `string` | n/a | yes |
| <a name="input_root_ca_registries"></a> [root\_ca\_registries](#input\_root\_ca\_registries) | List of root CA certificates. | `list(string)` | `[]` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/trusted_registry/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resource "intersight_kubernetes_trusted_registries_policy" "this" {


name = var.policy_name
description = var.description
root_ca_registries = var.root_ca_registries
unsigned_registries = var.unsigned_registries
organization {
Expand Down
6 changes: 5 additions & 1 deletion modules/trusted_registry/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ variable "org_name" {
type = string
description = "Intersight Organization name"
}

variable "description" {
type = string
default = ""
description = "Description to be used to describe the trusted registry profile."
}

variable "policy_name" {
type = string
Expand Down
1 change: 1 addition & 0 deletions modules/version/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_description"></a> [description](#input\_description) | Description to be used to describe the k8s version profile. | `string` | `""` | no |
| <a name="input_k8s_version"></a> [k8s\_version](#input\_k8s\_version) | Version of the Kubernetes cluster | `string` | n/a | yes |
| <a name="input_k8s_version_name"></a> [k8s\_version\_name](#input\_k8s\_version\_name) | Name of the policy to be created | `string` | n/a | yes |
| <a name="input_org_name"></a> [org\_name](#input\_org\_name) | Intersight Organization name | `string` | n/a | yes |
Expand Down
3 changes: 2 additions & 1 deletion modules/version/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ data "intersight_kubernetes_version" "this" {
}
resource "intersight_kubernetes_version_policy" "this" {

name = var.k8s_version_name
name = var.k8s_version_name
description = var.description
nr_version {

object_type = "kubernetes.Version"
Expand Down
6 changes: 5 additions & 1 deletion modules/version/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ variable "k8s_version_name" {
type = string
description = "Name of the policy to be created"
}

variable "description" {
type = string
default = ""
description = "Description to be used to describe the k8s version profile."
}
variable "tags" {
type = list(map(string))
default = []
Expand Down
1 change: 1 addition & 0 deletions modules/worker_profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cpu"></a> [cpu](#input\_cpu) | Number of CPU allocated to the virtual machine. | `number` | `4` | no |
| <a name="input_description"></a> [description](#input\_description) | Description to be used to describe the worker profile. | `string` | `""` | no |
| <a name="input_disk_size"></a> [disk\_size](#input\_disk\_size) | Amount of disk to be assigned to the virtual machine in GiB. | `number` | `40` | no |
| <a name="input_memory"></a> [memory](#input\_memory) | Amount of memory assigned to the virtual machine in MiB. | `number` | `16384` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the Worker Profile to be created. i.e small | `string` | n/a | yes |
Expand Down
9 changes: 5 additions & 4 deletions modules/worker_profile/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ data "intersight_organization_organization" "this" {
}
resource "intersight_kubernetes_virtual_machine_instance_type" "this" {

name = var.name
cpu = var.cpu
disk_size = var.disk_size
memory = var.memory
name = var.name
description = var.description
cpu = var.cpu
disk_size = var.disk_size
memory = var.memory
organization {
object_type = "organization.Organization"
moid = data.intersight_organization_organization.this.results.0.moid
Expand Down
6 changes: 5 additions & 1 deletion modules/worker_profile/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ variable "disk_size" {
description = "Amount of disk to be assigned to the virtual machine in GiB."
default = 40
}

variable "description" {
type = string
default = ""
description = "Description to be used to describe the worker profile."
}
variable "tags" {
type = list(map(string))
default = []
Expand Down

0 comments on commit b2adde0

Please sign in to comment.