Add source snapshot to ansible (#300)

* Make `iap` field computed (#3814) (#272)

Signed-off-by: Modular Magician <magic-modules@google.com>

* add source_image and source_snapshot to google_compute_image (#3799) (#273)

* add source_image to google_compute_image

* add source_snapshot to google_compute_image

* PR comment changes

Signed-off-by: Modular Magician <magic-modules@google.com>

* Collection fixes for release (#3831) (#274)

Signed-off-by: Modular Magician <magic-modules@google.com>

* Add new field filter to pubsub. (#3759) (#275)

* Add new field filter to pubsub.

Fixes: https://github.com/terraform-providers/terraform-provider-google/issues/6727

* Fixed filter name, it was improperly set.

* add filter key to pubsub subscription unit test

* spaces not tabs!

* hardcode filter value in test

* revert remove escaped quotes

Co-authored-by: Tim O'Connell <hi@timoconnell.co.uk>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Tim O'Connell <hi@timoconnell.co.uk>

* Add archive class to gcs (#3867) (#276)

Signed-off-by: Modular Magician <magic-modules@google.com>

* Add support for gRPC healthchecks (#3825) (#277)

Signed-off-by: Modular Magician <magic-modules@google.com>

* Add enableMessageOrdering to Pub/Sub Subscription (#3872) (#278)

Add enableMessageOrdering to Pub/Sub Subscription

Signed-off-by: Modular Magician <magic-modules@google.com>

* use {product}.googleapis.com endpoints (#3755) (#279)

* use {product}.googleapis.com endpoints

* use actual correct urls

* fix zone data source test

* fix network peering tests

* possibly fix deleting default network

Signed-off-by: Modular Magician <magic-modules@google.com>

* Removed instances where input and output are both true (#3890) (#280)

* [provider-yaml] - Removed instances where input and output are both true

* modified to only supply output. Following pattern from bigquerydatatransfer

Co-authored-by: Scott Suarez <scottsuarez@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Scott Suarez <scottsuarez@google.com>

* retrypolicy attribute added (#3843) (#281)

* retrypolicy attribute added

* test case updated

Signed-off-by: Modular Magician <magic-modules@google.com>

* Advanced logging config options in google_compute_subnetwork (#3603) (#282)

Co-authored-by: Dana Hoffman <danahoffman@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Dana Hoffman <danahoffman@google.com>

* Add Erase Windows VSS support to compute disk (#3898) (#283)

Co-authored-by: Cameron Thornton <camthornton@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Cameron Thornton <camthornton@google.com>

* Add Snapshot location to compute snapshot (#3896) (#286)

* added storage locations

* add storage locations to field

* tweak cmek logic

* fix the decoder logic and cleanup whitespaces

* remove duplicate entry

Signed-off-by: Modular Magician <magic-modules@google.com>

* Added missing 'all' option for protocol firewall rule (#3962) (#287)

Signed-off-by: Modular Magician <magic-modules@google.com>

* Added support GRPC for google_compute_(region)_backend_service.protocol (#3973) (#289)

Co-authored-by: Edward Sun <sunedward@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Edward Sun <sunedward@google.com>

* Add schema update support to spanner db 2082 (#3947) (#291)

* eoncders and customdiff added for spanner DB ddl update

* config update test case added

* customdiff modified to handle out-of-index issue

* new lines added

* indent fixed

* indent fixed for tests

* test added for ddl update condition

* mock added Terraformresourcediff, unit tests added

* test fixed

* more unit tests added

* tests fixed

* PR comments implemented

* unit tests converted to table driven tests

* ImportStateVerifyIgnore flag added to tests

* syntax corrected in test

Signed-off-by: Modular Magician <magic-modules@google.com>

* Added properties of options & artifacts on google_cloudbuild_trigger (#3944) (#292)

* added options & artifacts to cloudbuild trigger

* updated with minor changes and added more options in test

* a test adding update behavior for multiple optional fields

Co-authored-by: Edward Sun <sunedward@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Edward Sun <sunedward@google.com>

* Enable TPUs to use Shared VPC (#3939) (#293)

* add support for shared vpc

* make cidr_block computable

* add diffsuppression

* tweak diffsupression to ignore when network has a change

* rework diffsupress

* add customizediff

* switch the diff checks

Signed-off-by: Modular Magician <magic-modules@google.com>

* Add SEV_CAPABLE option to google_compute_image (#3994) (#294)

Signed-off-by: Modular Magician <magic-modules@google.com>

* Update docs for pubsub targets in cloud scheduler (#4008) (#295)

Signed-off-by: Modular Magician <magic-modules@google.com>

* Make RegionBackendService health checks optional (#4053) (#297)

Signed-off-by: Modular Magician <magic-modules@google.com>

* Update terminology for IAM roles (#4056) (#299)

Roles like "Owner" and "Editor" are now called "basic roles": https://cloud.google.com/iam/docs/understand

Signed-off-by: Modular Magician <magic-modules@google.com>

* Add source snapshot to ansible (#4060)

Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Tim O'Connell <hi@timoconnell.co.uk>
Co-authored-by: Scott Suarez <scottsuarez@google.com>
Co-authored-by: Dana Hoffman <danahoffman@google.com>
Co-authored-by: Cameron Thornton <camthornton@google.com>
Co-authored-by: Edward Sun <sunedward@google.com>
This commit is contained in:
The Magician 2020-10-06 15:39:08 -07:00 committed by GitHub
parent fb1485be7b
commit 7fa00db18c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
169 changed files with 2105 additions and 764 deletions

View file

@ -41,7 +41,6 @@ description:
successfully to some number of consecutive probes, it is marked healthy again and
can receive new connections.
short_description: Creates a GCP HealthCheck
version_added: '2.6'
author: Google Inc. (@googlecloudplatform)
requirements:
- python >= 2.6
@ -171,7 +170,6 @@ options:
- 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"'
required: false
type: str
version_added: '2.9'
https_health_check:
description:
- A nested object resource.
@ -233,7 +231,6 @@ options:
- 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"'
required: false
type: str
version_added: '2.9'
tcp_health_check:
description:
- A nested object resource.
@ -288,7 +285,6 @@ options:
- 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"'
required: false
type: str
version_added: '2.9'
ssl_health_check:
description:
- A nested object resource.
@ -343,13 +339,11 @@ options:
- 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"'
required: false
type: str
version_added: '2.9'
http2_health_check:
description:
- A nested object resource.
required: false
type: dict
version_added: '2.10'
suboptions:
host:
description:
@ -406,6 +400,49 @@ options:
- 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"'
required: false
type: str
grpc_health_check:
description:
- A nested object resource.
required: false
type: dict
suboptions:
port:
description:
- The port number for the health check request. Must be specified if portName
and portSpecification are not set or if port_specification is USE_FIXED_PORT.
Valid values are 1 through 65535.
required: false
type: int
port_name:
description:
- Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name
are defined, port takes precedence.
required: false
type: str
port_specification:
description:
- 'Specifies how port is selected for health checking, can be one of the following
values: * `USE_FIXED_PORT`: The port number in `port` is used for health
checking.'
- "* `USE_NAMED_PORT`: The `portName` is used for health checking."
- "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for
each network endpoint is used for health checking. For other backends, the
port or named port specified in the Backend Service is used for health checking."
- If not specified, gRPC health check follows behavior specified in `port`
and `portName` fields.
- 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"'
required: false
type: str
grpc_service_name:
description:
- 'The gRPC service name for the health check. The value of grpcServiceName
has the following meanings by convention: - Empty serviceName means the
overall status of all services at the backend.'
- "- Non-empty serviceName means the health of that gRPC service, as defined
by the owner of the service."
- The grpcServiceName can only be ASCII.
required: false
type: str
project:
description:
- The Google Cloud Platform project to use.
@ -437,6 +474,7 @@ options:
description:
- Array of scopes to be used
type: list
elements: str
env_type:
description:
- Specifies which Ansible environment you're running this module within.
@ -797,6 +835,47 @@ http2HealthCheck:
and `portName` fields.
returned: success
type: str
grpcHealthCheck:
description:
- A nested object resource.
returned: success
type: complex
contains:
port:
description:
- The port number for the health check request. Must be specified if portName
and portSpecification are not set or if port_specification is USE_FIXED_PORT.
Valid values are 1 through 65535.
returned: success
type: int
portName:
description:
- Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name
are defined, port takes precedence.
returned: success
type: str
portSpecification:
description:
- 'Specifies how port is selected for health checking, can be one of the following
values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking.'
- "* `USE_NAMED_PORT`: The `portName` is used for health checking."
- "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each
network endpoint is used for health checking. For other backends, the port
or named port specified in the Backend Service is used for health checking."
- If not specified, gRPC health check follows behavior specified in `port` and
`portName` fields.
returned: success
type: str
grpcServiceName:
description:
- 'The gRPC service name for the health check. The value of grpcServiceName
has the following meanings by convention: - Empty serviceName means the overall
status of all services at the backend.'
- "- Non-empty serviceName means the health of that gRPC service, as defined
by the owner of the service."
- The grpcServiceName can only be ASCII.
returned: success
type: str
'''
################################################################################
@ -890,6 +969,10 @@ def main():
port_specification=dict(type='str'),
),
),
grpc_health_check=dict(
type='dict',
options=dict(port=dict(type='int'), port_name=dict(type='str'), port_specification=dict(type='str'), grpc_service_name=dict(type='str')),
),
)
)
@ -954,6 +1037,7 @@ def resource_to_request(module):
u'tcpHealthCheck': HealthCheckTcphealthcheck(module.params.get('tcp_health_check', {}), module).to_request(),
u'sslHealthCheck': HealthCheckSslhealthcheck(module.params.get('ssl_health_check', {}), module).to_request(),
u'http2HealthCheck': HealthCheckHttp2healthcheck(module.params.get('http2_health_check', {}), module).to_request(),
u'grpcHealthCheck': HealthCheckGrpchealthcheck(module.params.get('grpc_health_check', {}), module).to_request(),
}
return_vals = {}
for k, v in request.items():
@ -969,11 +1053,11 @@ def fetch_resource(module, link, kind, allow_not_found=True):
def self_link(module):
return "https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks/{name}".format(**module.params)
return "https://compute.googleapis.com/compute/v1/projects/{project}/global/healthChecks/{name}".format(**module.params)
def collection(module):
return "https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks".format(**module.params)
return "https://compute.googleapis.com/compute/v1/projects/{project}/global/healthChecks".format(**module.params)
def return_if_object(module, response, kind, allow_not_found=False):
@ -1033,13 +1117,14 @@ def response_to_hash(module, response):
u'tcpHealthCheck': HealthCheckTcphealthcheck(response.get(u'tcpHealthCheck', {}), module).from_response(),
u'sslHealthCheck': HealthCheckSslhealthcheck(response.get(u'sslHealthCheck', {}), module).from_response(),
u'http2HealthCheck': HealthCheckHttp2healthcheck(response.get(u'http2HealthCheck', {}), module).from_response(),
u'grpcHealthCheck': HealthCheckGrpchealthcheck(response.get(u'grpcHealthCheck', {}), module).from_response(),
}
def async_op_url(module, extra_data=None):
if extra_data is None:
extra_data = {}
url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}"
url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}"
combined = extra_data.copy()
combined.update(module.params)
return url.format(**combined)
@ -1242,5 +1327,34 @@ class HealthCheckHttp2healthcheck(object):
)
class HealthCheckGrpchealthcheck(object):
def __init__(self, request, module):
self.module = module
if request:
self.request = request
else:
self.request = {}
def to_request(self):
return remove_nones_from_dict(
{
u'port': self.request.get('port'),
u'portName': self.request.get('port_name'),
u'portSpecification': self.request.get('port_specification'),
u'grpcServiceName': self.request.get('grpc_service_name'),
}
)
def from_response(self):
return remove_nones_from_dict(
{
u'port': self.request.get(u'port'),
u'portName': self.request.get(u'portName'),
u'portSpecification': self.request.get(u'portSpecification'),
u'grpcServiceName': self.request.get(u'grpcServiceName'),
}
)
if __name__ == '__main__':
main()