├── README.md ├── variables_azure.tf ├── terraform.tfvars ├── terraform-variables-lab ├── variables.tf ├── modules │ └── aws-instance │ │ ├── outputs.tf │ │ ├── variables.tf │ │ └── main.tf ├── outputs.tf ├── README.md └── main.tf ├── demo-terraform-troubleshooting ├── terraform.tfvars ├── variables.tf ├── README.md ├── outputs.tf └── main.tf ├── lab-aws-outputs.zip ├── lab-azure-outputs.zip ├── lab-managing-aws.zip ├── lab-migrate-state.zip ├── lab-terraform-eks.zip ├── lab-managing-azure.zip ├── output_aks.tf ├── lab-deploy-kubernetes.zip ├── lab-manage-kubernetes.zip ├── outputs_eks.tf ├── demo-terraform-aks-cluster.zip ├── demo-terraform-eks-cluster.zip ├── lab_migrate_terraform_state.zip ├── lab-terraform-troubleshooting.zip ├── demo-terraform-troubleshooting.zip ├── variables_aws.tf ├── outputs_azure.tf ├── kind-config.yaml ├── azure_resource_block.tf ├── outputs_aws.tf ├── demo-terraform-eks-cluster ├── README.md ├── kubernetes-dashboard-admin.rbac.yaml ├── versions.tf ├── kubernetes.tf ├── outputs.tf ├── security-groups.tf ├── vpc.tf ├── eks-cluster.tf └── .terraform.lock.hcl ├── service_aks_nginx.tf ├── service_eks_nginx.tf ├── lab_kubernetes_service.tf ├── service_nginx.tf ├── main_ml.tf ├── main_docker.tf ├── main_aws.tf ├── main_w.tf ├── azure_resource_block.txt ├── main_azure.tf ├── kubernetes.tf ├── lab_kubernetes_resources.tf ├── kubernetes_aks.tf ├── resource_nginx.tf └── kubernetes_eks.tf /README.md: -------------------------------------------------------------------------------- 1 | # content-terraform-2021 2 | -------------------------------------------------------------------------------- /variables_azure.tf: -------------------------------------------------------------------------------- 1 | azurerm_subnet_name = "BoyWonder" 2 | -------------------------------------------------------------------------------- /terraform.tfvars: -------------------------------------------------------------------------------- 1 | resource_group_name = "myTFResourceGroup" 2 | -------------------------------------------------------------------------------- /terraform-variables-lab/variables.tf: -------------------------------------------------------------------------------- 1 | # Variable declarations 2 | -------------------------------------------------------------------------------- /demo-terraform-troubleshooting/terraform.tfvars: -------------------------------------------------------------------------------- 1 | name = "terraform" 2 | region = "us-east-2" 3 | -------------------------------------------------------------------------------- /lab-aws-outputs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-aws-outputs.zip -------------------------------------------------------------------------------- /lab-azure-outputs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-azure-outputs.zip -------------------------------------------------------------------------------- /lab-managing-aws.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-managing-aws.zip -------------------------------------------------------------------------------- /lab-migrate-state.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-migrate-state.zip -------------------------------------------------------------------------------- /lab-terraform-eks.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-terraform-eks.zip -------------------------------------------------------------------------------- /lab-managing-azure.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-managing-azure.zip -------------------------------------------------------------------------------- /output_aks.tf: -------------------------------------------------------------------------------- 1 | output "lb_ip" { 2 | value = kubernetes_service.nginx.status.0.load_balancer.0.ingress.0.ip 3 | } 4 | -------------------------------------------------------------------------------- /lab-deploy-kubernetes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-deploy-kubernetes.zip -------------------------------------------------------------------------------- /lab-manage-kubernetes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-manage-kubernetes.zip -------------------------------------------------------------------------------- /outputs_eks.tf: -------------------------------------------------------------------------------- 1 | output "lb_ip" { 2 | value = kubernetes_service.nginx.status.0.load_balancer.0.ingress.0.hostname 3 | } 4 | -------------------------------------------------------------------------------- /demo-terraform-aks-cluster.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/demo-terraform-aks-cluster.zip -------------------------------------------------------------------------------- /demo-terraform-eks-cluster.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/demo-terraform-eks-cluster.zip -------------------------------------------------------------------------------- /lab_migrate_terraform_state.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab_migrate_terraform_state.zip -------------------------------------------------------------------------------- /lab-terraform-troubleshooting.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/lab-terraform-troubleshooting.zip -------------------------------------------------------------------------------- /demo-terraform-troubleshooting.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxacademy/content-terraform-2021/HEAD/demo-terraform-troubleshooting.zip -------------------------------------------------------------------------------- /terraform-variables-lab/modules/aws-instance/outputs.tf: -------------------------------------------------------------------------------- 1 | output "instance_ids" { 2 | description = "IDs of EC2 instances" 3 | value = aws_instance.app.*.id 4 | } 5 | -------------------------------------------------------------------------------- /variables_aws.tf: -------------------------------------------------------------------------------- 1 | variable "instance_name" { 2 | description = "Value of the Name tag for the EC2 instance" 3 | type = string 4 | default = "ExampleAppServerInstance" 5 | } 6 | -------------------------------------------------------------------------------- /outputs_azure.tf: -------------------------------------------------------------------------------- 1 | output "azurerm_virtual_network_name" { 2 | value = azurerm_virtual_network.vnet.name 3 | } 4 | 5 | output "azurerm_subnet_name" { 6 | value = azurerm_subnet.subnet.name 7 | } 8 | -------------------------------------------------------------------------------- /terraform-variables-lab/outputs.tf: -------------------------------------------------------------------------------- 1 | output "public_dns_name" { 2 | description = "Public DNS names of the load balancer for this project" 3 | value = module.elb_http.this_elb_dns_name 4 | } 5 | -------------------------------------------------------------------------------- /kind-config.yaml: -------------------------------------------------------------------------------- 1 | kind: Cluster 2 | apiVersion: kind.x-k8s.io/v1alpha4 3 | nodes: 4 | - role: control-plane 5 | extraPortMappings: 6 | - containerPort: 30201 7 | hostPort: 30201 8 | listenAddress: "0.0.0.0" 9 | -------------------------------------------------------------------------------- /demo-terraform-troubleshooting/variables.tf: -------------------------------------------------------------------------------- 1 | variable "region" { 2 | description = "The AWS region your resources will be deployed" 3 | } 4 | 5 | variable "name" { 6 | description = "The operator name running this configuration" 7 | } 8 | -------------------------------------------------------------------------------- /azure_resource_block.tf: -------------------------------------------------------------------------------- 1 | # Create subnet 2 | resource "azurerm_subnet" "subnet" { 3 | name = "Robins" 4 | resource_group_name = "" 5 | virtual_network_name = azurerm_virtual_network.vnet.name 6 | address_prefixes = ["10.0.1.0/24"] 7 | } 8 | -------------------------------------------------------------------------------- /outputs_aws.tf: -------------------------------------------------------------------------------- 1 | output "instance_id" { 2 | description = "ID of the EC2 instance" 3 | value = aws_instance.app_server.id 4 | } 5 | 6 | output "instance_public_ip" { 7 | description = "Public IP address of the EC2 instance" 8 | value = aws_instance.app_server.public_ip 9 | } 10 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/README.md: -------------------------------------------------------------------------------- 1 | # Learn Terraform - Provision an EKS Cluster 2 | 3 | This repo is a companion repo to the [Provision an EKS Cluster learn guide](https://learn.hashicorp.com/terraform/kubernetes/provision-eks-cluster), containing 4 | Terraform configuration files to provision an EKS cluster on AWS. -------------------------------------------------------------------------------- /demo-terraform-troubleshooting/README.md: -------------------------------------------------------------------------------- 1 | # Learn Terraform Troubleshooting 2 | 3 | This is a companion repository for the [Learn Terraform Troubleshooting](https://learn.hashicorp.com/tutorials/terraform/troubleshooting-workflow) tutorial on HashiCorp Learn. Follow along to learn more about configuration language troubleshooting. 4 | -------------------------------------------------------------------------------- /service_aks_nginx.tf: -------------------------------------------------------------------------------- 1 | resource "kubernetes_service" "nginx" { 2 | metadata { 3 | name = "nginx-example" 4 | } 5 | spec { 6 | selector = { 7 | App = kubernetes_deployment.nginx.spec.0.template.0.metadata[0].labels.App 8 | } 9 | port { 10 | port = 80 11 | target_port = 80 12 | } 13 | 14 | type = "LoadBalancer" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /service_eks_nginx.tf: -------------------------------------------------------------------------------- 1 | resource "kubernetes_service" "nginx" { 2 | metadata { 3 | name = "nginx-example" 4 | } 5 | spec { 6 | selector = { 7 | App = kubernetes_deployment.nginx.spec.0.template.0.metadata[0].labels.App 8 | } 9 | port { 10 | port = 80 11 | target_port = 80 12 | } 13 | 14 | type = "LoadBalancer" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lab_kubernetes_service.tf: -------------------------------------------------------------------------------- 1 | resource "kubernetes_service" "nginx" { 2 | metadata { 3 | name = "robin" 4 | } 5 | spec { 6 | selector = { 7 | App = kubernetes_deployment.nginx.spec.0.template.0.metadata[0].labels.App 8 | } 9 | port { 10 | node_port = 30201 11 | port = 80 12 | target_port = 80 13 | } 14 | 15 | type = "NodePort" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /service_nginx.tf: -------------------------------------------------------------------------------- 1 | resource "kubernetes_service" "nginx" { 2 | metadata { 3 | name = "nginx-example" 4 | } 5 | spec { 6 | selector = { 7 | App = kubernetes_deployment.nginx.spec.0.template.0.metadata[0].labels.App 8 | } 9 | port { 10 | node_port = 30201 11 | port = 80 12 | target_port = 80 13 | } 14 | 15 | type = "NodePort" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demo-terraform-troubleshooting/outputs.tf: -------------------------------------------------------------------------------- 1 | output "instance_id" { 2 | description = "ID of the EC2 instance" 3 | value = aws_instance.web_app.id 4 | } 5 | 6 | output "instance_public_ip" { 7 | description = "Public IP address of the EC2 instance" 8 | value = aws_instance.web_app.public_ip 9 | } 10 | 11 | output "instance_name" { 12 | description = "Tags of the EC2 instance" 13 | value = aws_instance.web_app.tags 14 | } 15 | -------------------------------------------------------------------------------- /main_ml.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | docker = { 4 | source = "kreuzwerker/docker" 5 | } 6 | } 7 | } 8 | 9 | provider "docker" {} 10 | 11 | resource "docker_image" "nginx" { 12 | name = "nginx:latest" 13 | keep_locally = false 14 | } 15 | 16 | resource "docker_container" "nginx" { 17 | image = docker_image.nginx.latest 18 | name = "tutorial" 19 | ports { 20 | internal = 80 21 | external = 8000 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /main_docker.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | docker = { 4 | source = "kreuzwerker/docker" 5 | } 6 | } 7 | } 8 | 9 | provider "docker" {} 10 | 11 | resource "docker_image" "nginx" { 12 | name = "nginx:latest" 13 | keep_locally = false 14 | } 15 | 16 | resource "docker_container" "nginx" { 17 | image = docker_image.nginx.latest 18 | name = "tutorial" 19 | ports { 20 | internal = 80 21 | external = 8000 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /main_aws.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aws = { 4 | source = "hashicorp/aws" 5 | version = "~> 3.27" 6 | } 7 | } 8 | 9 | required_version = ">= 0.14.9" 10 | } 11 | 12 | provider "aws" { 13 | profile = "default" 14 | region = "us-east-1" 15 | } 16 | 17 | resource "aws_instance" "app_server" { 18 | ami = "ami-09e67e426f25ce0d7" 19 | instance_type = "t2.micro" 20 | 21 | tags = { 22 | Name = "ExampleAppServerInstance" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/kubernetes-dashboard-admin.rbac.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: admin-user 5 | namespace: kube-system 6 | --- 7 | # Create ClusterRoleBinding 8 | apiVersion: rbac.authorization.k8s.io/v1 9 | kind: ClusterRoleBinding 10 | metadata: 11 | name: admin-user 12 | roleRef: 13 | apiGroup: rbac.authorization.k8s.io 14 | kind: ClusterRole 15 | name: cluster-admin 16 | subjects: 17 | - kind: ServiceAccount 18 | name: admin-user 19 | namespace: kube-system 20 | -------------------------------------------------------------------------------- /main_w.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | docker = { 4 | source = "kreuzwerker/docker" 5 | } 6 | } 7 | } 8 | 9 | provider "docker" { 10 | host = "npipe:////.//pipe//docker_engine" 11 | } 12 | 13 | resource "docker_image" "nginx" { 14 | name = "nginx:latest" 15 | keep_locally = false 16 | } 17 | 18 | resource "docker_container" "nginx" { 19 | image = docker_image.nginx.latest 20 | name = "tutorial" 21 | ports { 22 | internal = 80 23 | external = 8000 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /terraform-variables-lab/README.md: -------------------------------------------------------------------------------- 1 | # Learn Terraform variables 2 | 3 | You can use input variables to customize your Terraform configuration with 4 | values that can be assigned by end users of your configuration. Input variables 5 | allow users to re-use and customize configuration by providing a consistent 6 | interface to change how a given configuration behaves. 7 | 8 | Follow along with this [tutorial on HashiCorp 9 | Learn](https://learn.hashicorp.com/tutorials/terraform/variables?in=terraform/configuration-language). 10 | -------------------------------------------------------------------------------- /azure_resource_block.txt: -------------------------------------------------------------------------------- 1 | # Create subnet 2 | resource "azurerm_subnet" "subnet" { 3 | name = "Robins" 4 | resource_group_name = "" 5 | virtual_network_name = azurerm_virtual_network.BatmanInc.name 6 | address_prefix = "10.0.1.0/24" 7 | } 8 | 9 | # Create Tag 10 | resource "azurerm_resource_group" "rg" { 11 | name = "" 12 | location = "centralus" 13 | tags = { 14 | Environment = "Terraform Getting Started" 15 | Team = "Batman" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /main_azure.tf: -------------------------------------------------------------------------------- 1 | # Configure the Azure provider 2 | terraform { 3 | required_providers { 4 | azurerm = { 5 | source = "hashicorp/azurerm" 6 | version = ">= 2.26" 7 | } 8 | } 9 | 10 | required_version = ">= 0.14.9" 11 | } 12 | 13 | provider "azurerm" { 14 | features {} 15 | skip_provider_registration = true 16 | } 17 | 18 | # Create a virtual network 19 | resource "azurerm_virtual_network" "vnet" { 20 | name = "BatmanInc" 21 | address_space = ["10.0.0.0/16"] 22 | location = "Central US" 23 | resource_group_name = "" 24 | } 25 | -------------------------------------------------------------------------------- /kubernetes.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | kubernetes = { 4 | source = "hashicorp/kubernetes" 5 | } 6 | } 7 | } 8 | 9 | variable "host" { 10 | type = string 11 | } 12 | 13 | variable "client_certificate" { 14 | type = string 15 | } 16 | 17 | variable "client_key" { 18 | type = string 19 | } 20 | 21 | variable "cluster_ca_certificate" { 22 | type = string 23 | } 24 | 25 | provider "kubernetes" { 26 | host = var.host 27 | 28 | client_certificate = base64decode(var.client_certificate) 29 | client_key = base64decode(var.client_key) 30 | cluster_ca_certificate = base64decode(var.cluster_ca_certificate) 31 | } 32 | -------------------------------------------------------------------------------- /terraform-variables-lab/modules/aws-instance/variables.tf: -------------------------------------------------------------------------------- 1 | variable "instance_count" { 2 | description = "Number of EC2 instances to deploy" 3 | type = number 4 | } 5 | 6 | variable "instance_type" { 7 | description = "Type of EC2 instance to use" 8 | type = string 9 | } 10 | 11 | variable "subnet_ids" { 12 | description = "Subnet IDs for EC2 instances" 13 | type = list(string) 14 | } 15 | 16 | variable "security_group_ids" { 17 | description = "Security group IDs for EC2 instances" 18 | type = list(string) 19 | } 20 | 21 | variable "tags" { 22 | description = "Tags for instances" 23 | type = map 24 | default = {} 25 | } 26 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aws = { 4 | source = "hashicorp/aws" 5 | version = ">= 3.20.0" 6 | } 7 | 8 | random = { 9 | source = "hashicorp/random" 10 | version = "3.0.0" 11 | } 12 | 13 | local = { 14 | source = "hashicorp/local" 15 | version = "2.0.0" 16 | } 17 | 18 | null = { 19 | source = "hashicorp/null" 20 | version = "3.0.0" 21 | } 22 | 23 | template = { 24 | source = "hashicorp/template" 25 | version = "2.2.0" 26 | } 27 | 28 | kubernetes = { 29 | source = "hashicorp/kubernetes" 30 | version = ">= 2.0.1" 31 | } 32 | } 33 | 34 | required_version = "> 0.14" 35 | } 36 | 37 | -------------------------------------------------------------------------------- /terraform-variables-lab/modules/aws-instance/main.tf: -------------------------------------------------------------------------------- 1 | data "aws_ami" "amazon_linux" { 2 | most_recent = true 3 | owners = ["amazon"] 4 | 5 | filter { 6 | name = "name" 7 | values = ["amzn2-ami-hvm-*-x86_64-gp2"] 8 | } 9 | } 10 | 11 | resource "aws_instance" "app" { 12 | count = var.instance_count 13 | 14 | ami = data.aws_ami.amazon_linux.id 15 | instance_type = var.instance_type 16 | 17 | subnet_id = var.subnet_ids[count.index % length(var.subnet_ids)] 18 | vpc_security_group_ids = var.security_group_ids 19 | 20 | user_data = <<-EOF 21 | #!/bin/bash 22 | sudo yum update -y 23 | sudo yum install httpd -y 24 | sudo systemctl enable httpd 25 | sudo systemctl start httpd 26 | echo "
Hello, world!
" > /var/www/html/index.html 27 | EOF 28 | 29 | tags = var.tags 30 | } 31 | -------------------------------------------------------------------------------- /lab_kubernetes_resources.tf: -------------------------------------------------------------------------------- 1 | resource "kubernetes_deployment" "nginx" { 2 | metadata { 3 | name = "long-live-the-bat" 4 | labels = { 5 | App = "longlivethebat" 6 | } 7 | } 8 | 9 | spec { 10 | replicas = 2 11 | selector { 12 | match_labels = { 13 | App = "longlivethebat" 14 | } 15 | } 16 | template { 17 | metadata { 18 | labels = { 19 | App = "longlivethebat" 20 | } 21 | } 22 | spec { 23 | container { 24 | image = "nginx:1.7.8" 25 | name = "batman" 26 | 27 | port { 28 | container_port = 80 29 | } 30 | 31 | resources { 32 | limits = { 33 | cpu = "0.5" 34 | memory = "512Mi" 35 | } 36 | requests = { 37 | cpu = "250m" 38 | memory = "50Mi" 39 | } 40 | } 41 | } 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/kubernetes.tf: -------------------------------------------------------------------------------- 1 | # Kubernetes provider 2 | # https://learn.hashicorp.com/terraform/kubernetes/provision-eks-cluster#optional-configure-terraform-kubernetes-provider 3 | # To learn how to schedule deployments and services using the provider, go here: https://learn.hashicorp.com/terraform/kubernetes/deploy-nginx-kubernetes 4 | 5 | # The Kubernetes provider is included in this file so the EKS module can complete successfully. Otherwise, it throws an error when creating `kubernetes_config_map.aws_auth`. 6 | # You should **not** schedule deployments and services in this workspace. This keeps workspaces modular (one for provision EKS, another for scheduling Kubernetes resources) as per best practices. 7 | 8 | provider "kubernetes" { 9 | host = data.aws_eks_cluster.cluster.endpoint 10 | token = data.aws_eks_cluster_auth.cluster.token 11 | cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data) 12 | } 13 | -------------------------------------------------------------------------------- /kubernetes_aks.tf: -------------------------------------------------------------------------------- 1 | resource "kubernetes_deployment" "nginx" { 2 | metadata { 3 | name = "scalable-nginx-example" 4 | labels = { 5 | App = "ScalableNginxExample" 6 | } 7 | } 8 | 9 | spec { 10 | replicas = 2 11 | selector { 12 | match_labels = { 13 | App = "ScalableNginxExample" 14 | } 15 | } 16 | template { 17 | metadata { 18 | labels = { 19 | App = "ScalableNginxExample" 20 | } 21 | } 22 | spec { 23 | container { 24 | image = "nginx:1.7.8" 25 | name = "example" 26 | 27 | port { 28 | container_port = 80 29 | } 30 | 31 | resources { 32 | limits = { 33 | cpu = "0.5" 34 | memory = "512Mi" 35 | } 36 | requests = { 37 | cpu = "250m" 38 | memory = "50Mi" 39 | } 40 | } 41 | } 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /resource_nginx.tf: -------------------------------------------------------------------------------- 1 | resource "kubernetes_deployment" "nginx" { 2 | metadata { 3 | name = "scalable-nginx-example" 4 | labels = { 5 | App = "ScalableNginxExample" 6 | } 7 | } 8 | 9 | spec { 10 | replicas = 2 11 | selector { 12 | match_labels = { 13 | App = "ScalableNginxExample" 14 | } 15 | } 16 | template { 17 | metadata { 18 | labels = { 19 | App = "ScalableNginxExample" 20 | } 21 | } 22 | spec { 23 | container { 24 | image = "nginx:1.7.8" 25 | name = "example" 26 | 27 | port { 28 | container_port = 80 29 | } 30 | 31 | resources { 32 | limits = { 33 | cpu = "0.5" 34 | memory = "512Mi" 35 | } 36 | requests = { 37 | cpu = "250m" 38 | memory = "50Mi" 39 | } 40 | } 41 | } 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/outputs.tf: -------------------------------------------------------------------------------- 1 | output "cluster_id" { 2 | description = "EKS cluster ID." 3 | value = module.eks.cluster_id 4 | } 5 | 6 | output "cluster_endpoint" { 7 | description = "Endpoint for EKS control plane." 8 | value = module.eks.cluster_endpoint 9 | } 10 | 11 | output "cluster_security_group_id" { 12 | description = "Security group ids attached to the cluster control plane." 13 | value = module.eks.cluster_security_group_id 14 | } 15 | 16 | output "kubectl_config" { 17 | description = "kubectl config as generated by the module." 18 | value = module.eks.kubeconfig 19 | } 20 | 21 | output "config_map_aws_auth" { 22 | description = "A kubernetes configuration to authenticate to this EKS cluster." 23 | value = module.eks.config_map_aws_auth 24 | } 25 | 26 | output "region" { 27 | description = "AWS region" 28 | value = var.region 29 | } 30 | 31 | output "cluster_name" { 32 | description = "Kubernetes Cluster Name" 33 | value = local.cluster_name 34 | } 35 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/security-groups.tf: -------------------------------------------------------------------------------- 1 | 2 | resource "aws_security_group" "worker_group_mgmt_one" { 3 | name_prefix = "worker_group_mgmt_one" 4 | vpc_id = module.vpc.vpc_id 5 | 6 | ingress { 7 | from_port = 22 8 | to_port = 22 9 | protocol = "tcp" 10 | 11 | cidr_blocks = [ 12 | "10.0.0.0/8", 13 | ] 14 | } 15 | } 16 | 17 | resource "aws_security_group" "worker_group_mgmt_two" { 18 | name_prefix = "worker_group_mgmt_two" 19 | vpc_id = module.vpc.vpc_id 20 | 21 | ingress { 22 | from_port = 22 23 | to_port = 22 24 | protocol = "tcp" 25 | 26 | cidr_blocks = [ 27 | "192.168.0.0/16", 28 | ] 29 | } 30 | } 31 | 32 | resource "aws_security_group" "all_worker_mgmt" { 33 | name_prefix = "all_worker_management" 34 | vpc_id = module.vpc.vpc_id 35 | 36 | ingress { 37 | from_port = 22 38 | to_port = 22 39 | protocol = "tcp" 40 | 41 | cidr_blocks = [ 42 | "10.0.0.0/8", 43 | "172.16.0.0/12", 44 | "192.168.0.0/16", 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /kubernetes_eks.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aws = { 4 | source = "hashicorp/aws" 5 | version = ">= 3.20.0" 6 | } 7 | 8 | kubernetes = { 9 | source = "hashicorp/kubernetes" 10 | version = ">= 2.0.1" 11 | } 12 | } 13 | } 14 | 15 | data "terraform_remote_state" "eks" { 16 | backend = "local" 17 | 18 | config = { 19 | path = "../demo-terraform-eks-cluster/terraform.tfstate" 20 | } 21 | } 22 | 23 | # Retrieve EKS cluster information 24 | provider "aws" { 25 | region = data.terraform_remote_state.eks.outputs.region 26 | } 27 | 28 | data "aws_eks_cluster" "cluster" { 29 | name = data.terraform_remote_state.eks.outputs.cluster_id 30 | } 31 | 32 | provider "kubernetes" { 33 | host = data.aws_eks_cluster.cluster.endpoint 34 | cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data) 35 | exec { 36 | api_version = "client.authentication.k8s.io/v1alpha1" 37 | command = "aws" 38 | args = [ 39 | "eks", 40 | "get-token", 41 | "--cluster-name", 42 | data.aws_eks_cluster.cluster.name 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/vpc.tf: -------------------------------------------------------------------------------- 1 | variable "region" { 2 | default = "us-east-1" 3 | description = "AWS region" 4 | } 5 | 6 | provider "aws" { 7 | region = "us-east-1" 8 | } 9 | 10 | data "aws_availability_zones" "available" {} 11 | 12 | locals { 13 | cluster_name = "education-eks-${random_string.suffix.result}" 14 | } 15 | 16 | resource "random_string" "suffix" { 17 | length = 8 18 | special = false 19 | } 20 | 21 | module "vpc" { 22 | source = "terraform-aws-modules/vpc/aws" 23 | version = "2.66.0" 24 | 25 | name = "education-vpc" 26 | cidr = "10.0.0.0/16" 27 | azs = data.aws_availability_zones.available.names 28 | private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] 29 | public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"] 30 | enable_nat_gateway = true 31 | single_nat_gateway = true 32 | enable_dns_hostnames = true 33 | 34 | tags = { 35 | "kubernetes.io/cluster/${local.cluster_name}" = "shared" 36 | } 37 | 38 | public_subnet_tags = { 39 | "kubernetes.io/cluster/${local.cluster_name}" = "shared" 40 | "kubernetes.io/role/elb" = "1" 41 | } 42 | 43 | private_subnet_tags = { 44 | "kubernetes.io/cluster/${local.cluster_name}" = "shared" 45 | "kubernetes.io/role/internal-elb" = "1" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/eks-cluster.tf: -------------------------------------------------------------------------------- 1 | module "eks" { 2 | source = "terraform-aws-modules/eks/aws" 3 | version = "17.24.0" 4 | cluster_name = local.cluster_name 5 | cluster_version = "1.20" 6 | subnets = module.vpc.private_subnets 7 | 8 | tags = { 9 | Environment = "training" 10 | GithubRepo = "terraform-aws-eks" 11 | GithubOrg = "terraform-aws-modules" 12 | } 13 | 14 | vpc_id = module.vpc.vpc_id 15 | 16 | workers_group_defaults = { 17 | root_volume_type = "gp2" 18 | } 19 | 20 | worker_groups = [ 21 | { 22 | name = "worker-group-1" 23 | instance_type = "t2.small" 24 | additional_userdata = "echo foo bar" 25 | asg_desired_capacity = 2 26 | additional_security_group_ids = [aws_security_group.worker_group_mgmt_one.id] 27 | }, 28 | { 29 | name = "worker-group-2" 30 | instance_type = "t2.medium" 31 | additional_userdata = "echo foo bar" 32 | additional_security_group_ids = [aws_security_group.worker_group_mgmt_two.id] 33 | asg_desired_capacity = 1 34 | }, 35 | ] 36 | } 37 | 38 | data "aws_eks_cluster" "cluster" { 39 | name = module.eks.cluster_id 40 | } 41 | 42 | data "aws_eks_cluster_auth" "cluster" { 43 | name = module.eks.cluster_id 44 | } 45 | -------------------------------------------------------------------------------- /demo-terraform-troubleshooting/main.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aws = { 4 | source = "hashicorp/aws" 5 | version = ">= 3.24.1" 6 | } 7 | } 8 | required_version = "~> 0.14" 9 | } 10 | 11 | provider "aws" { 12 | region = var.region 13 | } 14 | 15 | data "aws_ami" "ubuntu" { 16 | most_recent = true 17 | 18 | filter { 19 | name = "name" 20 | values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"] 21 | } 22 | 23 | filter { 24 | name = "virtualization-type" 25 | values = ["hvm"] 26 | } 27 | 28 | owners = ["099720109477"] # Canonical 29 | } 30 | 31 | data "http" "myip" { 32 | url = "http://ipv4.icanhazip.com" 33 | } 34 | 35 | resource "aws_instance" "web_app" { 36 | for_each = aws_security_group.*.id 37 | ami = data.aws_ami.ubuntu.id 38 | instance_type = "t2.micro" 39 | vpc_security_group_ids = [each.id] 40 | user_data = <<-EOF 41 | #!/bin/bash 42 | echo "Hello, World" > index.html 43 | nohup busybox httpd -f -p 8080 & 44 | EOF 45 | tags = { 46 | Name = $var.name-learn 47 | } 48 | } 49 | 50 | resource "aws_security_group" "sg_ping" { 51 | name = "Allow Ping" 52 | 53 | ingress { 54 | from_port = -1 55 | to_port = -1 56 | protocol = "icmp" 57 | security_groups = [aws_security_group.sg_8080.id] 58 | } 59 | } 60 | 61 | resource "aws_security_group" "sg_8080" { 62 | name = "Allow 8080" 63 | 64 | ingress { 65 | from_port = 8080 66 | to_port = 8080 67 | protocol = "tcp" 68 | security_groups = [aws_security_group.sg_ping.id] 69 | } 70 | } 71 | 72 | resource "aws_security_group_rule" "allow_localhost_8080" { 73 | type = "ingress" 74 | from_port = 8080 75 | to_port = 8080 76 | protocol = "tcp" 77 | cidr_blocks = ["${chomp(data.http.myip.body)}/32"] 78 | security_group_id = aws_security_group.sg_8080.id 79 | } 80 | 81 | resource "aws_security_group_rule" "allow_localhost_ping" { 82 | type = "ingress" 83 | from_port = -1 84 | to_port = -1 85 | protocol = "icmp" 86 | cidr_blocks = ["${chomp(data.http.myip.body)}/32"] 87 | security_group_id = aws_security_group.sg_ping.id 88 | } 89 | 90 | -------------------------------------------------------------------------------- /terraform-variables-lab/main.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aws = { 4 | source = "hashicorp/aws" 5 | } 6 | } 7 | } 8 | 9 | provider "aws" { 10 | region = "us-east-1" 11 | } 12 | 13 | data "aws_availability_zones" "available" { 14 | state = "available" 15 | } 16 | 17 | module "vpc" { 18 | source = "terraform-aws-modules/vpc/aws" 19 | version = "2.64.0" 20 | 21 | cidr = "10.0.0.0/16" 22 | 23 | azs = data.aws_availability_zones.available.names 24 | private_subnets = ["10.0.101.0/24", "10.0.102.0/24"] 25 | public_subnets = ["10.0.1.0/24", "10.0.2.0/24"] 26 | 27 | enable_nat_gateway = true 28 | enable_vpn_gateway = false 29 | 30 | tags = { 31 | project = "project-alpha", 32 | environment = "dev" 33 | } 34 | } 35 | 36 | module "app_security_group" { 37 | source = "terraform-aws-modules/security-group/aws//modules/web" 38 | version = "3.17.0" 39 | 40 | name = "web-sg-project-alpha-dev" 41 | description = "Security group for web-servers with HTTP ports open within VPC" 42 | vpc_id = module.vpc.vpc_id 43 | 44 | ingress_cidr_blocks = module.vpc.public_subnets_cidr_blocks 45 | 46 | tags = { 47 | project = "project-alpha", 48 | environment = "dev" 49 | } 50 | } 51 | 52 | module "lb_security_group" { 53 | source = "terraform-aws-modules/security-group/aws//modules/web" 54 | version = "3.17.0" 55 | 56 | name = "lb-sg-project-alpha-dev" 57 | description = "Security group for load balancer with HTTP ports open within VPC" 58 | vpc_id = module.vpc.vpc_id 59 | 60 | ingress_cidr_blocks = ["0.0.0.0/0"] 61 | 62 | tags = { 63 | project = "project-alpha", 64 | environment = "dev" 65 | } 66 | } 67 | 68 | resource "random_string" "lb_id" { 69 | length = 3 70 | special = false 71 | } 72 | 73 | module "elb_http" { 74 | source = "terraform-aws-modules/elb/aws" 75 | version = "2.4.0" 76 | 77 | # Ensure load balancer name is unique 78 | name = "lb-${random_string.lb_id.result}-project-alpha-dev" 79 | 80 | internal = false 81 | 82 | security_groups = [module.lb_security_group.this_security_group_id] 83 | subnets = module.vpc.public_subnets 84 | 85 | number_of_instances = length(module.ec2_instances.instance_ids) 86 | instances = module.ec2_instances.instance_ids 87 | 88 | listener = [{ 89 | instance_port = "80" 90 | instance_protocol = "HTTP" 91 | lb_port = "80" 92 | lb_protocol = "HTTP" 93 | }] 94 | 95 | health_check = { 96 | target = "HTTP:80/index.html" 97 | interval = 10 98 | healthy_threshold = 3 99 | unhealthy_threshold = 10 100 | timeout = 5 101 | } 102 | 103 | tags = { 104 | project = "project-alpha", 105 | environment = "dev" 106 | } 107 | } 108 | 109 | module "ec2_instances" { 110 | source = "./modules/aws-instance" 111 | 112 | instance_count = 2 113 | instance_type = "t3.micro" 114 | subnet_ids = module.vpc.private_subnets[*] 115 | security_group_ids = [module.app_security_group.this_security_group_id] 116 | 117 | tags = { 118 | project = "project-alpha", 119 | environment = "dev" 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /demo-terraform-eks-cluster/.terraform.lock.hcl: -------------------------------------------------------------------------------- 1 | # This file is maintained automatically by "terraform init". 2 | # Manual edits may be lost in future updates. 3 | 4 | provider "registry.terraform.io/hashicorp/aws" { 5 | version = "3.42.0" 6 | constraints = ">= 2.68.0, >= 3.20.0, >= 3.22.0, >= 3.37.0" 7 | hashes = [ 8 | "h1:C6/yDp6BhuDFx0qdkBuJj/OWUJpAoraHTJaU6ac38Rw=", 9 | "zh:126c856a6eedddd8571f161a826a407ba5655a37a6241393560a96b8c4beca1a", 10 | "zh:1a4868e6ac734b5fc2e79a4a889d176286b66664aad709435aa6acee5871d5b0", 11 | "zh:40fed7637ab8ddeb93bef06aded35d970f0628025b97459ae805463e8aa0a58a", 12 | "zh:68def3c0a5a1aac1db6372c51daef858b707f03052626d3427ac24cba6f2014d", 13 | "zh:6db7ec9c8d1803a0b6f40a664aa892e0f8894562de83061fa7ac1bc51ff5e7e5", 14 | "zh:7058abaad595930b3f97dc04e45c112b2dbf37d098372a849081f7081da2fb52", 15 | "zh:8c25adb15a19da301c478aa1f4a4d8647cabdf8e5dae8331d4490f80ea718c26", 16 | "zh:8e129b847401e39fcbc54817726dab877f36b7f00ff5ed76f7b43470abe99ff9", 17 | "zh:d268bb267a2d6b39df7ddee8efa7c1ef7a15cf335dfa5f2e64c9dae9b623a1b8", 18 | "zh:d6eeb3614a0ab50f8e9ab5666ae5754ea668ce327310e5b21b7f04a18d7611a8", 19 | "zh:f5d3c58055dff6e38562b75d3edc908cb2f1e45c6914f6b00f4773359ce49324", 20 | ] 21 | } 22 | 23 | provider "registry.terraform.io/hashicorp/cloudinit" { 24 | version = "2.2.0" 25 | hashes = [ 26 | "h1:siiI0wK6/jUDdA5P8ifTO0yc9YmXHml4hz5K9I9N+MA=", 27 | "zh:76825122171f9ea2287fd27e23e80a7eb482f6491a4f41a096d77b666896ee96", 28 | "zh:795a36dee548e30ca9c9d474af9ad6d29290e0a9816154ad38d55381cd0ab12d", 29 | "zh:9200f02cb917fb99e44b40a68936fd60d338e4d30a718b7e2e48024a795a61b9", 30 | "zh:a33cf255dc670c20678063aa84218e2c1b7a67d557f480d8ec0f68bc428ed472", 31 | "zh:ba3c1b2cd0879286c1f531862c027ec04783ece81de67c9a3b97076f1ce7f58f", 32 | "zh:bd575456394428a1a02191d2e46af0c00e41fd4f28cfe117d57b6aeb5154a0fb", 33 | "zh:c68dd1db83d8437c36c92dc3fc11d71ced9def3483dd28c45f8640cfcd59de9a", 34 | "zh:cbfe34a90852ed03cc074601527bb580a648127255c08589bc3ef4bf4f2e7e0c", 35 | "zh:d6ffd7398c6d1f359b96f5b757e77b99b339fbb91df1b96ac974fe71bc87695c", 36 | "zh:d9c15285f847d7a52df59e044184fb3ba1b7679fd0386291ed183782683d9517", 37 | "zh:f7dd02f6d36844da23c9a27bb084503812c29c1aec4aba97237fec16860fdc8c", 38 | ] 39 | } 40 | 41 | provider "registry.terraform.io/hashicorp/kubernetes" { 42 | version = "2.2.0" 43 | constraints = ">= 1.11.1, >= 2.0.1" 44 | hashes = [ 45 | "h1:iGRiQAggGI+k1uhlLhqbYQtAg3GYYO+0UP1aRjYvdaI=", 46 | "zh:41be89f07c279425a146a31c2cca646efab65f4d5f0b8bbd6059761ff0446231", 47 | "zh:4cbbb28396dc766bfca7ee2dbc19fa57331754eca7fee0fe57a87a73f5010f20", 48 | "zh:5df93be3e696d60139a485a2937176739f05ac1884850bc58839c3ed99cff995", 49 | "zh:64f01bcfc2ad1a42fbd307b9ceb7f70b3c19b35cdd0b950005190ec2de41083a", 50 | "zh:7fc88030e20dd9560fd0e64c094d07d6f0c8d1db7838f77dc278f3cae93e7207", 51 | "zh:81f7a855f1de2859c83565bc278869f6c7565b56d966fe9a4ef59fb55e5366d8", 52 | "zh:d74811f3d3112ab52d151e1e1fa7fc9087d0ea5cc9ef72484c612780890ee586", 53 | "zh:e93c93c43445855b4a75ec754b8c1579c55f95c23c1a33c188a57aa38357e513", 54 | "zh:f67b32a26cbb763134f6294a2b95798d63aacc63532457c10dc779819f6d8ad0", 55 | "zh:fb435298e7b0d8a021bdbfa496dd5c76c9eb0dada4b406b3439949bd4aef756a", 56 | "zh:ffafbdea9766b89525c67886f6f0ee9992ae48a229c689716952d71a06b05107", 57 | ] 58 | } 59 | 60 | provider "registry.terraform.io/hashicorp/local" { 61 | version = "2.0.0" 62 | constraints = ">= 1.4.0, 2.0.0" 63 | hashes = [ 64 | "h1:pO1ANXtOCRfecKsY9Hn4UsXoPBLv6LFiDIEiS1MZ09E=", 65 | "zh:34ce8b79493ace8333d094752b579ccc907fa9392a2c1d6933a6c95d0786d3f1", 66 | "zh:5c5a19c4f614a4ffb68bae0b0563f3860115cf7539b8adc21108324cfdc10092", 67 | "zh:67ddb1ca2cd3e1a8f948302597ceb967f19d2eeb2d125303493667388fe6330e", 68 | "zh:68e6b16f3a8e180fcba1a99754118deb2d82331b51f6cca39f04518339bfdfa6", 69 | "zh:8393a12eb11598b2799d51c9b0a922a3d9fadda5a626b94a1b4914086d53120e", 70 | "zh:90daea4b2010a86f2aca1e3a9590e0b3ddcab229c2bd3685fae76a832e9e836f", 71 | "zh:99308edc734a0ac9149b44f8e316ca879b2670a1cae387a8ae754c180b57cdb4", 72 | "zh:c76594db07a9d1a73372a073888b672df64adb455d483c2426cc220eda7e092e", 73 | "zh:dc09c1fb36c6a706bdac96cce338952888c8423978426a09f5df93031aa88b84", 74 | "zh:deda88134e9780319e8de91b3745520be48ead6ec38cb662694d09185c3dac70", 75 | ] 76 | } 77 | 78 | provider "registry.terraform.io/hashicorp/null" { 79 | version = "3.0.0" 80 | constraints = ">= 2.1.0, 3.0.0" 81 | hashes = [ 82 | "h1:V1tzrSG6t3e7zWvUwRbGbhsWU2Jd/anrJpOl9XM+R/8=", 83 | "zh:05fb7eab469324c97e9b73a61d2ece6f91de4e9b493e573bfeda0f2077bc3a4c", 84 | "zh:1688aa91885a395c4ae67636d411475d0b831e422e005dcf02eedacaafac3bb4", 85 | "zh:24a0b1292e3a474f57c483a7a4512d797e041bc9c2fbaac42fe12e86a7fb5a3c", 86 | "zh:2fc951bd0d1b9b23427acc93be09b6909d72871e464088171da60fbee4fdde03", 87 | "zh:6db825759425599a326385a68acc6be2d9ba0d7d6ef587191d0cdc6daef9ac63", 88 | "zh:85985763d02618993c32c294072cc6ec51f1692b803cb506fcfedca9d40eaec9", 89 | "zh:a53186599c57058be1509f904da512342cfdc5d808efdaf02dec15f0f3cb039a", 90 | "zh:c2e07b49b6efa676bdc7b00c06333ea1792a983a5720f9e2233db27323d2707c", 91 | "zh:cdc8fe1096103cf5374751e2e8408ec4abd2eb67d5a1c5151fe2c7ecfd525bef", 92 | "zh:dbdef21df0c012b0d08776f3d4f34eb0f2f229adfde07ff252a119e52c0f65b7", 93 | ] 94 | } 95 | 96 | provider "registry.terraform.io/hashicorp/random" { 97 | version = "3.0.0" 98 | constraints = ">= 2.1.0, 3.0.0" 99 | hashes = [ 100 | "h1:yhHJpb4IfQQfuio7qjUXuUFTU/s+ensuEpm23A+VWz0=", 101 | "zh:0fcb00ff8b87dcac1b0ee10831e47e0203a6c46aafd76cb140ba2bab81f02c6b", 102 | "zh:123c984c0e04bad910c421028d18aa2ca4af25a153264aef747521f4e7c36a17", 103 | "zh:287443bc6fd7fa9a4341dec235589293cbcc6e467a042ae225fd5d161e4e68dc", 104 | "zh:2c1be5596dd3cca4859466885eaedf0345c8e7628503872610629e275d71b0d2", 105 | "zh:684a2ef6f415287944a3d966c4c8cee82c20e393e096e2f7cdcb4b2528407f6b", 106 | "zh:7625ccbc6ff17c2d5360ff2af7f9261c3f213765642dcd84e84ae02a3768fd51", 107 | "zh:9a60811ab9e6a5bfa6352fbb943bb530acb6198282a49373283a8fa3aa2b43fc", 108 | "zh:c73e0eaeea6c65b1cf5098b101d51a2789b054201ce7986a6d206a9e2dacaefd", 109 | "zh:e8f9ed41ac83dbe407de9f0206ef1148204a0d51ba240318af801ffb3ee5f578", 110 | "zh:fbdd0684e62563d3ac33425b0ac9439d543a3942465f4b26582bcfabcb149515", 111 | ] 112 | } 113 | 114 | provider "registry.terraform.io/hashicorp/template" { 115 | version = "2.2.0" 116 | constraints = ">= 2.1.0, 2.2.0" 117 | hashes = [ 118 | "h1:0wlehNaxBX7GJQnPfQwTNvvAf38Jm0Nv7ssKGMaG6Og=", 119 | "zh:01702196f0a0492ec07917db7aaa595843d8f171dc195f4c988d2ffca2a06386", 120 | "zh:09aae3da826ba3d7df69efeb25d146a1de0d03e951d35019a0f80e4f58c89b53", 121 | "zh:09ba83c0625b6fe0a954da6fbd0c355ac0b7f07f86c91a2a97849140fea49603", 122 | "zh:0e3a6c8e16f17f19010accd0844187d524580d9fdb0731f675ffcf4afba03d16", 123 | "zh:45f2c594b6f2f34ea663704cc72048b212fe7d16fb4cfd959365fa997228a776", 124 | "zh:77ea3e5a0446784d77114b5e851c970a3dde1e08fa6de38210b8385d7605d451", 125 | "zh:8a154388f3708e3df5a69122a23bdfaf760a523788a5081976b3d5616f7d30ae", 126 | "zh:992843002f2db5a11e626b3fc23dc0c87ad3729b3b3cff08e32ffb3df97edbde", 127 | "zh:ad906f4cebd3ec5e43d5cd6dc8f4c5c9cc3b33d2243c89c5fc18f97f7277b51d", 128 | "zh:c979425ddb256511137ecd093e23283234da0154b7fa8b21c2687182d9aea8b2", 129 | ] 130 | } 131 | 132 | provider "registry.terraform.io/terraform-aws-modules/http" { 133 | version = "2.4.0" 134 | constraints = ">= 2.4.0" 135 | hashes = [ 136 | "h1:YLDIXOsMLK2QwMff0s9LrmJOw8JYLgi/2+OwwH/FSiY=", 137 | "zh:28530c6e1ff67cd0d769d9b657bf9b8e6b2d48dd5ee18962882484d0762ce023", 138 | "zh:55d77f44f85c9bde7f22c86ad50dc64b9bfe05a8c53e510f536607259b815826", 139 | "zh:5bd48a5f687353459cfa8728f4ef366cb0326157be168f34d0f22a4e811339a9", 140 | "zh:5da63cf9e0d6a47f89f23b60776930c50fe31f96d1d6c8c416974679d8083f05", 141 | "zh:6a9a34024fea6be19c7748f98f15a88acd972d55216fefee7f1208841963ef07", 142 | "zh:7d7ffde9ef572ca4f8605f23c699a8695ebb54343fb34b5d85ea8cdb3a92c383", 143 | "zh:8743280724624c1b97e1e48245a8354ea005f940816a2cc39cd2e9ce06a89390", 144 | "zh:aa3f72176abff81bcc52cbbce53bde956691c119f5f14aa0ed8d7469fb29fa84", 145 | "zh:ab3f6898fc08331690e42eceabe2ddc20d5eaf0a83bf0c6084de24d1b6869980", 146 | "zh:be86fb122309f12fb956f2de42787e26aee74307b0c28ac51f5ddd3503896b81", 147 | "zh:ef000b2e602a4d23c6657e3b52a8a1b720a46472b198ca2e5309fd257f753506", 148 | "zh:f63f8d97c12b160c8dd7187d40849bcc5d96c80938c57db480552830de1e14a5", 149 | "zh:fccaf02ed91528ecdde1515ce32e57f09f140d8b487b2c47dc2b1f0f8e76db8b", 150 | ] 151 | } 152 | --------------------------------------------------------------------------------