Skip to content

Commit

Permalink
Updated Crossplane and ACK labs to provision NLB in Terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson committed Mar 30, 2024
1 parent 20eabb3 commit 60b32f7
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 60b32f7

Please sign in to comment.