Skip to content

Commit

Permalink
Merge pull request #208 from couchbase-partners/GCP-Custom-Network
Browse files Browse the repository at this point in the history
Gcp custom network
  • Loading branch information
malscent authored Jun 27, 2024
2 parents 823cfef + 2e934de commit ad97b80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions gcp/couchbase-server/resources/firewall_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ def generate_config(context):
# Here is where work is done. This method is what is called to retrieve a dictionary that represents the type.
# All required parameters defined in the schema will be present on the context object. This must return a
# python dict with a structure that matches the API items found
suffix = context.properties['nameSuffix']
project = context.env['project']
network = context.properties['network']
if isinstance(network, list):
network = network[0]

if network == "default":
network = 'projects/{}/global/networks/{}'.format(project, network)

suffix = context.properties['nameSuffix']
project = context.env['project']
network = 'projects/{}/global/networks/{}'.format(project, network)

sourceCidr = context.properties['accessCIDR']
network = 'projects/{}/global/networks/{}'.format(project, network)
tag = 'couchbase-server-{}'.format(suffix)
resources = []
output = []
Expand Down
2 changes: 1 addition & 1 deletion gcp/couchbase-server/test_config.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resources:
- name: test-couchbase-deployment
type: couchbase.py
properties:
name: couchbase-server-test
name: ja-test-stack
serverNodeCount: 3
serverNodeType: n1-standard-4
serverDiskSize: 20
Expand Down

0 comments on commit ad97b80

Please sign in to comment.