Skip to content

Auto-apply firewall changes to CSB-provisioned services to allow access #273

Description

@ccheetham

Per chat with @bart-vmware ...

Get service guid

# sample
$ GUID=$(cf service myPostgreSqlService | grep '^guid:' | awk '{print $2}')
$ echo GUID
e0d6db7e-83a0-4f77-8951-0faca24486a6

PostgreSQL

$ az postgres server firewall-rule create --name GCP1 --resource-group cotati --server-name csb-postgresql-$GUID --start-ip-address 34.0.0.0 --end-ip-address 35.255.255.255
$ az postgres server firewall-rule create --name GCP2 --resource-group cotati --server-name csb-postgresql-$GUID --start-ip-address 104.0.0.0 --end-ip-address 107.255.255.255

SQL Server

$ az sql server firewall-rule create --name GCP1 --resource-group cotati --server csb-azsql-$GUID --start-ip-address 34.0.0.0 --end-ip-address 35.255.255.255
$ az sql server firewall-rule create --name GCP2 --resource-group cotati --server csb-azsql-$GUID --start-ip-address 104.0.0.0 --end-ip-address 107.255.255.255

CosmosDB

$ az cosmosdb update --resource-group cotati --name csb$GUID --ip-range-filter 34.0.0.0/7,104.0.0.0/6

MongoDB

$ az cosmosdb update --resource-group cotati --name csb$GUID --ip-range-filter 34.0.0.0/7,104.0.0.0/6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions