diff --git a/gcp/couchbase-server/resources/firewall_rule.py b/gcp/couchbase-server/resources/firewall_rule.py index 1a7146d..fbf638a 100644 --- a/gcp/couchbase-server/resources/firewall_rule.py +++ b/gcp/couchbase-server/resources/firewall_rule.py @@ -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 = [] diff --git a/gcp/couchbase-server/test_config.local.yaml b/gcp/couchbase-server/test_config.local.yaml index 3f7b9ce..e9e5a60 100644 --- a/gcp/couchbase-server/test_config.local.yaml +++ b/gcp/couchbase-server/test_config.local.yaml @@ -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