Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertNorthard committed Aug 16, 2023
1 parent 2d7ea7e commit 4e41ea9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 31 deletions.
34 changes: 33 additions & 1 deletion examples/private-public-ingress/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
provider "aws" {
region = local.region
}

provider "kubernetes" {
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
token = data.aws_eks_cluster_auth.this.token
}

provider "aws" {
region = "us-east-1"
alias = "virginia"
}

provider "helm" {
kubernetes {
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
token = data.aws_eks_cluster_auth.this.token
}
}

provider "kubectl" {
apply_retry_count = 10
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
load_config_file = false
token = data.aws_eks_cluster_auth.this.token
}

data "aws_eks_cluster_auth" "this" {
name = module.eks.cluster_name
}
Expand All @@ -6,7 +37,8 @@ data "aws_caller_identity" "current" {}
data "aws_availability_zones" "available" {}

locals {
name = "eks-private-public-ingress"
region = "eu-west-1"
name = "eks-private-public-ingress"

vpc_cidr = "10.0.0.0/16"
azs = slice(data.aws_availability_zones.available.names, 0, 3)
Expand Down
4 changes: 4 additions & 0 deletions examples/private-public-ingress/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = "aws eks update-kubeconfig --name ${module.eks.cluster_name} --alias ${module.eks.cluster_name}"
}
30 changes: 0 additions & 30 deletions examples/private-public-ingress/providers.tf

This file was deleted.

0 comments on commit 4e41ea9

Please sign in to comment.