mirror of
https://github.com/vcscsvcscs/OCI-Kubernetes-cluster-with-traefik.git
synced 2025-08-12 13:59:09 +02:00
Format according to terraform fmt
This commit is contained in:
@@ -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", {
|
||||
|
@@ -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", {
|
||||
|
@@ -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]
|
||||
}
|
@@ -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"
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
@@ -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"
|
||||
}
|
@@ -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
|
||||
|
@@ -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
|
||||
}
|
@@ -13,7 +13,7 @@ terraform {
|
||||
version = "~> 4.0"
|
||||
}
|
||||
kubernetes = {
|
||||
source = "hashicorp/kubernetes"
|
||||
source = "hashicorp/kubernetes"
|
||||
version = "2.28.0"
|
||||
}
|
||||
kubectl = {
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user