From 56e49e191eba56bbab651f7d5e376df6d918060e Mon Sep 17 00:00:00 2001 From: dkeightley Date: Mon, 10 Feb 2025 15:36:54 +1300 Subject: [PATCH] Move module to ec2 dir, update docs --- modules/distribution/rke/docs.md | 5 +++-- modules/infra/aws/{ => ec2}/README.md | 8 ++++---- modules/infra/aws/{ => ec2}/data.tf | 0 modules/infra/aws/{ => ec2}/docs.md | 4 ++-- modules/infra/aws/{ => ec2}/main.tf | 0 modules/infra/aws/{ => ec2}/outputs.tf | 0 modules/infra/aws/{ => ec2}/provider.tf | 0 modules/infra/aws/{ => ec2}/variables.tf | 0 modules/infra/aws/{ => ec2}/versions.tf | 0 modules/infra/digitalocean/docs.md | 8 ++++++++ modules/rancher/docs.md | 7 ++++--- recipes/rke/split-roles/aws/docs.md | 4 ++-- recipes/rke/split-roles/aws/main.tf | 4 ++-- recipes/standalone/aws/rke/README.md | 2 +- recipes/standalone/aws/rke/docs.md | 2 +- recipes/standalone/aws/rke/main.tf | 2 +- recipes/upstream/aws/k3s/README.md | 2 +- recipes/upstream/aws/k3s/docs.md | 8 ++++---- recipes/upstream/aws/k3s/main.tf | 6 +++--- recipes/upstream/aws/rke/README.md | 2 +- recipes/upstream/aws/rke2/README.md | 2 +- recipes/upstream/aws/rke2/docs.md | 6 +++--- recipes/upstream/aws/rke2/main.tf | 4 ++-- recipes/upstream/azure/aks/docs.md | 5 +++-- recipes/upstream/digitalocean/rke/docs.md | 12 +++++++++++- recipes/upstream/google-cloud/gke/docs.md | 3 ++- recipes/upstream/vmware/rke/docs.md | 2 ++ tests/modules/infra/aws/README.md | 2 +- tests/modules/infra/aws/main.tf | 6 +++--- 29 files changed, 65 insertions(+), 41 deletions(-) rename modules/infra/aws/{ => ec2}/README.md (91%) rename modules/infra/aws/{ => ec2}/data.tf (100%) rename modules/infra/aws/{ => ec2}/docs.md (98%) rename modules/infra/aws/{ => ec2}/main.tf (100%) rename modules/infra/aws/{ => ec2}/outputs.tf (100%) rename modules/infra/aws/{ => ec2}/provider.tf (100%) rename modules/infra/aws/{ => ec2}/variables.tf (100%) rename modules/infra/aws/{ => ec2}/versions.tf (100%) diff --git a/modules/distribution/rke/docs.md b/modules/distribution/rke/docs.md index a81dce48..922174d3 100644 --- a/modules/distribution/rke/docs.md +++ b/modules/distribution/rke/docs.md @@ -3,14 +3,14 @@ | Name | Version | |------|---------| | [local](#requirement\_local) | >= 2.1.0 | -| [rke](#requirement\_rke) | >= 1.4.3 | +| [rke](#requirement\_rke) | >= 1.7.0 | ## Providers | Name | Version | |------|---------| | [local](#provider\_local) | >= 2.1.0 | -| [rke](#provider\_rke) | >= 1.4.3 | +| [rke](#provider\_rke) | >= 1.7.0 | ## Modules @@ -28,6 +28,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [additional\_hostnames](#input\_additional\_hostnames) | List of additional hostnames and IPs to include in the api server PKI cert | `list(string)` | `null` | no | | [bastion\_host](#input\_bastion\_host) | Bastion host configuration to access the RKE nodes |
object({
address = string
user = string
ssh_key = string
ssh_key_path = string
})
| `null` | no | | [cloud\_provider](#input\_cloud\_provider) | Specify the cloud provider name | `string` | `null` | no | | [cluster\_name](#input\_cluster\_name) | Name for the RKE cluster | `string` | `"rke-demo"` | no | diff --git a/modules/infra/aws/README.md b/modules/infra/aws/ec2/README.md similarity index 91% rename from modules/infra/aws/README.md rename to modules/infra/aws/ec2/README.md index 768097e3..4e79fb3e 100644 --- a/modules/infra/aws/README.md +++ b/modules/infra/aws/ec2/README.md @@ -12,7 +12,7 @@ Documentation can be found [here](./docs.md). ```terraform module "upstream_cluster" { - source = "git::https://github.com/rancherlabs/tf-rancher-up.git//modules/infra/aws" + source = "git::https://github.com/rancherlabs/tf-rancher-up.git//modules/infra/aws/ec2" aws_region = "us-east-1" prefix = "example-rancher" instance_count = 1 @@ -26,7 +26,7 @@ module "upstream_cluster" { ```terraform module "upstream_cluster" { - source = "git::https://github.com/rancherlabs/tf-rancher-up.git//modules/infra/aws" + source = "git::https://github.com/rancherlabs/tf-rancher-up.git//modules/infra/aws/ec2" aws_region = "us-east-1" prefix = "example-rancher" instance_count = 1 @@ -39,11 +39,11 @@ module "upstream_cluster" { ```terraform module "upstream_cluster" { - source = "git::https://github.com/rancherlabs/tf-rancher-up.git//modules/infra/aws" + source = "git::https://github.com/rancherlabs/tf-rancher-up.git//modules/infra/aws/ec2" aws_region = "us-east-1" prefix = "example-rancher" instance_count = 1 vpc_id = "vpc-xxxxx" subnet_id = "subnet-xxxxxx" } -``` +``` \ No newline at end of file diff --git a/modules/infra/aws/data.tf b/modules/infra/aws/ec2/data.tf similarity index 100% rename from modules/infra/aws/data.tf rename to modules/infra/aws/ec2/data.tf diff --git a/modules/infra/aws/docs.md b/modules/infra/aws/ec2/docs.md similarity index 98% rename from modules/infra/aws/docs.md rename to modules/infra/aws/ec2/docs.md index ae96894a..071a4cec 100644 --- a/modules/infra/aws/docs.md +++ b/modules/infra/aws/ec2/docs.md @@ -37,10 +37,10 @@ No modules. | [aws\_secret\_key](#input\_aws\_secret\_key) | AWS secret key used to create AWS infrastructure | `string` | `null` | no | | [bastion\_host](#input\_bastion\_host) | Bastion host configuration to access the instances |
object({
address = string
user = string
ssh_key = string
ssh_key_path = string
})
| `null` | no | | [create\_security\_group](#input\_create\_security\_group) | Should create the security group associated with the instance(s) | `bool` | `true` | no | -| [create\_ssh\_key\_pair](#input\_create\_ssh\_key\_pair) | Specify if a new SSH key pair needs to be created for the instances | `bool` | `false` | no | +| [create\_ssh\_key\_pair](#input\_create\_ssh\_key\_pair) | Specify if a new SSH key pair needs to be created for the instances | `bool` | `true` | no | | [iam\_instance\_profile](#input\_iam\_instance\_profile) | Specify IAM Instance Profile to assign to the instances/nodes | `string` | `null` | no | | [instance\_ami](#input\_instance\_ami) | Override the default SLES or Ubuntu AMI | `string` | `null` | no | -| [instance\_count](#input\_instance\_count) | Number of EC2 instances to create | `number` | `3` | no | +| [instance\_count](#input\_instance\_count) | Number of EC2 instances to create | `number` | `1` | no | | [instance\_disk\_size](#input\_instance\_disk\_size) | Specify root disk size (GB) | `string` | `"80"` | no | | [instance\_security\_group](#input\_instance\_security\_group) | Provide a pre-existing security group ID | `string` | `null` | no | | [instance\_type](#input\_instance\_type) | Instance type used for all EC2 instances | `string` | `"t3.medium"` | no | diff --git a/modules/infra/aws/main.tf b/modules/infra/aws/ec2/main.tf similarity index 100% rename from modules/infra/aws/main.tf rename to modules/infra/aws/ec2/main.tf diff --git a/modules/infra/aws/outputs.tf b/modules/infra/aws/ec2/outputs.tf similarity index 100% rename from modules/infra/aws/outputs.tf rename to modules/infra/aws/ec2/outputs.tf diff --git a/modules/infra/aws/provider.tf b/modules/infra/aws/ec2/provider.tf similarity index 100% rename from modules/infra/aws/provider.tf rename to modules/infra/aws/ec2/provider.tf diff --git a/modules/infra/aws/variables.tf b/modules/infra/aws/ec2/variables.tf similarity index 100% rename from modules/infra/aws/variables.tf rename to modules/infra/aws/ec2/variables.tf diff --git a/modules/infra/aws/versions.tf b/modules/infra/aws/ec2/versions.tf similarity index 100% rename from modules/infra/aws/versions.tf rename to modules/infra/aws/ec2/versions.tf diff --git a/modules/infra/digitalocean/docs.md b/modules/infra/digitalocean/docs.md index 5fc92e64..cfc2efe1 100644 --- a/modules/infra/digitalocean/docs.md +++ b/modules/infra/digitalocean/docs.md @@ -22,6 +22,8 @@ No modules. |------|------| | [digitalocean_droplet.droplet](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/droplet) | resource | | [digitalocean_firewall.k8s_cluster](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/firewall) | resource | +| [digitalocean_loadbalancer.https_loadbalancer](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/loadbalancer) | resource | +| [digitalocean_loadbalancer.k8s_api_loadbalancer](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/loadbalancer) | resource | | [digitalocean_ssh_key.key_pair](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/ssh_key) | resource | | [local_file.private_key_pem](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource | | [tls_private_key.ssh_private_key](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource | @@ -32,9 +34,12 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [create\_https\_loadbalancer](#input\_create\_https\_loadbalancer) | Specify if a loadbalancer for port 443 needs to be created for the instances | `bool` | `false` | no | +| [create\_k8s\_api\_loadbalancer](#input\_create\_k8s\_api\_loadbalancer) | Specify if a loadbalancer for port 6443 needs to be created for the instances | `bool` | `false` | no | | [create\_ssh\_key\_pair](#input\_create\_ssh\_key\_pair) | Specify if a new SSH key pair needs to be created for the instances | `bool` | `false` | no | | [do\_token](#input\_do\_token) | DigitalOcean Authentication Token | `string` | `null` | no | | [droplet\_count](#input\_droplet\_count) | Number of droplets to create | `number` | `3` | no | +| [droplet\_image](#input\_droplet\_image) | Droplet OS Image. Run `doctl compute image list-distribution' for standard OS images or `doctl compute image list` for application images and use the value under the `Slug` header` | `string` | `"ubuntu-24-10-x64"` | no | | [droplet\_size](#input\_droplet\_size) | Size used for all droplets | `string` | `"s-2vcpu-4gb"` | no | | [prefix](#input\_prefix) | Prefix added to names of all resources | `string` | `"rancher-terraform"` | no | | [region](#input\_region) | Region that droplets will be deployed to | `string` | `"sfo3"` | no | @@ -50,8 +55,11 @@ No modules. | Name | Description | |------|-------------| | [dependency](#output\_dependency) | n/a | +| [droplet\_ids](#output\_droplet\_ids) | n/a | | [droplet\_ips](#output\_droplet\_ips) | n/a | | [droplets\_private\_ip](#output\_droplets\_private\_ip) | n/a | | [droplets\_public\_ip](#output\_droplets\_public\_ip) | n/a | +| [https\_loadbalancer\_ip](#output\_https\_loadbalancer\_ip) | n/a | +| [k8s\_api\_loadbalancer\_ip](#output\_k8s\_api\_loadbalancer\_ip) | n/a | | [ssh\_key\_pair\_name](#output\_ssh\_key\_pair\_name) | n/a | | [ssh\_key\_path](#output\_ssh\_key\_path) | n/a | diff --git a/modules/rancher/docs.md b/modules/rancher/docs.md index fc1980a6..d89f79dd 100644 --- a/modules/rancher/docs.md +++ b/modules/rancher/docs.md @@ -53,13 +53,13 @@ No modules. | [kubeconfig\_file](#input\_kubeconfig\_file) | The kubeconfig to use to interact with the cluster | `string` | `"~/.kube/config"` | no | | [rancher\_additional\_helm\_values](#input\_rancher\_additional\_helm\_values) | Helm options to provide to the Rancher helm chart | `list(string)` | `[]` | no | | [rancher\_antiaffinity](#input\_rancher\_antiaffinity) | Value for antiAffinity when installing the Rancher helm chart (required/preferred) | `string` | `"required"` | no | -| [rancher\_bootstrap\_password](#input\_rancher\_bootstrap\_password) | Password to use for bootstrapping Rancher (min 12 characters) | `string` | `"initial-admin-password"` | no | +| [rancher\_bootstrap\_password](#input\_rancher\_bootstrap\_password) | Password to use when bootstrapping Rancher (min 12 characters) | `string` | `"initial-bootstrap-password"` | no | | [rancher\_helm\_repository](#input\_rancher\_helm\_repository) | Helm repository for Rancher chart | `string` | `null` | no | | [rancher\_helm\_repository\_password](#input\_rancher\_helm\_repository\_password) | Private Rancher helm repository password | `string` | `null` | no | | [rancher\_helm\_repository\_username](#input\_rancher\_helm\_repository\_username) | Private Rancher helm repository username | `string` | `null` | no | | [rancher\_hostname](#input\_rancher\_hostname) | Value for hostname when installing the Rancher helm chart | `string` | n/a | yes | | [rancher\_namespace](#input\_rancher\_namespace) | The Rancher release will be deployed to this namespace | `string` | `"cattle-system"` | no | -| [rancher\_password](#input\_rancher\_password) | Password to use for Rancher (min 12 characters) | `string` | `null` | no | +| [rancher\_password](#input\_rancher\_password) | Password for the Rancher admin account (min 12 characters) | `string` | `null` | no | | [rancher\_replicas](#input\_rancher\_replicas) | Value for replicas when installing the Rancher helm chart | `number` | `3` | no | | [rancher\_version](#input\_rancher\_version) | Rancher version to install | `string` | `null` | no | | [registry\_password](#input\_registry\_password) | Private container image registry password | `string` | `null` | no | @@ -74,5 +74,6 @@ No modules. | Name | Description | |------|-------------| | [rancher\_admin\_token](#output\_rancher\_admin\_token) | Rancher API token for the admin user | -| [rancher\_bootstrap\_password](#output\_rancher\_bootstrap\_password) | Password for the Rancher admin account | +| [rancher\_bootstrap\_password](#output\_rancher\_bootstrap\_password) | Password used to install Rancher | | [rancher\_hostname](#output\_rancher\_hostname) | Value for hostname when installing the Rancher helm chart | +| [rancher\_password](#output\_rancher\_password) | Password for the Rancher admin account | diff --git a/recipes/rke/split-roles/aws/docs.md b/recipes/rke/split-roles/aws/docs.md index 8ff76424..f1904cd6 100644 --- a/recipes/rke/split-roles/aws/docs.md +++ b/recipes/rke/split-roles/aws/docs.md @@ -10,9 +10,9 @@ No providers. | Name | Source | Version | |------|--------|---------| -| [master\_nodes](#module\_master\_nodes) | ../../../../modules/infra/aws | n/a | +| [master\_nodes](#module\_master\_nodes) | ../../../../modules/infra/aws/ec2 | n/a | | [rke](#module\_rke) | ../../../../modules/distribution/rke | n/a | -| [worker\_nodes](#module\_worker\_nodes) | ../../../../modules/infra/aws | n/a | +| [worker\_nodes](#module\_worker\_nodes) | ../../../../modules/infra/aws/ec2 | n/a | ## Resources diff --git a/recipes/rke/split-roles/aws/main.tf b/recipes/rke/split-roles/aws/main.tf index 7788f1c0..a5f41cf3 100644 --- a/recipes/rke/split-roles/aws/main.tf +++ b/recipes/rke/split-roles/aws/main.tf @@ -3,7 +3,7 @@ locals { } module "master_nodes" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" prefix = "${var.prefix}-m" instance_count = var.master_nodes_count @@ -33,7 +33,7 @@ module "master_nodes" { } module "worker_nodes" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" prefix = "${var.prefix}-w" instance_count = var.worker_nodes_count diff --git a/recipes/standalone/aws/rke/README.md b/recipes/standalone/aws/rke/README.md index ae7ac039..d99ffd9a 100644 --- a/recipes/standalone/aws/rke/README.md +++ b/recipes/standalone/aws/rke/README.md @@ -70,7 +70,7 @@ This also updates the kube_config generated by RKE. A log file for the RKE provisioning is written to `rke.log` See full argument list for each module in use: - - [AWS](../../../../modules/infra/aws) + - [AWS](../../../../modules/infra/aws/ec2) - [RKE](../../../../modules/distribution/rke) - [Rancher](../../../../modules/rancher) diff --git a/recipes/standalone/aws/rke/docs.md b/recipes/standalone/aws/rke/docs.md index e2d6d01f..1f31b76a 100644 --- a/recipes/standalone/aws/rke/docs.md +++ b/recipes/standalone/aws/rke/docs.md @@ -10,7 +10,7 @@ No providers. | Name | Source | Version | |------|--------|---------| -| [cluster-nodes](#module\_cluster-nodes) | ../../../../modules/infra/aws | n/a | +| [cluster-nodes](#module\_cluster-nodes) | ../../../../modules/infra/aws/ec2 | n/a | | [rke](#module\_rke) | ../../../../modules/distribution/rke | n/a | ## Resources diff --git a/recipes/standalone/aws/rke/main.tf b/recipes/standalone/aws/rke/main.tf index a11f77c9..ad94dd08 100644 --- a/recipes/standalone/aws/rke/main.tf +++ b/recipes/standalone/aws/rke/main.tf @@ -3,7 +3,7 @@ locals { } module "cluster-nodes" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" prefix = var.prefix instance_count = var.instance_count instance_type = var.instance_type diff --git a/recipes/upstream/aws/k3s/README.md b/recipes/upstream/aws/k3s/README.md index 427b01bc..32a76b4e 100644 --- a/recipes/upstream/aws/k3s/README.md +++ b/recipes/upstream/aws/k3s/README.md @@ -57,7 +57,7 @@ terraform destroy -var-file terraform.tfvars The user data automatically sets up each node for use with kubectl (also alias to k) and crictl when logged in. See full argument list for each module in use: - - [AWS](../../../../modules/infra/aws) + - [AWS](../../../../modules/infra/aws/ec2) - [K3S](../../../../modules/distribution/k3s) - [Rancher](../../../../modules/rancher) diff --git a/recipes/upstream/aws/k3s/docs.md b/recipes/upstream/aws/k3s/docs.md index 5ac2b21b..2778100f 100644 --- a/recipes/upstream/aws/k3s/docs.md +++ b/recipes/upstream/aws/k3s/docs.md @@ -8,7 +8,7 @@ | Name | Version | |------|---------| -| [local](#provider\_local) | 2.5.2 | +| [local](#provider\_local) | n/a | | [ssh](#provider\_ssh) | 2.6.0 | ## Modules @@ -16,10 +16,10 @@ | Name | Source | Version | |------|--------|---------| | [k3s\_additional](#module\_k3s\_additional) | ../../../../modules/distribution/k3s | n/a | -| [k3s\_additional\_servers](#module\_k3s\_additional\_servers) | ../../../../modules/infra/aws | n/a | +| [k3s\_additional\_servers](#module\_k3s\_additional\_servers) | ../../../../modules/infra/aws/ec2 | n/a | | [k3s\_first](#module\_k3s\_first) | ../../../../modules/distribution/k3s | n/a | -| [k3s\_first\_server](#module\_k3s\_first\_server) | ../../../../modules/infra/aws | n/a | -| [k3s\_workers](#module\_k3s\_workers) | ../../../../modules/infra/aws | n/a | +| [k3s\_first\_server](#module\_k3s\_first\_server) | ../../../../modules/infra/aws/ec2 | n/a | +| [k3s\_workers](#module\_k3s\_workers) | ../../../../modules/infra/aws/ec2 | n/a | | [rancher\_install](#module\_rancher\_install) | ../../../../modules/rancher | n/a | ## Resources diff --git a/recipes/upstream/aws/k3s/main.tf b/recipes/upstream/aws/k3s/main.tf index 2981602d..ae69d623 100644 --- a/recipes/upstream/aws/k3s/main.tf +++ b/recipes/upstream/aws/k3s/main.tf @@ -14,7 +14,7 @@ module "k3s_first" { } module "k3s_first_server" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" prefix = var.prefix instance_count = 1 instance_type = var.instance_type @@ -43,7 +43,7 @@ module "k3s_additional" { } module "k3s_additional_servers" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" prefix = var.prefix instance_count = var.server_instance_count - 1 instance_type = var.instance_type @@ -64,7 +64,7 @@ module "k3s_additional_servers" { } module "k3s_workers" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" prefix = var.prefix instance_count = var.worker_instance_count instance_type = var.instance_type diff --git a/recipes/upstream/aws/rke/README.md b/recipes/upstream/aws/rke/README.md index ae7ac039..d99ffd9a 100644 --- a/recipes/upstream/aws/rke/README.md +++ b/recipes/upstream/aws/rke/README.md @@ -70,7 +70,7 @@ This also updates the kube_config generated by RKE. A log file for the RKE provisioning is written to `rke.log` See full argument list for each module in use: - - [AWS](../../../../modules/infra/aws) + - [AWS](../../../../modules/infra/aws/ec2) - [RKE](../../../../modules/distribution/rke) - [Rancher](../../../../modules/rancher) diff --git a/recipes/upstream/aws/rke2/README.md b/recipes/upstream/aws/rke2/README.md index 4dd089e5..3b8cccc7 100644 --- a/recipes/upstream/aws/rke2/README.md +++ b/recipes/upstream/aws/rke2/README.md @@ -56,7 +56,7 @@ terraform destroy The user data automatically sets up each node for use with kubectl (also alias to k) and crictl when logged in. See full argument list for each module in use: - - [AWS](../../../../modules/infra/aws) + - [AWS](../../../../modules/infra/aws/ec2) - [RKE2](../../../../modules/distribution/rke2) - [Rancher](../../../../modules/rancher) diff --git a/recipes/upstream/aws/rke2/docs.md b/recipes/upstream/aws/rke2/docs.md index 6626b7db..138e51af 100644 --- a/recipes/upstream/aws/rke2/docs.md +++ b/recipes/upstream/aws/rke2/docs.md @@ -8,7 +8,7 @@ | Name | Version | |------|---------| -| [local](#provider\_local) | 2.5.2 | +| [local](#provider\_local) | n/a | | [ssh](#provider\_ssh) | 2.6.0 | ## Modules @@ -17,9 +17,9 @@ |------|--------|---------| | [rancher\_install](#module\_rancher\_install) | ../../../../modules/rancher | n/a | | [rke2\_additional](#module\_rke2\_additional) | ../../../../modules/distribution/rke2 | n/a | -| [rke2\_additional\_servers](#module\_rke2\_additional\_servers) | ../../../../modules/infra/aws | n/a | +| [rke2\_additional\_servers](#module\_rke2\_additional\_servers) | ../../../../modules/infra/aws/ec2 | n/a | | [rke2\_first](#module\_rke2\_first) | ../../../../modules/distribution/rke2 | n/a | -| [rke2\_first\_server](#module\_rke2\_first\_server) | ../../../../modules/infra/aws | n/a | +| [rke2\_first\_server](#module\_rke2\_first\_server) | ../../../../modules/infra/aws/ec2 | n/a | ## Resources diff --git a/recipes/upstream/aws/rke2/main.tf b/recipes/upstream/aws/rke2/main.tf index 86348b94..c503050a 100644 --- a/recipes/upstream/aws/rke2/main.tf +++ b/recipes/upstream/aws/rke2/main.tf @@ -13,7 +13,7 @@ module "rke2_first" { } module "rke2_first_server" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" prefix = var.prefix instance_count = 1 instance_type = var.instance_type @@ -41,7 +41,7 @@ module "rke2_additional" { } module "rke2_additional_servers" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" prefix = var.prefix instance_count = var.instance_count - 1 instance_type = var.instance_type diff --git a/recipes/upstream/azure/aks/docs.md b/recipes/upstream/azure/aks/docs.md index 5b1837bb..26bfd25a 100644 --- a/recipes/upstream/azure/aks/docs.md +++ b/recipes/upstream/azure/aks/docs.md @@ -39,7 +39,8 @@ | [kube\_config\_filename](#input\_kube\_config\_filename) | Filename to write the kue config | `string` | `null` | no | | [node\_count](#input\_node\_count) | Number of nodes to create in the default node pool | `number` | `3` | no | | [prefix](#input\_prefix) | Prefix added to names of all resources | `string` | `"rancher-terraform"` | no | -| [rancher\_bootstrap\_password](#input\_rancher\_bootstrap\_password) | Password to use for bootstrapping Rancher (min 12 characters) | `string` | `"initial-admin-password"` | no | +| [rancher\_bootstrap\_password](#input\_rancher\_bootstrap\_password) | Password to use when bootstrapping Rancher (min 12 characters) | `string` | `"initial-bootstrap-password"` | no | +| [rancher\_password](#input\_rancher\_password) | Password for the Rancher admin account (min 12 characters) | `string` | `null` | no | | [rancher\_replicas](#input\_rancher\_replicas) | Value for replicas when installing the Rancher helm chart | `number` | `3` | no | | [rancher\_version](#input\_rancher\_version) | Rancher version to install | `string` | `null` | no | | [vm\_size](#input\_vm\_size) | VM Size for the default node pool | `string` | `"Standard_DS2_v2"` | no | @@ -49,6 +50,6 @@ | Name | Description | |------|-------------| -| [rancher\_bootstrap\_password](#output\_rancher\_bootstrap\_password) | n/a | | [rancher\_hostname](#output\_rancher\_hostname) | n/a | +| [rancher\_password](#output\_rancher\_password) | n/a | | [rancher\_url](#output\_rancher\_url) | n/a | diff --git a/recipes/upstream/digitalocean/rke/docs.md b/recipes/upstream/digitalocean/rke/docs.md index 94d2e01a..562d4806 100644 --- a/recipes/upstream/digitalocean/rke/docs.md +++ b/recipes/upstream/digitalocean/rke/docs.md @@ -22,15 +22,22 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [create\_https\_loadbalancer](#input\_create\_https\_loadbalancer) | Specify if a loadbalancer for port 443 needs to be created for the instances | `bool` | `false` | no | +| [create\_k8s\_api\_loadbalancer](#input\_create\_k8s\_api\_loadbalancer) | Specify if a loadbalancer for port 6443 needs to be created for the instances | `bool` | `false` | no | | [create\_ssh\_key\_pair](#input\_create\_ssh\_key\_pair) | Specify if a new SSH key pair needs to be created for the instances | `bool` | `false` | no | | [do\_token](#input\_do\_token) | DigitalOcean Authentication Token | `string` | `null` | no | | [droplet\_count](#input\_droplet\_count) | Number of droplets to create | `number` | `3` | no | +| [droplet\_image](#input\_droplet\_image) | Droplet OS Image. Run `doctl compute image list-distribution' for standard OS images or `doctl compute image list` for application images and use the value under the `Slug` header` | `string` | `"ubuntu-24-10-x64"` | no | | [droplet\_size](#input\_droplet\_size) | Size used for all droplets | `string` | `"s-2vcpu-4gb"` | no | | [kube\_config\_filename](#input\_kube\_config\_filename) | Filename to write the kube config | `string` | `null` | no | | [kube\_config\_path](#input\_kube\_config\_path) | The path to write the kubeconfig for the RKE cluster | `string` | `null` | no | | [kubernetes\_version](#input\_kubernetes\_version) | Kubernetes version to use for the RKE cluster | `string` | `null` | no | | [prefix](#input\_prefix) | Prefix added to names of all resources | `string` | `"rancher-terraform"` | no | -| [rancher\_password](#input\_rancher\_password) | Password to use for bootstrapping Rancher (min 12 characters) | `string` | `"initial-admin-password"` | no | +| [rancher\_bootstrap\_password](#input\_rancher\_bootstrap\_password) | Password to use when bootstrapping Rancher (min 12 characters) | `string` | `"initial-bootstrap-password"` | no | +| [rancher\_helm\_repository](#input\_rancher\_helm\_repository) | Helm repository for Rancher chart | `string` | `null` | no | +| [rancher\_helm\_repository\_password](#input\_rancher\_helm\_repository\_password) | Private Rancher helm repository password | `string` | `null` | no | +| [rancher\_helm\_repository\_username](#input\_rancher\_helm\_repository\_username) | Private Rancher helm repository username | `string` | `null` | no | +| [rancher\_password](#input\_rancher\_password) | Password for the Rancher admin account (min 12 characters) | `string` | `null` | no | | [rancher\_version](#input\_rancher\_version) | Rancher version to install | `string` | `null` | no | | [region](#input\_region) | Region that droplets will be deployed to | `string` | `"sfo3"` | no | | [ssh\_key\_pair\_name](#input\_ssh\_key\_pair\_name) | Specify the SSH key name to use (that's already present in DigitalOcean) | `string` | `null` | no | @@ -45,8 +52,11 @@ No resources. | Name | Description | |------|-------------| +| [droplet\_ids](#output\_droplet\_ids) | n/a | | [droplets\_private\_ip](#output\_droplets\_private\_ip) | n/a | | [droplets\_public\_ip](#output\_droplets\_public\_ip) | n/a | +| [https\_loadbalancer\_ip](#output\_https\_loadbalancer\_ip) | n/a | +| [k8s\_api\_loadbalancer\_ip](#output\_k8s\_api\_loadbalancer\_ip) | n/a | | [rancher\_hostname](#output\_rancher\_hostname) | n/a | | [rancher\_password](#output\_rancher\_password) | n/a | | [ssh\_key\_pair\_name](#output\_ssh\_key\_pair\_name) | n/a | diff --git a/recipes/upstream/google-cloud/gke/docs.md b/recipes/upstream/google-cloud/gke/docs.md index 7191e240..41da6637 100644 --- a/recipes/upstream/google-cloud/gke/docs.md +++ b/recipes/upstream/google-cloud/gke/docs.md @@ -40,8 +40,9 @@ | [kube\_config\_path](#input\_kube\_config\_path) | The path to write the kubeconfig for the RKE cluster | `string` | `null` | no | | [prefix](#input\_prefix) | n/a | `any` | n/a | yes | | [project\_id](#input\_project\_id) | n/a | `any` | n/a | yes | +| [rancher\_bootstrap\_password](#input\_rancher\_bootstrap\_password) | Password to use when bootstrapping Rancher (min 12 characters) | `string` | `"initial-bootstrap-password"` | no | | [rancher\_hostname](#input\_rancher\_hostname) | n/a | `any` | n/a | yes | -| [rancher\_password](#input\_rancher\_password) | n/a | `string` | n/a | yes | +| [rancher\_password](#input\_rancher\_password) | Password for the Rancher admin account (min 12 characters) | `string` | `null` | no | | [rancher\_version](#input\_rancher\_version) | Rancher version to install | `string` | `null` | no | | [region](#input\_region) | Google Region to create the resources | `string` | `"us-west2"` | no | | [waiting\_time](#input\_waiting\_time) | Waiting time (in seconds) | `number` | `120` | no | diff --git a/recipes/upstream/vmware/rke/docs.md b/recipes/upstream/vmware/rke/docs.md index d64ba71a..91ea734f 100644 --- a/recipes/upstream/vmware/rke/docs.md +++ b/recipes/upstream/vmware/rke/docs.md @@ -33,6 +33,8 @@ | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [instance\_count](#input\_instance\_count) | Number of instances to create | `number` | `3` | no | +| [rancher\_bootstrap\_password](#input\_rancher\_bootstrap\_password) | Password to use when bootstrapping Rancher (min 12 characters) | `string` | `"initial-bootstrap-password"` | no | +| [rancher\_password](#input\_rancher\_password) | Password for the Rancher admin account (min 12 characters) | `string` | `null` | no | | [ssh\_private\_key\_path](#input\_ssh\_private\_key\_path) | Add your SSH private key path here. | `any` | n/a | yes | | [vsphere\_datacenter](#input\_vsphere\_datacenter) | vSphere Datacenter details. | `any` | n/a | yes | | [vsphere\_datastore](#input\_vsphere\_datastore) | Datastore used for storing VM data. | `any` | n/a | yes | diff --git a/tests/modules/infra/aws/README.md b/tests/modules/infra/aws/README.md index bb1fa9d2..813ed266 100644 --- a/tests/modules/infra/aws/README.md +++ b/tests/modules/infra/aws/README.md @@ -1 +1 @@ -This directory has code to test the aws infra [module](../../../../modules/infra/aws). +This directory has code to test the aws infra [module](../../../../modules/infra/aws/ec2). \ No newline at end of file diff --git a/tests/modules/infra/aws/main.tf b/tests/modules/infra/aws/main.tf index ab6acd57..030a77d1 100644 --- a/tests/modules/infra/aws/main.tf +++ b/tests/modules/infra/aws/main.tf @@ -1,5 +1,5 @@ module "test1_all_defaults" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" instance_count = 1 create_security_group = false @@ -8,7 +8,7 @@ module "test1_all_defaults" { } module "test2_specify_sg" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" instance_count = 1 create_security_group = false @@ -21,7 +21,7 @@ resource "aws_vpc" "for_test3" { } module "test3_specify_dynamic_vpc" { - source = "../../../../modules/infra/aws" + source = "../../../../modules/infra/aws/ec2" instance_count = 1 create_ssh_key_pair = true