Skip to content

Commit

Permalink
Update Infrastructure configurations (#37)
Browse files Browse the repository at this point in the history
* missed out bastion host in security group. removing it

* updated teardown working directory

* fixed terraform destroy error

trying -reconfigure flag instead

trying -migrate-state flag

updated to "terraform init"

fix dockerfile path

fixed the path for init to reference dev env

changed init path to main infra instead

update init flags

added init backend before init infra

removed inits and use apply -destroy

retry terraform init without working dir

try init working dir in main infra

* added env name to pipeline

* added teardown for prod

* update terraform destroy syntax

* update destroy syntax

* add in conditional check for dev env

* add review before setup dev env and reduce az count

* sync changes to prod workflow
  • Loading branch information
Owen-Choh authored Aug 22, 2024
1 parent 8c2bf96 commit 8113e96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
setup:
# prod setup should only occur on the prod repo
if: github.repository == 'ssg-wsg/Sample-Codes'
environment: production
needs:
- test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -134,6 +135,7 @@ jobs:
setup-dev:
# dev setup should occur outside the prod repo
if: github.repository != 'ssg-wsg/Sample-Codes'
environment: dev
needs:
- test
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ output "ssh_public_key" {
}

output "az_count" {
value = 3
value = 1
}

output "desired_instances_count" {
Expand Down Expand Up @@ -114,10 +114,6 @@ output "launch_instance_instance_type" {
value = "t2.micro"
}

output "bastion_host_instance_type" {
value = "t2.micro"
}

output "broadcast_ipv4" {
value = "0.0.0.0/0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ resource "aws_security_group" "ec2" {
security_groups = [aws_security_group.alb.id]
}

ingress {
from_port = 22
to_port = 22
protocol = "tcp"
security_groups = [aws_security_group.bastion_host.id]
}

egress {
from_port = 0
to_port = 0
Expand Down

0 comments on commit 8113e96

Please sign in to comment.