This file contains hidden or 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
# Example of creating EKS Cluster terraform resources | |
resource "aws_eks_cluster" "eks_cluster" { | |
name = var.cluster_name | |
role_arn = var.eks_master_role_arn | |
version = var.cluster_version | |
enabled_cluster_log_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"] | |
# Create a custome sg for other staff | |
vpc_config { | |
endpoint_private_access = true | |
endpoint_public_access = false |
This file contains hidden or 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
# Create a Fargate Profile | |
resource "aws_eks_fargate_profile" "fp_local_default" { | |
cluster_name = data.terraform_remote_state.stack.outputs.eks_cluster_name | |
fargate_profile_name = "fargate" | |
pod_execution_role_arn = aws_iam_role.fargate_pod_execution_role.arn | |
subnet_ids = local.subnet_ids_list | |
selector { | |
namespace = "fargate-*" |
This file contains hidden or 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
#cloud-config | |
package_update: true | |
package_upgrade: true | |
packages: | |
# Update the apt package index and install packages needed to use the Docker and Kubernetes apt repositories over HTTPS | |
- apt-transport-https | |
- ca-certificates | |
- curl | |
- gnupg | |
- lsb-release |