Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Map the Terraform entity into the cluster as admin to allow deploying Kubernetes, Helm, and Kubectl resources via providers #1878

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for those of us running atlantis, this step is a major restriction :(
can we look into a better alternative?


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
Loading