feat: add support for using application default credentials when running integration tests

This commit is contained in:
Chris Hawk 2023-11-09 16:34:51 -08:00
commit bf74697b3f
90 changed files with 856 additions and 793 deletions

View file

@ -19,7 +19,7 @@
region: us-west1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: present
register: address
- name: create a network
@ -27,7 +27,7 @@
name: network-vpngateway
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
auto_create_subnetworks: true
state: present
register: network
@ -38,7 +38,7 @@
network: "{{ network }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
#----------------------------------------------------------
- name: create a target vpn gateway
@ -48,7 +48,7 @@
network: "{{ network }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: present
register: result
- name: assert changed is true
@ -62,7 +62,7 @@
region: us-west1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
scopes:
- https://www.googleapis.com/auth/compute
register: results
@ -78,7 +78,7 @@
network: "{{ network }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: present
register: result
- name: assert changed is false
@ -93,7 +93,7 @@
network: "{{ network }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
register: result
- name: assert changed is true
@ -107,7 +107,7 @@
region: us-west1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
scopes:
- https://www.googleapis.com/auth/compute
register: results
@ -123,7 +123,7 @@
network: "{{ network }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
register: result
- name: assert changed is false
@ -138,7 +138,7 @@
name: network-vpngateway
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
auto_create_subnetworks: true
state: absent
register: network
@ -149,7 +149,7 @@
region: us-west1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
register: address
ignore_errors: true