Skip to content

Commit

Permalink
Add mechanism in terragrunt templates to turn off external IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
erl-hpe committed Jun 12, 2024
1 parent 639b286 commit 5eb9a85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion vtds_provider_gcp/private/virtual_blade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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" % (
Expand All @@ -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(
Expand Down

0 comments on commit 5eb9a85

Please sign in to comment.