diff --git a/vtds_provider_gcp/private/terragrunt/templates/system/platform/virtual-blade/compute_instance/deploy/terragrunt.hcl b/vtds_provider_gcp/private/terragrunt/templates/system/platform/virtual-blade/compute_instance/deploy/terragrunt.hcl index 0444268..82d5031 100644 --- a/vtds_provider_gcp/private/terragrunt/templates/system/platform/virtual-blade/compute_instance/deploy/terragrunt.hcl +++ b/vtds_provider_gcp/private/terragrunt/templates/system/platform/virtual-blade/compute_instance/deploy/terragrunt.hcl @@ -70,7 +70,9 @@ inputs = { network = "" subnetwork = format("{{ interconnect_name }}-%s", local.vtds_vars.provider.project.region) subnetwork_project = dependency.service_project.outputs.project_id + {% if access_config %} access_config = local.vtds_vars.{{ config_path }}.access_config + {% endif %} add_hostname_suffix = local.vtds_vars.{{ config_path }}.add_hostname_suffix hostname_suffix_separator = local.vtds_vars.{{ config_path }}.hostname_suffix_separator hostname = local.vtds_vars.{{ config_path }}.hostname diff --git a/vtds_provider_gcp/private/virtual_blade.py b/vtds_provider_gcp/private/virtual_blade.py index 160fce1..b413595 100644 --- a/vtds_provider_gcp/private/virtual_blade.py +++ b/vtds_provider_gcp/private/virtual_blade.py @@ -68,6 +68,7 @@ def initialize(self, key, blade_config): try: interconnect = blade_config['blade_interconnect'] boot_disk = blade_config.get('vm', {})['boot_disk'] + access_config = blade_config.get('access_config', []) except KeyError as err: raise ContextualError( "missing config in the Virtual Blade class '%s': %s" % ( @@ -79,7 +80,8 @@ def initialize(self, key, blade_config): 'blade_class': key, 'interconnect_name': interconnect['subnetwork'], 'config_path': "provider.virtual_blades.%s" % key, - 'source_image_private': boot_disk['source_image_private'] + 'source_image_private': boot_disk['source_image_private'], + 'access_config': access_config, } except KeyError as err: raise ContextualError(