Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigobersa committed Sep 21, 2023
1 parent bcc264a commit f76fd48
Show file tree
Hide file tree
Showing 14 changed files with 266 additions and 273 deletions.
1 change: 0 additions & 1 deletion patterns/cluster-admin/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
################################################################################
# EKS Cluster
################################################################################

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.13"
Expand Down
1 change: 0 additions & 1 deletion patterns/cluster-admin/teams.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
################################################################################
# EKS Blueprints Teams Module - Cluster Admin
################################################################################

module "admin_team" {
source = "../.."

Expand Down
1 change: 0 additions & 1 deletion patterns/development-team/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
################################################################################
# EKS Cluster
################################################################################

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.13"
Expand Down
1 change: 0 additions & 1 deletion patterns/development-team/teams.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
################################################################################
# EKS Blueprints Teams Module - Development Team
################################################################################

module "development_team" {
source = "../.."

Expand Down
2 changes: 1 addition & 1 deletion patterns/multiple-app-teams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This example shows how to create a multiple teams using the same approach of the

- `teams.tf` contains a sample configuration of the `teams` module, using the `for_each` Terraform Meta-Argument at the Module level creating multiple teams with the same configuration, in this case providing restricted access to specific Namespaces, and *read-only* access to list Namespaces and Nodes for the specified identities.

https://github.com/aws-ia/terraform-aws-eks-blueprints-teams/blob/4def6e7e437c5b8f2c5e6479f2585fac58bf060c/patterns/multiple-app-teams/teams.tf#L5-L123
https://github.com/aws-ia/terraform-aws-eks-blueprints-teams/blob/bcc264abb8b0c76fba5a14a38d522a73d70015ae/patterns/multiple-app-teams/teams.tf#L5-L40

- `eks.tf` holds the EKS Cluster configuration and the setup of the `aws-auth` configMap, providing the EKS authentication model for the identities and RBAC authorization created by the `teams` module.

Expand Down
1 change: 0 additions & 1 deletion patterns/multiple-app-teams/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
################################################################################
# EKS Cluster
################################################################################

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.13"
Expand Down
1 change: 0 additions & 1 deletion patterns/multiple-app-teams/teams.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
################################################################################
# EKS Blueprints Teams Module - Multiple Application Teams
################################################################################

module "application_teams" {
source = "../.."

Expand Down
2 changes: 1 addition & 1 deletion patterns/namespaced-admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This example shows how to create a team with Admin privileges on Namespaces the

- `teams.tf` contains a sample configuration of the `teams` module, in this case providing namespaced `admin` privileges, and *read-only* access to Namespaces and Nodes for the specified identities.

https://github.com/aws-ia/terraform-aws-eks-blueprints-teams/blob/4def6e7e437c5b8f2c5e6479f2585fac58bf060c/patterns/namespaced-admin/teams.tf#L5-L31
https://github.com/aws-ia/terraform-aws-eks-blueprints-teams/blob/bcc264abb8b0c76fba5a14a38d522a73d70015ae/patterns/namespaced-admin/teams.tf#L5-L30

- `eks.tf` holds the EKS Cluster configuration and the setup of the `aws-auth` configMap, providing the EKS authentication model for the identities and RBAC authorization created by the `teams` module.

Expand Down
1 change: 0 additions & 1 deletion patterns/namespaced-admin/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
################################################################################
# EKS Cluster
################################################################################

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.13"
Expand Down
1 change: 0 additions & 1 deletion patterns/namespaced-admin/teams.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
################################################################################
# EKS Blueprints Teams Module - Namespaced Admin
################################################################################

module "operations_team" {
source = "../.."

Expand Down
2 changes: 1 addition & 1 deletion tests/complete/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Amazon EKS Blueprints Teams - Complete test
# Amazon EKS Blueprints Teams - Multi-tenancy complete test

Configuration in this directory creates:

Expand Down
66 changes: 66 additions & 0 deletions tests/complete/eks.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
################################################################################
# Supporting Resources
################################################################################
# EKS Cluster
################################################################################
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.13"

cluster_name = local.name
cluster_version = "1.27"
cluster_endpoint_public_access = true

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

eks_managed_node_groups = {
initial = {
instance_types = ["m5.large"]

min_size = 1
max_size = 5
desired_size = 2
}
}

manage_aws_auth_configmap = true
aws_auth_roles = flatten(
[
module.admin_team.aws_auth_configmap_role,
module.platform_team.aws_auth_configmap_role,
module.red_team.aws_auth_configmap_role,
[for team in module.blue_teams : team.aws_auth_configmap_role],
]
)

tags = local.tags
}

################################################################################
# VPC
################################################################################
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 5.0"

name = local.name
cidr = local.vpc_cidr

azs = local.azs
private_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 4, k)]
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 48)]

enable_nat_gateway = true
single_nat_gateway = true

public_subnet_tags = {
"kubernetes.io/role/elb" = 1
}

private_subnet_tags = {
"kubernetes.io/role/internal-elb" = 1
}

tags = local.tags
}
Loading

0 comments on commit f76fd48

Please sign in to comment.