diff --git a/oci-managed/argocd/main.tf b/oci-managed/argocd/main.tf index 5032ae9..eb19d0f 100644 --- a/oci-managed/argocd/main.tf +++ b/oci-managed/argocd/main.tf @@ -27,7 +27,7 @@ resource "helm_release" "argocd" { resource "kubectl_manifest" "dashboard-ingress" { depends_on = [helm_release.argocd] - force_new = true + force_new = true server_side_apply = true yaml_body = templatefile("${path.module}/argocd_ingress_route.tfpl.yaml", { diff --git a/oci-managed/certmanager/main.tf b/oci-managed/certmanager/main.tf index c5284c5..2a8e264 100644 --- a/oci-managed/certmanager/main.tf +++ b/oci-managed/certmanager/main.tf @@ -34,7 +34,7 @@ resource "helm_release" "trust-manager" { resource "kubectl_manifest" "cert-manager-cluster-issuer" { depends_on = [helm_release.cert-manager, helm_release.trust-manager] - force_new = true + force_new = true server_side_apply = true yaml_body = templatefile("${path.module}/cluster_issuer.tfpl.yaml", { diff --git a/oci-managed/main.tf b/oci-managed/main.tf index fe7f40d..a414128 100644 --- a/oci-managed/main.tf +++ b/oci-managed/main.tf @@ -29,7 +29,7 @@ module "snet" { vcn_id = module.vcn.vcn_id vcn_nat_route_id = module.vcn.nat_route_id vcn_ig_route_id = module.vcn.ig_route_id - depends_on = [ module.vcn ] + depends_on = [module.vcn] } module "oke" { @@ -45,7 +45,7 @@ module "oke" { node_availability_domains = var.availability_domain node_pool_size = var.node_pool_size ssh_public_key = var.public_key_path - depends_on = [ module.snet ] + depends_on = [module.snet] } module "nlb" { @@ -57,28 +57,28 @@ module "nlb" { traefik_template_values = { cloudflare_origin_certificate_pem = base64encode(file(var.cloudflare_origin_certificate_pem)) cloudflare_origin_certificate_key = base64encode(file(var.cloudflare_origin_certificate_key)) - my_domain = var.my_domain + my_domain = var.my_domain } - depends_on = [ module.oke ] + depends_on = [module.oke] } module "cert-manager" { compartment_ocid = var.compartment_ocid cluster_ocid = module.oke.cluster_ocid - count = var.install_cert_manager ? 1 : 0 - source = "./certmanager" + count = var.install_cert_manager ? 1 : 0 + source = "./certmanager" - depends_on = [ module.oke ] + depends_on = [module.oke] } module "argocd" { compartment_ocid = var.compartment_ocid cluster_ocid = module.oke.cluster_ocid - count = var.install_argocd ? 1 : 0 - source = "./argocd" + count = var.install_argocd ? 1 : 0 + source = "./argocd" my_domain = var.my_domain - depends_on = [ module.nlb ] + depends_on = [module.nlb] } \ No newline at end of file diff --git a/oci-managed/oke/data.tf b/oci-managed/oke/data.tf index a31f733..1c647ad 100644 --- a/oci-managed/oke/data.tf +++ b/oci-managed/oke/data.tf @@ -3,19 +3,19 @@ data "oci_identity_availability_domains" "ads" { } data "oci_core_images" "latest_image" { - compartment_id = var.compartment_ocid - operating_system = "Oracle Linux" + compartment_id = var.compartment_ocid + operating_system = "Oracle Linux" operating_system_version = "8.8" - shape = "VM.Standard.A1.Flex" + shape = "VM.Standard.A1.Flex" filter { name = "display_name" values = ["^.*aarch64-.*$"] - regex = true + regex = true } } data "oci_containerengine_cluster_kube_config" "cluster_kube_config" { - #Required - cluster_id = oci_containerengine_cluster.k8s_cluster.id - token_version = "2.0.0" + #Required + cluster_id = oci_containerengine_cluster.k8s_cluster.id + token_version = "2.0.0" } diff --git a/oci-managed/oke/node_pool.tf b/oci-managed/oke/node_pool.tf index d3c34dc..efc311a 100644 --- a/oci-managed/oke/node_pool.tf +++ b/oci-managed/oke/node_pool.tf @@ -21,8 +21,8 @@ resource "oci_containerengine_node_pool" "k8s_node_pool" { } node_source_details { - image_id = var.node_image_ocid - source_type = "image" + image_id = var.node_image_ocid + source_type = "image" boot_volume_size_in_gbs = 100 } diff --git a/oci-managed/oke/output.tf b/oci-managed/oke/output.tf index e9235b3..389f772 100644 --- a/oci-managed/oke/output.tf +++ b/oci-managed/oke/output.tf @@ -7,6 +7,6 @@ output "public_endpoint" { } resource "local_file" "oke_kubeconfig" { - content = data.oci_containerengine_cluster_kube_config.cluster_kube_config.content - filename = "${path.module}/kubeconfig" + content = data.oci_containerengine_cluster_kube_config.cluster_kube_config.content + filename = "${path.module}/kubeconfig" } \ No newline at end of file diff --git a/oci-managed/oke/variables.tf b/oci-managed/oke/variables.tf index 3760f15..ba86c96 100644 --- a/oci-managed/oke/variables.tf +++ b/oci-managed/oke/variables.tf @@ -16,7 +16,7 @@ variable "node_image_ocid" { default = "ocid1.image.oc1.eu-frankfurt-1.aaaaaaaa3mctwlkbkaj76pnlrmdr7w6dd4frkrhuqrdadpq4g67kh5gqbn3q" } variable "node_availability_domains" { - type = list(string) + type = list(string) } variable "node_pool_size" { type = number diff --git a/oci-managed/output.tf b/oci-managed/output.tf index e83f08e..544df64 100644 --- a/oci-managed/output.tf +++ b/oci-managed/output.tf @@ -1,13 +1,13 @@ output "traefik_dashboard_username" { - value = module.nlb.traefik_dashboard_username - sensitive = true + value = module.nlb.traefik_dashboard_username + sensitive = true } output "traefik_dashboard_password" { - value = module.nlb.traefik_dashboard_password - sensitive = true + value = module.nlb.traefik_dashboard_password + sensitive = true } output "traefik_nlb_public_ip" { - value = module.nlb.traefik_nlb_public_ip + value = module.nlb.traefik_nlb_public_ip } \ No newline at end of file diff --git a/oci-managed/provider.tf b/oci-managed/provider.tf index 6a60893..52a412c 100644 --- a/oci-managed/provider.tf +++ b/oci-managed/provider.tf @@ -13,7 +13,7 @@ terraform { version = "~> 4.0" } kubernetes = { - source = "hashicorp/kubernetes" + source = "hashicorp/kubernetes" version = "2.28.0" } kubectl = { diff --git a/oci-managed/snet/security_rules.tf b/oci-managed/snet/security_rules.tf index 4876285..207ab36 100644 --- a/oci-managed/snet/security_rules.tf +++ b/oci-managed/snet/security_rules.tf @@ -10,7 +10,7 @@ resource "oci_core_security_list" "private_subnet_sl" { destination_type = "CIDR_BLOCK" protocol = "all" } - + ingress_security_rules { stateless = false source = "10.0.0.0/16" @@ -53,7 +53,7 @@ resource "oci_core_security_list" "public_subnet_sl" { destination_type = "CIDR_BLOCK" protocol = "all" } - + egress_security_rules { stateless = false destination = "10.0.1.0/24" @@ -86,7 +86,7 @@ resource "oci_core_security_list" "public_subnet_sl" { max = 80 min = 80 } - } + } ingress_security_rules { stateless = false diff --git a/oci-managed/variables.tf b/oci-managed/variables.tf index 8e791d6..5b560d8 100644 --- a/oci-managed/variables.tf +++ b/oci-managed/variables.tf @@ -24,12 +24,12 @@ variable "my_domain" { type = string } variable "install_argocd" { - type = bool + type = bool default = true } variable "install_cert_manager" { - type = bool + type = bool default = true } diff --git a/self-managed/example/provider.tf b/self-managed/example/provider.tf index b470495..33e0c95 100644 --- a/self-managed/example/provider.tf +++ b/self-managed/example/provider.tf @@ -8,10 +8,10 @@ terraform { } provider "oci" { - tenancy_ocid = var.tenancy_ocid - user_ocid = var.user_ocid - private_key_path = pathexpand(var.private_key_path) - fingerprint = var.fingerprint - region = var.region + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + private_key_path = pathexpand(var.private_key_path) + fingerprint = var.fingerprint + region = var.region retry_duration_seconds = 120 } diff --git a/self-managed/template.tf b/self-managed/template.tf index 8ae305c..e3899bd 100644 --- a/self-managed/template.tf +++ b/self-managed/template.tf @@ -8,7 +8,7 @@ resource "oci_core_instance_configuration" "k3s_server_template" { update = "11m" delete = "10m" } - + freeform_tags = { "provisioner" = "terraform" "environment" = "${var.environment}" @@ -113,9 +113,9 @@ resource "oci_core_instance_configuration" "k3s_worker_template" { } } - availability_domain = var.availability_domain + availability_domain = var.availability_domain # fault_domain = "FAULT-DOMAIN-3" - compartment_id = var.compartment_ocid + compartment_id = var.compartment_ocid create_vnic_details { assign_public_ip = true