Skip to content

Commit

Permalink
Sets security group
Browse files Browse the repository at this point in the history
  • Loading branch information
bonzofenix committed Jun 10, 2024
1 parent 9fe9d11 commit 0a1bc85
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ci/infrastructure/assets/postgres-security-group.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"protocol": "tcp",
"destination": "10.0.2.0/24",
"ports": "5524",
"description": "Allow postgres traffic from"
}
]
9 changes: 9 additions & 0 deletions ci/infrastructure/scripts/deploy-multiapps-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ function deploy_multiapps_controller() {
cf push -f manifest.yml
}

function add_postrgres_security_group() {
pushd ${CI_DIR}/ci/infrastructure/assets
cf create-security-group postgres-security-group postgres-security-group.json
cf bind-security-group postgres-security-group org ${cf_org}
cf bind-security-group postgres-security-group space ${cf_space}
popd
}

function cleanup_multiapps_controller() {
cf delete -f multiapps-controller
cf delete-service -f deploy-service-database
Expand All @@ -35,4 +43,5 @@ load_bbl_vars
cf_login
cleanup_multiapps_controller
create_postgres_service
add_postrgres_security_group
deploy_multiapps_controller

0 comments on commit 0a1bc85

Please sign in to comment.