Skip to content

Instantly share code, notes, and snippets.

@rdalbuquerque
Created June 6, 2021 18:35
Show Gist options
  • Save rdalbuquerque/10c4e5906c4cb293f04a9a6101ed003d to your computer and use it in GitHub Desktop.
Save rdalbuquerque/10c4e5906c4cb293f04a9a6101ed003d to your computer and use it in GitHub Desktop.
Terraform for Kubernetes lab - 2
# Setting up master node
resource "aws_instance" "kube_master" {
ami = "ami-02e2a5679226e293c" # ID of default Debian 10 ami (64-bit|x86)
instance_type = "t2.micro" # To keep it free tier eligible we will be using t2.micro
tags = {
Name = "kube-master"
}
key_name = "k8s-lab"
}
# Setting up worker nodes
resource "aws_instance" "kube_worker" {
count = 2
ami = "ami-02e2a5679226e293c" # ID of default Debian 10 ami (64-bit|x86)
instance_type = "t2.micro" # To keep it free tier eligible we will be using t2.micro
tags = {
Name = "kube-worker"
}
key_name = "k8s-lab"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment