mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-09 04:10:27 -07:00
tests: fix gcp_compute_region_url_map
- remove the global health check (not necessary to create a backend service) - configure backend service to external, as internal backend services cannot use the HTTP protocol.
This commit is contained in:
parent
c962945615
commit
7fb64edcc5
2 changed files with 4 additions and 34 deletions
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
||||||
|
|
|
@ -13,29 +13,15 @@
|
||||||
#
|
#
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Pre-test setup
|
# Pre-test setup
|
||||||
- name: create a health check
|
|
||||||
google.cloud.gcp_compute_health_check:
|
|
||||||
name: "{{ resource_name }}"
|
|
||||||
type: HTTP
|
|
||||||
http_health_check:
|
|
||||||
port: 80
|
|
||||||
check_interval_sec: 1
|
|
||||||
timeout_sec: 1
|
|
||||||
project: "{{ gcp_project }}"
|
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
|
||||||
state: present
|
|
||||||
register: healthcheck
|
|
||||||
- name: create a region backend service
|
- name: create a region backend service
|
||||||
google.cloud.gcp_compute_region_backend_service:
|
google.cloud.gcp_compute_region_backend_service:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
region: us-central1
|
region: us-central1
|
||||||
health_checks:
|
|
||||||
- "{{ healthcheck.selfLink }}"
|
|
||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
load_balancing_scheme: "EXTERNAL"
|
||||||
state: present
|
state: present
|
||||||
register: backendservice
|
register: backendservice
|
||||||
- name: delete a region URL map
|
- name: delete a region URL map
|
||||||
|
@ -144,26 +130,11 @@
|
||||||
google.cloud.gcp_compute_region_backend_service:
|
google.cloud.gcp_compute_region_backend_service:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
region: us-central1
|
region: us-central1
|
||||||
health_checks:
|
|
||||||
- "{{ healthcheck.selfLink }}"
|
|
||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
load_balancing_scheme: "EXTERNAL"
|
||||||
state: absent
|
state: absent
|
||||||
register: backendservice
|
register: backendservice
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
- name: delete a health check
|
|
||||||
google.cloud.gcp_compute_health_check:
|
|
||||||
name: "{{ resource_name }}"
|
|
||||||
type: HTTP
|
|
||||||
http_health_check:
|
|
||||||
port: 80
|
|
||||||
check_interval_sec: 1
|
|
||||||
timeout_sec: 1
|
|
||||||
project: "{{ gcp_project }}"
|
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
|
||||||
state: absent
|
|
||||||
register: healthcheck
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue