From 15ed5e7ffe6c8ea09d0a19936e1009088c3a8e40 Mon Sep 17 00:00:00 2001 From: caerulescens Date: Tue, 3 Sep 2024 20:42:48 -0400 Subject: [PATCH] test(fix): remove module so `terragrunt` will initialize correctly --- main.tf | 7 +- modules/minikube_cluster/README.md | 1 - modules/minikube_cluster/main.tf | 112 ---- modules/minikube_cluster/outputs.tf | 27 - modules/minikube_cluster/variables.tf | 704 -------------------------- outputs.tf | 2 +- 6 files changed, 5 insertions(+), 848 deletions(-) delete mode 100644 modules/minikube_cluster/README.md delete mode 100644 modules/minikube_cluster/main.tf delete mode 100644 modules/minikube_cluster/outputs.tf delete mode 100644 modules/minikube_cluster/variables.tf diff --git a/main.tf b/main.tf index 2ae4bdc..e70bb86 100644 --- a/main.tf +++ b/main.tf @@ -8,10 +8,11 @@ terraform { } } -module "minikube_cluster" { +# todo: 'auto_pause_interval' missing completions? +# todo: 'gpus' missing completions? +# todo: 'output' missing completion? +resource "minikube_cluster" "default" { for_each = var.minikube_clusters - source = "./modules/minikube_cluster" - providers = { minikube = minikube } addons = each.value.addons apiserver_ips = each.value.apiserver_ips apiserver_name = each.value.apiserver_name diff --git a/modules/minikube_cluster/README.md b/modules/minikube_cluster/README.md deleted file mode 100644 index 7f9553a..0000000 --- a/modules/minikube_cluster/README.md +++ /dev/null @@ -1 +0,0 @@ -# tofu-module-minikube Minikube Cluster diff --git a/modules/minikube_cluster/main.tf b/modules/minikube_cluster/main.tf deleted file mode 100644 index a6d0693..0000000 --- a/modules/minikube_cluster/main.tf +++ /dev/null @@ -1,112 +0,0 @@ -terraform { - required_version = ">= 1.7.0" - required_providers { - minikube = { - source = "scott-the-programmer/minikube" - version = ">= 0.3.10" - } - } -} - -# todo: 'auto_pause_interval' missing completions? -# todo: 'gpus' missing completions? -# todo: 'output' missing completion? -resource "minikube_cluster" "default" { - addons = var.addons - apiserver_ips = var.apiserver_ips - apiserver_name = var.apiserver_name - apiserver_names = var.apiserver_names - apiserver_port = var.apiserver_port - auto_pause_interval = var.auto_pause_interval - auto_update_drivers = var.auto_update_drivers - base_image = var.base_image - binary_mirror = var.binary_mirror - cache_images = var.cache_images - cert_expiration = var.cert_expiration - cluster_name = var.cluster_name - cni = var.cni - container_runtime = var.container_runtime - cpus = var.cpus - cri_socket = var.cri_socket - delete_on_failure = var.delete_on_failure - disable_driver_mounts = var.disable_driver_mounts - disable_metrics = var.disable_metrics - disable_optimizations = var.disable_optimizations - disk_size = var.disk_size - dns_domain = var.dns_domain - dns_proxy = var.dns_proxy - docker_env = var.docker_env - docker_opt = var.docker_opt - download_only = var.download_only - driver = var.driver - dry_run = var.dry_run - embed_certs = var.embed_certs - extra_config = var.extra_config - extra_disks = var.extra_disks - feature_gates = var.feature_gates - force = var.force - force_systemd = var.force_systemd - gpus = var.gpus - ha = var.ha - host_dns_resolver = var.host_dns_resolver - host_only_cidr = var.host_only_cidr - host_only_nic_type = var.host_only_nic_type - hyperkit_vpnkit_sock = var.hyperkit_vpnkit_sock - hyperkit_vsock_ports = var.hyperkit_vsock_ports - hyperv_external_adapter = var.hyperv_external_adapter - hyperv_use_external_switch = var.hyperv_use_external_switch - hyperv_virtual_switch = var.hyperv_virtual_switch - image_mirror_country = var.image_mirror_country - image_repository = var.image_repository - insecure_registry = var.insecure_registry - install_addons = var.install_addons - interactive = var.interactive - iso_url = var.iso_url - keep_context = var.keep_context - kubernetes_version = var.kubernetes_version - kvm_gpu = var.kvm_gpu - kvm_hidden = var.kvm_hidden - kvm_network = var.kvm_network - kvm_numa_count = var.kvm_numa_count - kvm_qemu_uri = var.kvm_qemu_uri - listen_address = var.listen_address - memory = var.memory - mount = var.mount - mount_9p_version = var.mount_9p_version - mount_gid = var.mount_gid - mount_ip = var.mount_ip - mount_msize = var.mount_msize - mount_options = var.mount_options - mount_port = var.mount_port - mount_string = var.mount_string - mount_type = var.mount_type - mount_uid = var.mount_uid - namespace = var.namespace - nat_nic_type = var.nat_nic_type - native_ssh = var.native_ssh - network = var.network - nfs_share = var.nfs_share - nfs_shares_root = var.nfs_shares_root - no_kubernetes = var.no_kubernetes - no_vtx_check = var.no_vtx_check - nodes = var.nodes - output = var.output - ports = var.ports - preload = var.preload - qemu_firmware_path = var.qemu_firmware_path - registry_mirror = var.registry_mirror - service_cluster_ip_range = var.service_cluster_ip_range - socket_vmnet_client_path = var.socket_vmnet_client_path - socket_vmnet_path = var.socket_vmnet_path - ssh_ip_address = var.ssh_ip_address - ssh_key = var.ssh_key - ssh_port = var.ssh_port - ssh_user = var.ssh_user - static_ip = var.static_ip - subnet = var.subnet - trace = var.trace - uuid = var.uuid - vm = var.vm - wait = var.wait - wait_timeout = var.wait_timeout -} diff --git a/modules/minikube_cluster/outputs.tf b/modules/minikube_cluster/outputs.tf deleted file mode 100644 index f5e5830..0000000 --- a/modules/minikube_cluster/outputs.tf +++ /dev/null @@ -1,27 +0,0 @@ -output "client_certificate" { - value = minikube_cluster.default.client_certificate - description = "Cluster client certificate" - sensitive = true -} - -output "client_key" { - value = minikube_cluster.default.client_key - description = "Cluster client key" - sensitive = true -} - -output "cluster_ca_certificate" { - value = minikube_cluster.default.cluster_ca_certificate - description = "Cluster certificate authority certificate" - sensitive = true -} - -output "host" { - value = minikube_cluster.default.host - description = "Cluster host" -} - -output "id" { - value = minikube_cluster.default.id - description = "Cluster resource ID" -} diff --git a/modules/minikube_cluster/variables.tf b/modules/minikube_cluster/variables.tf deleted file mode 100644 index 6c0cf7d..0000000 --- a/modules/minikube_cluster/variables.tf +++ /dev/null @@ -1,704 +0,0 @@ -variable "addons" { - type = set(string) - description = "" - default = ["default-storageclass", "storage-provisioner"] - nullable = false - - # todo: validate addons -} - -variable "apiserver_ips" { - type = set(string) - description = "" - default = [] - nullable = false -} - -variable "apiserver_name" { - type = string - description = "" - default = "minikubeCA" - nullable = false -} - -variable "apiserver_names" { - type = set(string) - description = "" - default = [] - nullable = false -} - -variable "apiserver_port" { - type = number - description = "" - default = 8443 - nullable = false -} - -variable "auto_pause_interval" { - type = number - description = "" - default = 1 - nullable = false -} - -variable "auto_update_drivers" { - type = bool - description = "" - default = true - nullable = false -} - -variable "base_image" { - type = string - description = "" - default = null - nullable = true -} - -variable "binary_mirror" { - type = string - description = "" - default = null - nullable = true -} - -variable "cache_images" { - type = bool - description = "" - default = true - nullable = false -} - -variable "cert_expiration" { - type = number - description = "" - default = 1576800 - nullable = false -} - -variable "cluster_name" { - type = string - description = "" - default = "minikube" - nullable = false -} - -variable "cni" { - type = string - description = "" - default = "auto" - nullable = false - - # todo: validate cni -} - -variable "container_runtime" { - type = string - description = "" - default = "docker" - nullable = false - - # todo: validate container_runtime -} - -variable "cpus" { - type = number - description = "" - default = 2 - nullable = false -} - -variable "cri_socket" { - type = string - description = "" - default = null - nullable = true -} - -variable "delete_on_failure" { - type = bool - description = "" - default = false - nullable = false -} - -variable "disable_driver_mounts" { - type = bool - description = "" - default = false - nullable = false -} - -variable "disable_metrics" { - type = bool - description = "" - default = false - nullable = false -} - -variable "disable_optimizations" { - type = bool - description = "" - default = false - nullable = false -} - -variable "disk_size" { - type = string - description = "" - default = "20000mb" - nullable = false - - # todo: validate disk_size -} - -variable "dns_domain" { - type = string - description = "" - default = "cluster.local" - nullable = false -} - -variable "dns_proxy" { - type = bool - description = "" - default = false - nullable = false -} - -variable "docker_env" { - type = set(string) - description = "" - default = null - nullable = true -} - -variable "docker_opt" { - type = set(string) - description = "" - default = null - nullable = true -} - -variable "download_only" { - type = bool - description = "" - default = false - nullable = false -} - -variable "driver" { - type = string - description = "" - default = "docker" - nullable = false - - # todo: validate driver -} - -variable "dry_run" { - type = bool - description = "" - default = false - nullable = false -} - -variable "embed_certs" { - type = bool - description = "" - default = false - nullable = false -} - -variable "extra_config" { - type = set(string) - description = "" - default = [] - nullable = false - - # todo: validate extra_config -} - -variable "extra_disks" { - type = number - description = "" - default = 0 - nullable = false - - # todo: validate driver for extra_disks -} - -variable "feature_gates" { - type = string - description = "" - default = null - nullable = true -} - -variable "force" { - type = bool - description = "" - default = false - nullable = false -} - -variable "force_systemd" { - type = bool - description = "" - default = false - nullable = false -} - -variable "gpus" { - type = string - description = "" - default = null - nullable = true - - # todo: validate gpus -} - -variable "ha" { - type = bool - description = "" - default = null - nullable = true -} - -variable "host_dns_resolver" { - type = bool - description = "" - default = true - nullable = false -} - -variable "host_only_cidr" { - type = string - description = "" - default = "192.168.59.1/24" - nullable = false -} - -variable "host_only_nic_type" { - type = string - description = "" - default = "virtio" - nullable = false -} - -variable "hyperkit_vpnkit_sock" { - type = string - description = "" - default = null - nullable = true -} - -variable "hyperkit_vsock_ports" { - type = set(string) - description = "" - default = [] - nullable = false -} - -variable "hyperv_external_adapter" { - type = string - description = "" - default = null - nullable = true -} - -variable "hyperv_use_external_switch" { - type = bool - description = "" - default = false - nullable = false -} - -variable "hyperv_virtual_switch" { - type = string - description = "" - default = null - nullable = true -} - -variable "image_mirror_country" { - type = string - description = "" - default = null - nullable = true -} - -variable "image_repository" { - type = string - description = "" - default = null - nullable = true -} - -variable "insecure_registry" { - type = set(string) - description = "" - default = [] - nullable = false -} - -variable "install_addons" { - type = bool - description = "" - default = true - nullable = false -} - -variable "interactive" { - type = bool - description = "" - default = true - nullable = false -} - -variable "iso_url" { - type = set(string) - description = "" - default = null - nullable = true -} - -variable "keep_context" { - type = bool - description = "" - default = false - nullable = false -} - -variable "kubernetes_version" { - type = string - description = "" - default = null - nullable = true - - # todo: validate kubernetes_version -} - -variable "kvm_gpu" { - type = bool - description = "" - default = false - nullable = false -} - -variable "kvm_hidden" { - type = bool - description = "" - default = false - nullable = false -} - -variable "kvm_network" { - type = string - description = "" - default = "default" - nullable = false -} - -variable "kvm_numa_count" { - type = number - description = "" - default = 1 - nullable = false -} - -variable "kvm_qemu_uri" { - type = string - description = "" - default = "qemu:///system" - nullable = false -} - -variable "listen_address" { - type = string - description = "" - default = null - nullable = true -} - -variable "memory" { - type = string - description = "" - default = "4096mb" - nullable = false - - # todo: validate memory -} - -variable "mount" { - type = bool - description = "" - default = false - nullable = false -} - -variable "mount_9p_version" { - type = string - description = "" - default = "9p2000.L" - nullable = false -} - -variable "mount_gid" { - type = string - description = "" - default = "docker" - nullable = false -} - -variable "mount_ip" { - type = string - description = "" - default = null - nullable = true -} - -variable "mount_msize" { - type = number - description = "" - default = 262144 - nullable = false -} - -variable "mount_options" { - type = set(string) - description = "" - default = null - nullable = true -} - -variable "mount_port" { - type = number - description = "" - default = 0 - nullable = false -} - -variable "mount_string" { - type = string - description = "" - default = "/home:/minikube-host" - nullable = false -} - -variable "mount_type" { - type = string - description = "" - default = "9p" - nullable = false -} - -variable "mount_uid" { - type = string - description = "" - default = "docker" - nullable = false -} - -variable "namespace" { - type = string - description = "" - default = "default" - nullable = false -} - -variable "nat_nic_type" { - type = string - description = "" - default = "virtio" - nullable = false - - # todo: validate nat_nic_type -} - -variable "native_ssh" { - type = bool - description = "" - default = true - nullable = false -} - -variable "network" { - type = string - description = "" - default = null - nullable = true -} - -variable "nfs_share" { - type = set(string) - description = "" - default = [] - nullable = false -} - -variable "nfs_shares_root" { - type = string - description = "" - default = "/nfsshares" - nullable = false -} - -variable "no_kubernetes" { - type = bool - description = "" - default = false - nullable = false -} - -variable "no_vtx_check" { - type = bool - description = "" - default = false - nullable = false -} - -variable "nodes" { - type = number - description = "" - default = 1 - nullable = false -} - -variable "output" { - type = string - description = "" - default = "text" - nullable = false - - # todo: validate output -} - -variable "ports" { - type = set(string) - description = "" - default = [] - nullable = false -} - -variable "preload" { - type = bool - description = "" - default = true - nullable = false -} - -variable "qemu_firmware_path" { - type = string - description = "" - default = null - nullable = true -} - -variable "registry_mirror" { - type = set(string) - description = "" - default = [] - nullable = false -} - -variable "service_cluster_ip_range" { - type = string - description = "" - default = "10.96.0.0/12" - nullable = false -} - -variable "socket_vmnet_client_path" { - type = string - description = "" - default = "/usr/local/opt/socket_vmnet/bin/socket_vmnet_client" - nullable = false -} - -variable "socket_vmnet_path" { - type = string - description = "" - default = "/usr/local/var/run/socket_vmnet" - nullable = false -} - -variable "ssh_ip_address" { - type = string - description = "" - default = null - nullable = true -} - -variable "ssh_key" { - type = string - description = "" - default = null - nullable = true -} - -variable "ssh_port" { - type = number - description = "" - default = 22 - nullable = false -} - -variable "ssh_user" { - type = string - description = "" - default = "root" - nullable = false -} - -variable "static_ip" { - type = string - description = "" - default = null - nullable = true -} - -variable "subnet" { - type = string - description = "" - default = null - nullable = true -} - -variable "trace" { - type = string - description = "" - default = null - nullable = true -} - -variable "uuid" { - type = string - description = "" - default = null - nullable = true -} - -variable "vm" { - type = bool - description = "" - default = false - nullable = false -} - -variable "wait" { - type = set(string) - description = "" - default = null - nullable = true - - # todo: validate wait -} - -variable "wait_timeout" { - type = number - description = "" - default = 6 - nullable = false -} diff --git a/outputs.tf b/outputs.tf index 22216aa..b536c45 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,7 +1,7 @@ # todo: output masked sensitive values to show existence output "minikube_clusters" { value = { - for k, v in module.minikube_cluster : k => { + for k, v in minikube_cluster.default : k => { host : v.host, id : v.id }