Skip to content

Commit

Permalink
1.20 release branch
Browse files Browse the repository at this point in the history
  • Loading branch information
phillhocking committed Feb 9, 2022
1 parent df73fd9 commit afaefe3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 40 deletions.
2 changes: 1 addition & 1 deletion backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
organization = "phillhocking"

workspaces {
name = "aws-ubuntu-tig-dev"
name = "aws-ubuntu-tig-prod"
}
}
}
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data "aws_ami" "ubuntu" {

filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20210621"]
values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20220131"]
}

filter {
Expand All @@ -25,13 +25,13 @@ data "template_file" "deploy" {

}

resource "aws_instance" "tig_dev" {
resource "aws_instance" "tig_prod" {
ami = data.aws_ami.ubuntu.id
instance_type = "t2.micro"
key_name = var.key_name
vpc_security_group_ids = [aws_security_group.tig_dev.id]
vpc_security_group_ids = [aws_security_group.tig_prod.id]
user_data = data.template_file.deploy.rendered
tags = {
Name = "tig-dev"
Name = "tig-prod"
}
}
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "public_ip" {
description = "List of public IP addresses assigned to the instances, if applicable"
value = aws_instance.tig_dev.public_ip
value = aws_instance.tig_prod.public_ip
}
9 changes: 3 additions & 6 deletions security_groups.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_security_group" "tig_dev" {
name = "tig-dev"
resource "aws_security_group" "tig_prod" {
name = "tig-prod"
description = "Allow SSH inbound, all HTTP inbound on port 3000, and all outbound traffic"

ingress {
Expand All @@ -9,9 +9,6 @@ resource "aws_security_group" "tig_dev" {
cidr_blocks = [var.management_cidr_block]
}

# These hardcoded values come from the Terraform Cloud API described at https://www.terraform.io/docs/cloud/api/ip-ranges.html so the provisioner blocks can run
# These may be subject to change

ingress {
from_port = 3000
to_port = 3000
Expand All @@ -25,4 +22,4 @@ resource "aws_security_group" "tig_dev" {
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
}
}
28 changes: 0 additions & 28 deletions tig.sh

This file was deleted.

0 comments on commit afaefe3

Please sign in to comment.