Changing NodePool from Zone to Location (#182)

<!-- This change is generated by MagicModules. -->
/cc @rambleraptor
This commit is contained in:
The Magician 2019-01-31 09:54:33 -08:00 committed by Alex Stephen
commit 1ec588abb1
5 changed files with 59 additions and 46 deletions

View file

@ -15,20 +15,20 @@
# Pre-test setup
- name: create a cluster
gcp_container_cluster:
name: cluster-nodepool
initial_node_count: 4
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
name: "cluster-nodepool"
initial_node_count: 4
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: cluster
- name: delete a node pool
gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
zone: us-central1-a
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -39,7 +39,7 @@
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
zone: us-central1-a
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -52,7 +52,7 @@
- name: verify that node_pool was created
gcp_container_node_pool_facts:
cluster: "{{ cluster }}"
zone: us-central1-a
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -69,7 +69,7 @@
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
zone: us-central1-a
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -85,7 +85,7 @@
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
zone: us-central1-a
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -98,7 +98,7 @@
- name: verify that node_pool was deleted
gcp_container_node_pool_facts:
cluster: "{{ cluster }}"
zone: us-central1-a
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -115,7 +115,7 @@
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
zone: us-central1-a
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -130,12 +130,12 @@
# If errors happen, don't crash the playbook!
- name: delete a cluster
gcp_container_cluster:
name: cluster-nodepool
initial_node_count: 4
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: absent
name: "cluster-nodepool"
initial_node_count: 4
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: cluster
ignore_errors: true