Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set space ASGs with terraform #46

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/actions/deploy-proxy/action.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,3 @@ jobs:
cf_org: gsa-tts-devtools-prototyping
cf_space: rahearn
cf_command: push --vars-file config/deployment/production.yml --var rails_master_key="${{ secrets.RAILS_MASTER_KEY }}" --strategy rolling

- name: Deploy egress proxy
uses: ./.github/actions/deploy-proxy
env:
CF_USERNAME: ${{ secrets.CF_USERNAME }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
with:
cf_space: rahearn
8 changes: 0 additions & 8 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,3 @@ jobs:
cf_org: gsa-tts-devtools-prototyping
cf_space: rahearn
cf_command: push --vars-file config/deployment/staging.yml --var rails_master_key="${{ secrets.RAILS_MASTER_KEY }}" --strategy rolling

- name: Ensure proper space ASG rules
uses: ./.github/actions/deploy-proxy
env:
CF_USERNAME: ${{ secrets.CF_USERNAME }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
with:
cf_space: rahearn
18 changes: 16 additions & 2 deletions terraform/staging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ locals {
app_name = "continuous_monitoring"
}

module "app_space" {
source = "github.com/gsa-tts/terraform-cloudgov//cg_space?ref=cg-space-asg"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
# deployers should include any user or service account ID that will deploy the app
deployers = [
"[email protected]",
var.cf_user
]
asg_names = ["trusted_local_networks_egress"]
}

module "database" {
source = "github.com/gsa-tts/terraform-cloudgov//database?ref=v1.0.0"

Expand All @@ -24,7 +37,7 @@ module "redis" {
}

module "egress_space" {
source = "github.com/gsa-tts/terraform-cloudgov//cg_space?ref=egress-proxy"
source = "github.com/gsa-tts/terraform-cloudgov//cg_space?ref=cg-space-asg"

cf_org_name = local.cf_org_name
cf_space_name = "${local.cf_space_name}-egress"
Expand All @@ -33,10 +46,11 @@ module "egress_space" {
"[email protected]",
var.cf_user
]
asg_names = ["public_networks_egress"]
}

module "egress_proxy" {
source = "github.com/gsa-tts/terraform-cloudgov//egress_proxy?ref=egress-proxy"
source = "github.com/gsa-tts/terraform-cloudgov//egress_proxy?ref=main"

cf_org_name = local.cf_org_name
cf_space_name = module.egress_space.space_name
Expand Down