Last active
October 6, 2020 15:43
-
-
Save kluu1/e30b577bdb8cb5846f5f2552860b4b74 to your computer and use it in GitHub Desktop.
Revisions
-
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -42,10 +42,10 @@ data "aws_ami" "ubuntu" { } resource "aws_instance" "jenkins" { ami = data.aws_ami.ubuntu.id instance_type = "t2.micro" security_groups = [aws_security_group.web_traffic.name] key_name = "kluu" tags = { "Name" = "Jenkins_Server" -
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,6 +45,7 @@ resource "aws_instance" "jenkins" { ami = data.aws_ami.ubuntu.id instance_type = "t2.micro" security_groups = [aws_security_group.web_traffic.name] key_name = "kluu" tags = { "Name" = "Jenkins_Server" -
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,12 +5,12 @@ provider "aws" { variable "ingressrules" { type = list(number) default = [80, 443, 22] } resource "aws_security_group" "web_traffic" { name = "Allow web traffic" description = "Allow ssh and standard http/https ports inbound and everything outbound" dynamic "ingress" { iterator = port -
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ variable "ingressrules" { default = [80, 443] } resource "aws_security_group" "web_traffic" { name = "Allow web traffic" description = "Allow standard http/https ports inbound and everything outbound" dynamic "ingress" { @@ -36,15 +36,16 @@ resource "aws_security_group" "prod_web" { } data "aws_ami" "ubuntu" { ... } resource "aws_instance" "jenkins" { ami = data.aws_ami.ubuntu.id instance_type = "t2.micro" security_groups = [aws_security_group.web_traffic.name] tags = { "Name" = "Jenkins_Server" "Terraform" = "true" -
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -38,4 +38,15 @@ resource "aws_security_group" "prod_web" { data "aws_ami" "ubuntu" { most_recent = true ... resource "aws_instance" "jenkins" { ami = data.aws_ami.ubuntu.id instance_type = "t2.micro" security_groups = [aws_security_group.prod_web.id] tags = { "Name" = "Jenkins_Server" "Terraform" = "true" } } -
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ variable "ingressrules" { resource "aws_security_group" "prod_web" { name = "prod_web" description = "Allow standard http/https ports inbound and everything outbound" dynamic "ingress" { iterator = port -
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 17 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,21 +3,30 @@ provider "aws" { region = "us-east-1" } variable "ingressrules" { type = list(number) default = [80, 443] } resource "aws_security_group" "prod_web" { name = "prod_web" description = "Allow standard http port inbound and everything outbound" dynamic "ingress" { iterator = port for_each = var.ingressrules content { from_port = port.value to_port = port.value protocol = "TCP" cidr_blocks = ["0.0.0.0/0"] } } egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } -
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 1 addition and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,20 +5,14 @@ provider "aws" { resource "aws_security_group" "prod_web" { name = "prod_web" description = "Allow standard http port inbound and everything outbound" ingress { from_port = 80 to_port = 80 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } egress { from_port = 0 -
kluu1 revised this gist
Oct 6, 2020 . 1 changed file with 1 addition and 21 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -35,24 +35,4 @@ resource "aws_security_group" "prod_web" { data "aws_ami" "ubuntu" { most_recent = true ... -
kluu1 created this gist
Oct 6, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,58 @@ provider "aws" { profile = "default" region = "us-east-1" } resource "aws_security_group" "prod_web" { name = "prod_web" description = "Allow standard http/https ports inbound and everything outbound" ingress { from_port = 80 to_port = 80 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } ingress { from_port = 443 to_port = 443 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } tags = { "Terraform" = "true" } } data "aws_ami" "ubuntu" { most_recent = true filter { name = "name" values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"] } filter { name = "virtualization-type" values = ["hvm"] } owners = ["099720109477"] } resource "aws_instance" "jenkins" { ami = data.aws_ami.ubuntu.id instance_type = "t2.micro" tags = { "Name" = "Jenkins_Server" "Terraform" = "true" } }