mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-09-30 05:23:29 -07:00
examples showing an improper auth value (#87)
<!-- This change is generated by MagicModules. --> /cc @rambleraptor
This commit is contained in:
parent
9782d6906b
commit
0a18332815
98 changed files with 2171 additions and 1727 deletions
|
@ -144,6 +144,11 @@ options:
|
|||
resource quota is sufficient for this number of instances. You must also have
|
||||
available firewall and routes quota.
|
||||
required: true
|
||||
version:
|
||||
description:
|
||||
- The version of the Kubernetes of this node.
|
||||
required: false
|
||||
version_added: 2.8
|
||||
autoscaling:
|
||||
description:
|
||||
- Autoscaler configuration for this NodePool. Autoscaler is enabled only if a
|
||||
|
@ -188,24 +193,15 @@ options:
|
|||
description:
|
||||
- Specifies the Auto Upgrade knobs for the node pool.
|
||||
required: false
|
||||
suboptions:
|
||||
auto_upgrade_start_time:
|
||||
description:
|
||||
- This field is set when upgrades are about to commence with the approximate
|
||||
start time for the upgrades, in RFC3339 text format.
|
||||
required: false
|
||||
description:
|
||||
description:
|
||||
- This field is set when upgrades are about to commence with the description
|
||||
of the upgrade.
|
||||
required: false
|
||||
suboptions: {}
|
||||
cluster:
|
||||
description:
|
||||
- The cluster this node pool belongs to.
|
||||
- 'This field represents a link to a Cluster resource in GCP. It can be specified
|
||||
in two ways. First, you can place in the name of the resource here as a string
|
||||
Alternatively, you can add `register: name-of-resource` to a gcp_container_cluster
|
||||
task and then set this cluster field to "{{ name-of-resource }}"'
|
||||
in two ways. First, you can place a dictionary with key ''name'' and value of
|
||||
your resource''s name Alternatively, you can add `register: name-of-resource`
|
||||
to a gcp_container_cluster task and then set this cluster field to "{{ name-of-resource
|
||||
}}"'
|
||||
required: true
|
||||
location:
|
||||
description:
|
||||
|
@ -221,21 +217,21 @@ extends_documentation_fragment: gcp
|
|||
EXAMPLES = '''
|
||||
- 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: create a node pool
|
||||
gcp_container_node_pool:
|
||||
name: my-pool
|
||||
name: "test_object"
|
||||
initial_node_count: 4
|
||||
cluster: "{{ cluster }}"
|
||||
location: us-central1-a
|
||||
zone: us-central1-a
|
||||
project: "test_project"
|
||||
auth_kind: "serviceaccount"
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
|
@ -418,7 +414,7 @@ cluster:
|
|||
description:
|
||||
- The cluster this node pool belongs to.
|
||||
returned: success
|
||||
type: str
|
||||
type: dict
|
||||
location:
|
||||
description:
|
||||
- The location where the node pool is deployed.
|
||||
|
@ -462,16 +458,12 @@ def main():
|
|||
),
|
||||
),
|
||||
initial_node_count=dict(required=True, type='int'),
|
||||
version=dict(type='str'),
|
||||
autoscaling=dict(type='dict', options=dict(enabled=dict(type='bool'), min_node_count=dict(type='int'), max_node_count=dict(type='int'))),
|
||||
management=dict(
|
||||
type='dict',
|
||||
options=dict(
|
||||
auto_upgrade=dict(type='bool'),
|
||||
auto_repair=dict(type='bool'),
|
||||
upgrade_options=dict(type='dict', options=dict(auto_upgrade_start_time=dict(type='str'), description=dict(type='str'))),
|
||||
),
|
||||
type='dict', options=dict(auto_upgrade=dict(type='bool'), auto_repair=dict(type='bool'), upgrade_options=dict(type='dict', options=dict()))
|
||||
),
|
||||
cluster=dict(required=True),
|
||||
cluster=dict(required=True, type='dict'),
|
||||
location=dict(required=True, type='str', aliases=['region', 'zone']),
|
||||
)
|
||||
)
|
||||
|
@ -526,6 +518,7 @@ def resource_to_request(module):
|
|||
u'name': module.params.get('name'),
|
||||
u'config': NodePoolConfig(module.params.get('config', {}), module).to_request(),
|
||||
u'initialNodeCount': module.params.get('initial_node_count'),
|
||||
u'version': module.params.get('version'),
|
||||
u'autoscaling': NodePoolAutoscaling(module.params.get('autoscaling', {}), module).to_request(),
|
||||
u'management': NodePoolManagement(module.params.get('management', {}), module).to_request(),
|
||||
}
|
||||
|
@ -604,7 +597,7 @@ def response_to_hash(module, response):
|
|||
u'name': response.get(u'name'),
|
||||
u'config': NodePoolConfig(response.get(u'config', {}), module).from_response(),
|
||||
u'initialNodeCount': module.params.get('initial_node_count'),
|
||||
u'version': response.get(u'version'),
|
||||
u'version': module.params.get('version'),
|
||||
u'autoscaling': NodePoolAutoscaling(response.get(u'autoscaling', {}), module).from_response(),
|
||||
u'management': NodePoolManagement(response.get(u'management', {}), module).from_response(),
|
||||
}
|
||||
|
@ -755,10 +748,10 @@ class NodePoolUpgradeoptions(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict({u'autoUpgradeStartTime': self.request.get('auto_upgrade_start_time'), u'description': self.request.get('description')})
|
||||
return remove_nones_from_dict({})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict({u'autoUpgradeStartTime': self.request.get(u'autoUpgradeStartTime'), u'description': self.request.get(u'description')})
|
||||
return remove_nones_from_dict({})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue