Skip to content

Commit

Permalink
fix: Map the Terraform entity into the cluster as admin to allow depl…
Browse files Browse the repository at this point in the history
…oying Kubernetes, Helm, and Kubectl resources via providers (#1878)
  • Loading branch information
bryantbiggs committed Feb 9, 2024
1 parent b6ae7e9 commit b4b99d0
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/_partials/destroy.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
```sh
# Necessary to avoid removing Terraform's permissions too soon before its finished
# cleaning up the resources it deployed inside the cluster
terraform state rm 'module.eks.aws_eks_access_entry.this["cluster_creator_admin"]' || true

terraform destroy -target="module.eks_blueprints_addons" -auto-approve
terraform destroy -target="module.eks" -auto-approve
terraform destroy -auto-approve
Expand Down
4 changes: 4 additions & 0 deletions patterns/agones-game-controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ module "eks" {
cluster_version = local.cluster_version
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.vpc.vpc_id
control_plane_subnet_ids = module.vpc.private_subnets
subnet_ids = module.vpc.public_subnets
Expand Down
4 changes: 4 additions & 0 deletions patterns/appmesh-mtls/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand Down
4 changes: 4 additions & 0 deletions patterns/aws-vpc-cni-network-policy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ module "eks" {
cluster_version = "1.29" # Must be 1.25 or higher
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand Down
6 changes: 5 additions & 1 deletion patterns/elastic-fabric-adapter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ module "eks" {
cluster_version = local.cluster_version
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

cluster_addons = {
coredns = {}
kube-proxy = {}
Expand Down Expand Up @@ -252,7 +256,7 @@ resource "kubernetes_daemonset" "aws_efa_k8s_device_plugin" {

container {
name = "aws-efa-k8s-device-plugin"
image = "602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-efa-k8s-device-plugin:v0.4.3"
image = "602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-efa-k8s-device-plugin:v0.4.4"

volume_mount {
name = "device-plugin"
Expand Down
4 changes: 4 additions & 0 deletions patterns/external-secrets/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand Down
4 changes: 4 additions & 0 deletions patterns/fargate-serverless/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand Down
4 changes: 4 additions & 0 deletions patterns/istio/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

cluster_addons = {
coredns = {}
kube-proxy = {}
Expand Down
4 changes: 4 additions & 0 deletions patterns/kubecost/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

# EKS Addons
cluster_addons = {
aws-ebs-csi-driver = {
Expand Down
4 changes: 4 additions & 0 deletions patterns/private-public-ingress/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand Down
4 changes: 4 additions & 0 deletions patterns/stateful/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand Down
4 changes: 4 additions & 0 deletions patterns/tls-with-aws-pca-issuer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand Down
4 changes: 4 additions & 0 deletions patterns/vpc-lattice/client-server-communication/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

vpc_id = module.cluster_vpc.vpc_id
subnet_ids = module.cluster_vpc.private_subnets

Expand Down
4 changes: 4 additions & 0 deletions patterns/wireguard-with-cilium/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ module "eks" {
cluster_version = "1.29"
cluster_endpoint_public_access = true

# Give the Terraform identity admin access to the cluster
# which will allow resources to be deployed into the cluster
enable_cluster_creator_admin_permissions = true

# EKS Addons
cluster_addons = {
coredns = {}
Expand Down

0 comments on commit b4b99d0

Please sign in to comment.