This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.../... | |
aws_api_gateway_vpc_link.main: Still creating... [7m10s elapsed] | |
aws_api_gateway_vpc_link.main: Still creating... [7m20s elapsed] | |
aws_api_gateway_vpc_link.main: Still creating... [7m30s elapsed] | |
aws_api_gateway_vpc_link.main: Still creating... [7m40s elapsed] | |
aws_api_gateway_vpc_link.main: Still creating... [7m50s elapsed] | |
Error: Error waiting for APIGateway Vpc Link status to be "AVAILABLE": timeout while waiting for state to become 'AVAILABLE' (last state: 'PENDING', timeout: 8m0s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base | |
└── terraform | |
├── README.md | |
├── outputs.tf | |
├── route53.tf | |
├── terraform.tf | |
└── vpc.tf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eks | |
└── terraform | |
├── README.md | |
├── albingresscontroller.yml.tpl | |
├── autoscaler.yml.tpl | |
├── data.tf | |
├── eks.tf | |
├── eks_addons.tf | |
├── eks_rbac_iam.tf | |
├── iam-policy_eks_update_kubeconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "vpc" { | |
source = "terraform-aws-modules/vpc/aws" | |
// partie omise pour la lisibilité. | |
tags = { | |
Terraform = "true" | |
Environment = "lab" | |
Name = var.name | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_eks_cluster" "example" { | |
depends_on = [aws_cloudwatch_log_group.example] | |
enabled_cluster_log_types = ["api", "audit"] | |
name = var.cluster_name | |
role_arn = aws_iam_role.eks-cluster.arn | |
vpc_config { | |
subnet_ids = data.aws_subnet_ids.all.ids |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_cloudwatch_log_group" "example" | |
resource "aws_iam_role" "eks-cluster" | |
resource "aws_iam_role_policy_attachment" "cluster-AmazonEKSClusterPolicy" | |
resource "aws_iam_role_policy_attachment" "cluster-AmazonEKSServicePolicy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_eks_node_group" "example" { | |
for_each = data.aws_subnet_ids.example.ids // la liste des subnets privés créés dans le projet Terraform base. | |
cluster_name = aws_eks_cluster.example.name | |
node_group_name = "example-${substr(each.key, 7, length(each.key))}" | |
node_role_arn = aws_iam_role.eks-node.arn | |
subnet_ids = [each.key] | |
scaling_config { | |
desired_size = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_iam_role" "eks-node" | |
resource "aws_iam_role_policy_attachment" "example-AmazonEKSWorkerNodePolicy" | |
resource "aws_iam_role_policy_attachment" "example-AmazonEKS_CNI_Policy" | |
resource "aws_iam_role_policy_attachment" "example-AmazonEC2ContainerRegistryReadOnly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_iam_openid_connect_provider" "example" { | |
client_id_list = ["sts.amazonaws.com"] | |
thumbprint_list = [lower("9E99A48A9960B14926BB7F3B02E22DA2B0AB7280")] | |
url = aws_eks_cluster.example.identity.0.oidc.0.issuer | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "null_resource" "install_autoscaler" { | |
depends_on = [aws_eks_node_group.example] | |
triggers = { | |
autoscaler_conf = tostring(data.template_file.autoscaler.rendered) | |
albingresscontroller_conf = tostring(data.template_file.albingresscontroller.rendered) | |
} | |
provisioner "local-exec" { |
OlderNewer