diff --git a/plugins/modules/gcp_compute_forwarding_rule.py b/plugins/modules/gcp_compute_forwarding_rule.py index fffc849..152e36a 100644 --- a/plugins/modules/gcp_compute_forwarding_rule.py +++ b/plugins/modules/gcp_compute_forwarding_rule.py @@ -354,12 +354,6 @@ RETURN = ''' - This field is not used for internal load balancing. returned: success type: dict - labelFingerprint: - description: - - The fingerprint used for optimistic locking of this resource. Used internally during - updates. - returned: success - type: str networkTier: description: - 'The networking tier used for configuring this address. This field can take the @@ -471,19 +465,6 @@ def target_update(module, request, response): ) -def label_fingerprint_update(module, request, response): - auth = GcpSession(module, 'compute') - auth.post( - ''.join([ - "https://www.googleapis.com/compute/v1/", - "projects/{project}/regions/{region}/forwardingRules/{name}/setLabels" - ]).format(**module.params), - { - u'labelFingerprint': response.get('labelFingerprint') - } - ) - - def delete(module, link, kind): auth = GcpSession(module, 'compute') return wait_for_operation(module, auth.delete(link)) @@ -584,7 +565,6 @@ def response_to_hash(module, response): u'ports': response.get(u'ports'), u'subnetwork': response.get(u'subnetwork'), u'target': response.get(u'target'), - u'labelFingerprint': response.get(u'labelFingerprint'), u'networkTier': module.params.get('network_tier') } diff --git a/plugins/modules/gcp_compute_forwarding_rule_facts.py b/plugins/modules/gcp_compute_forwarding_rule_facts.py index 7c69bc8..5ada983 100644 --- a/plugins/modules/gcp_compute_forwarding_rule_facts.py +++ b/plugins/modules/gcp_compute_forwarding_rule_facts.py @@ -197,12 +197,6 @@ items: - This field is not used for internal load balancing. returned: success type: dict - labelFingerprint: - description: - - The fingerprint used for optimistic locking of this resource. Used internally during - updates. - returned: success - type: str networkTier: description: - 'The networking tier used for configuring this address. This field can take the diff --git a/plugins/modules/gcp_compute_global_address.py b/plugins/modules/gcp_compute_global_address.py index 9126d9a..1ebed4d 100644 --- a/plugins/modules/gcp_compute_global_address.py +++ b/plugins/modules/gcp_compute_global_address.py @@ -119,12 +119,6 @@ RETURN = ''' be a dash. returned: success type: str - labelFingerprint: - description: - - The fingerprint used for optimistic locking of this resource. Used internally during - updates. - returned: success - type: str ipVersion: description: - The IP Version that will be used by this address. Valid options are IPV4 or IPV6. @@ -185,7 +179,7 @@ def main(): if fetch: if state == 'present': if is_different(module, fetch): - update(module, self_link(module), kind, fetch) + update(module, self_link(module), kind) fetch = fetch_resource(module, self_link(module), kind) changed = True else: @@ -209,27 +203,8 @@ def create(module, link, kind): return wait_for_operation(module, auth.post(link, resource_to_request(module))) -def update(module, link, kind, fetch): - update_fields(module, resource_to_request(module), - response_to_hash(module, fetch)) - return fetch_resource(module, self_link(module), kind) - - -def update_fields(module, request, response): - pass - - -def label_fingerprint_update(module, request, response): - auth = GcpSession(module, 'compute') - auth.post( - ''.join([ - "https://www.googleapis.com/compute/v1/", - "projects/{project}/global/addresses/{name}/setLabels" - ]).format(**module.params), - { - u'labelFingerprint': response.get('labelFingerprint') - } - ) +def update(module, link, kind): + module.fail_json(msg="GlobalAddress cannot be edited") def delete(module, link, kind): @@ -315,7 +290,6 @@ def response_to_hash(module, response): u'description': response.get(u'description'), u'id': response.get(u'id'), u'name': response.get(u'name'), - u'labelFingerprint': response.get(u'labelFingerprint'), u'ipVersion': response.get(u'ipVersion'), u'region': response.get(u'region'), u'addressType': response.get(u'addressType') diff --git a/plugins/modules/gcp_compute_global_address_facts.py b/plugins/modules/gcp_compute_global_address_facts.py index e8cdea5..295b8c9 100644 --- a/plugins/modules/gcp_compute_global_address_facts.py +++ b/plugins/modules/gcp_compute_global_address_facts.py @@ -95,12 +95,6 @@ items: be a dash. returned: success type: str - labelFingerprint: - description: - - The fingerprint used for optimistic locking of this resource. Used internally during - updates. - returned: success - type: str ipVersion: description: - The IP Version that will be used by this address. Valid options are IPV4 or IPV6.