From 1555b615c005291ea2274cc9d26ac3abb1cacb4b Mon Sep 17 00:00:00 2001 From: dfisiuk <156551204+dfisiuk@users.noreply.github.com> Date: Fri, 4 Oct 2024 20:57:04 +0200 Subject: [PATCH] GCE: Added network tags support (#272) Added gce network tags support --- .../gce/playbooks/tasks/create_linux_instance.yml | 1 + .../gce/playbooks/tasks/create_windows_instance.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/src/molecule_plugins/gce/playbooks/tasks/create_linux_instance.yml b/src/molecule_plugins/gce/playbooks/tasks/create_linux_instance.yml index 8f25b0b0..1564397e 100644 --- a/src/molecule_plugins/gce/playbooks/tasks/create_linux_instance.yml +++ b/src/molecule_plugins/gce/playbooks/tasks/create_linux_instance.yml @@ -28,6 +28,7 @@ subnetwork: selfLink: "{{ gcp_snet }}" access_configs: "{{ [{'name': 'instance_ip', 'type': 'ONE_TO_ONE_NAT'}] if molecule_yml.driver.external_access else [] }}" + tags: "{{ item.tags | default(omit) }}" zone: "{{ item.zone | default(molecule_yml.driver.region + '-b') }}" project: "{{ gcp_project_id }}" scopes: "{{ molecule_yml.driver.scopes | default(['https://www.googleapis.com/auth/compute'], True) }}" diff --git a/src/molecule_plugins/gce/playbooks/tasks/create_windows_instance.yml b/src/molecule_plugins/gce/playbooks/tasks/create_windows_instance.yml index 57ba741f..e8284095 100644 --- a/src/molecule_plugins/gce/playbooks/tasks/create_windows_instance.yml +++ b/src/molecule_plugins/gce/playbooks/tasks/create_windows_instance.yml @@ -20,6 +20,7 @@ subnetwork: selfLink: "{{ gcp_snet }}" access_configs: "{{ [{'name': 'instance_ip', 'type': 'ONE_TO_ONE_NAT'}] if molecule_yml.driver.external_access else [] }}" + tags: "{{ item.tags | default(omit) }}" zone: "{{ item.zone | default(molecule_yml.driver.region + '-b') }}" project: "{{ gcp_project_id }}" scopes: "{{ molecule_yml.driver.scopes | default(['https://www.googleapis.com/auth/compute'], True) }}"