diff --git a/manifests/modules/automation/controlplanes/ack/.workshop/terraform/main.tf b/manifests/modules/automation/controlplanes/ack/.workshop/terraform/main.tf index 6f490072e..51126334b 100644 --- a/manifests/modules/automation/controlplanes/ack/.workshop/terraform/main.tf +++ b/manifests/modules/automation/controlplanes/ack/.workshop/terraform/main.tf @@ -67,3 +67,20 @@ module "eks_blueprints_addons" { cluster_version = var.eks_cluster_version oidc_provider_arn = var.addon_context.eks_oidc_provider_arn } + +resource "time_sleep" "blueprints_addons_sleep" { + depends_on = [ + module.eks_blueprints_addons + ] + + create_duration = "15s" + destroy_duration = "15s" +} + +resource "kubectl_manifest" "nlb" { + yaml_body = templatefile("${path.module}/templates/nlb.yaml", { + + }) + + depends_on = [time_sleep.blueprints_addons_sleep] +} \ No newline at end of file diff --git a/manifests/modules/automation/controlplanes/crossplane/.workshop/manifests/nlb.yaml b/manifests/modules/automation/controlplanes/ack/.workshop/terraform/templates/nlb.yaml similarity index 100% rename from manifests/modules/automation/controlplanes/crossplane/.workshop/manifests/nlb.yaml rename to manifests/modules/automation/controlplanes/ack/.workshop/terraform/templates/nlb.yaml diff --git a/manifests/modules/automation/controlplanes/crossplane/.workshop/manifests/kustomization.yaml b/manifests/modules/automation/controlplanes/crossplane/.workshop/manifests/kustomization.yaml deleted file mode 100644 index 8815f1789..000000000 --- a/manifests/modules/automation/controlplanes/crossplane/.workshop/manifests/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - nlb.yaml diff --git a/manifests/modules/automation/controlplanes/crossplane/.workshop/terraform/main.tf b/manifests/modules/automation/controlplanes/crossplane/.workshop/terraform/main.tf index 1abc8f0ed..dc5a4cbe4 100644 --- a/manifests/modules/automation/controlplanes/crossplane/.workshop/terraform/main.tf +++ b/manifests/modules/automation/controlplanes/crossplane/.workshop/terraform/main.tf @@ -135,4 +135,21 @@ module "eks_blueprints_addons" { cluster_endpoint = var.addon_context.aws_eks_cluster_endpoint cluster_version = var.eks_cluster_version oidc_provider_arn = var.addon_context.eks_oidc_provider_arn +} + +resource "time_sleep" "blueprints_addons_sleep" { + depends_on = [ + module.eks_blueprints_addons + ] + + create_duration = "15s" + destroy_duration = "15s" +} + +resource "kubectl_manifest" "nlb" { + yaml_body = templatefile("${path.module}/templates/nlb.yaml", { + + }) + + depends_on = [time_sleep.blueprints_addons_sleep] } \ No newline at end of file diff --git a/manifests/modules/automation/controlplanes/crossplane/.workshop/terraform/templates/nlb.yaml b/manifests/modules/automation/controlplanes/crossplane/.workshop/terraform/templates/nlb.yaml new file mode 100644 index 000000000..5e457ff07 --- /dev/null +++ b/manifests/modules/automation/controlplanes/crossplane/.workshop/terraform/templates/nlb.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: ui-nlb + annotations: + service.beta.kubernetes.io/aws-load-balancer-type: external + service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing + service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance + namespace: ui +spec: + type: LoadBalancer + ports: + - port: 80 + targetPort: 8080 + name: http + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: ui + app.kubernetes.io/component: service