Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have metadata item fail on create if the key is already present #151

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3063.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: updated `google_compute_project_metadata_item` to fail on create if its key is already present in the project metadata.
```
54 changes: 32 additions & 22 deletions plugins/modules/gcp_compute_region_backend_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
description:
- A multiplier applied to the group's maximum servicing capacity (based on
UTILIZATION, RATE or CONNECTION).
- Default value is 1, which means the group will serve up to 100% of its configured
capacity (depending on balancingMode).
- "~>**NOTE**: This field cannot be set for INTERNAL region backend services
(default loadBalancingScheme), but is required for non-INTERNAL backend
service. The total capacity_scaler for all backends must be non-zero."
- A setting of 0 means the group is completely drained, offering 0% of its
available Capacity. Valid range is [0.0,1.0].
required: false
Expand Down Expand Up @@ -98,31 +99,34 @@
description:
- The max number of simultaneous connections for the group. Can be used with
either CONNECTION or UTILIZATION balancing modes.
- Cannot be set for INTERNAL backend services.
- For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance
or maxConnectionsPerEndpoint, as appropriate for group type, must be set.
required: false
type: int
max_connections_per_instance:
description:
- The max number of simultaneous connections that a single backend instance
can handle. This is used to calculate the capacity of the group. Can be
used in either CONNECTION or UTILIZATION balancing modes.
can handle. Cannot be set for INTERNAL backend services.
- This is used to calculate the capacity of the group.
- Can be used in either CONNECTION or UTILIZATION balancing modes.
- For CONNECTION mode, either maxConnections or maxConnectionsPerInstance
must be set.
required: false
type: int
max_connections_per_endpoint:
description:
- The max number of simultaneous connections that a single backend network
endpoint can handle. This is used to calculate the capacity of the group.
Can be used in either CONNECTION or UTILIZATION balancing modes.
- For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint
must be set.
endpoint can handle. Cannot be set for INTERNAL backend services.
- This is used to calculate the capacity of the group. Can be used in either
CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections
or maxConnectionsPerEndpoint must be set.
required: false
type: int
max_rate:
description:
- The max requests per second (RPS) of the group.
- The max requests per second (RPS) of the group. Cannot be set for INTERNAL
backend services.
- Can be used with either RATE or UTILIZATION balancing modes, but required
if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint,
as appropriate for group type, must be set.
Expand All @@ -133,21 +137,22 @@
- The max requests per second (RPS) that a single backend instance can handle.
This is used to calculate the capacity of the group. Can be used in either
balancing mode. For RATE mode, either maxRate or maxRatePerInstance must
be set.
be set. Cannot be set for INTERNAL backend services.
required: false
type: str
max_rate_per_endpoint:
description:
- The max requests per second (RPS) that a single backend network endpoint
can handle. This is used to calculate the capacity of the group. Can be
used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint
must be set.
must be set. Cannot be set for INTERNAL backend services.
required: false
type: str
max_utilization:
description:
- Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization
target for the group. Valid range is [0.0, 1.0].
- Cannot be set for INTERNAL backend services.
required: false
type: str
connection_draining:
Expand Down Expand Up @@ -320,8 +325,9 @@
description:
- A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION,
RATE or CONNECTION).
- Default value is 1, which means the group will serve up to 100% of its configured
capacity (depending on balancingMode).
- "~>**NOTE**: This field cannot be set for INTERNAL region backend services
(default loadBalancingScheme), but is required for non-INTERNAL backend service.
The total capacity_scaler for all backends must be non-zero."
- A setting of 0 means the group is completely drained, offering 0% of its available
Capacity. Valid range is [0.0,1.0].
returned: success
Expand Down Expand Up @@ -352,31 +358,34 @@
description:
- The max number of simultaneous connections for the group. Can be used with
either CONNECTION or UTILIZATION balancing modes.
- Cannot be set for INTERNAL backend services.
- For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance
or maxConnectionsPerEndpoint, as appropriate for group type, must be set.
returned: success
type: int
maxConnectionsPerInstance:
description:
- The max number of simultaneous connections that a single backend instance
can handle. This is used to calculate the capacity of the group. Can be used
in either CONNECTION or UTILIZATION balancing modes.
can handle. Cannot be set for INTERNAL backend services.
- This is used to calculate the capacity of the group.
- Can be used in either CONNECTION or UTILIZATION balancing modes.
- For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must
be set.
returned: success
type: int
maxConnectionsPerEndpoint:
description:
- The max number of simultaneous connections that a single backend network endpoint
can handle. This is used to calculate the capacity of the group. Can be used
in either CONNECTION or UTILIZATION balancing modes.
- For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must
be set.
can handle. Cannot be set for INTERNAL backend services.
- This is used to calculate the capacity of the group. Can be used in either
CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections
or maxConnectionsPerEndpoint must be set.
returned: success
type: int
maxRate:
description:
- The max requests per second (RPS) of the group.
- The max requests per second (RPS) of the group. Cannot be set for INTERNAL
backend services.
- Can be used with either RATE or UTILIZATION balancing modes, but required
if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint,
as appropriate for group type, must be set.
Expand All @@ -387,21 +396,22 @@
- The max requests per second (RPS) that a single backend instance can handle.
This is used to calculate the capacity of the group. Can be used in either
balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be
set.
set. Cannot be set for INTERNAL backend services.
returned: success
type: str
maxRatePerEndpoint:
description:
- The max requests per second (RPS) that a single backend network endpoint can
handle. This is used to calculate the capacity of the group. Can be used in
either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint
must be set.
must be set. Cannot be set for INTERNAL backend services.
returned: success
type: str
maxUtilization:
description:
- Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization
target for the group. Valid range is [0.0, 1.0].
- Cannot be set for INTERNAL backend services.
returned: success
type: str
connectionDraining:
Expand Down
27 changes: 16 additions & 11 deletions plugins/modules/gcp_compute_region_backend_service_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@
description:
- A multiplier applied to the group's maximum servicing capacity (based
on UTILIZATION, RATE or CONNECTION).
- Default value is 1, which means the group will serve up to 100% of its
configured capacity (depending on balancingMode).
- "~>**NOTE**: This field cannot be set for INTERNAL region backend services
(default loadBalancingScheme), but is required for non-INTERNAL backend
service. The total capacity_scaler for all backends must be non-zero."
- A setting of 0 means the group is completely drained, offering 0% of its
available Capacity. Valid range is [0.0,1.0].
returned: success
Expand Down Expand Up @@ -167,31 +168,34 @@
description:
- The max number of simultaneous connections for the group. Can be used
with either CONNECTION or UTILIZATION balancing modes.
- Cannot be set for INTERNAL backend services.
- For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance
or maxConnectionsPerEndpoint, as appropriate for group type, must be set.
returned: success
type: int
maxConnectionsPerInstance:
description:
- The max number of simultaneous connections that a single backend instance
can handle. This is used to calculate the capacity of the group. Can be
used in either CONNECTION or UTILIZATION balancing modes.
can handle. Cannot be set for INTERNAL backend services.
- This is used to calculate the capacity of the group.
- Can be used in either CONNECTION or UTILIZATION balancing modes.
- For CONNECTION mode, either maxConnections or maxConnectionsPerInstance
must be set.
returned: success
type: int
maxConnectionsPerEndpoint:
description:
- The max number of simultaneous connections that a single backend network
endpoint can handle. This is used to calculate the capacity of the group.
Can be used in either CONNECTION or UTILIZATION balancing modes.
- For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint
must be set.
endpoint can handle. Cannot be set for INTERNAL backend services.
- This is used to calculate the capacity of the group. Can be used in either
CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either
maxConnections or maxConnectionsPerEndpoint must be set.
returned: success
type: int
maxRate:
description:
- The max requests per second (RPS) of the group.
- The max requests per second (RPS) of the group. Cannot be set for INTERNAL
backend services.
- Can be used with either RATE or UTILIZATION balancing modes, but required
if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint,
as appropriate for group type, must be set.
Expand All @@ -202,21 +206,22 @@
- The max requests per second (RPS) that a single backend instance can handle.
This is used to calculate the capacity of the group. Can be used in either
balancing mode. For RATE mode, either maxRate or maxRatePerInstance must
be set.
be set. Cannot be set for INTERNAL backend services.
returned: success
type: str
maxRatePerEndpoint:
description:
- The max requests per second (RPS) that a single backend network endpoint
can handle. This is used to calculate the capacity of the group. Can be
used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint
must be set.
must be set. Cannot be set for INTERNAL backend services.
returned: success
type: str
maxUtilization:
description:
- Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization
target for the group. Valid range is [0.0, 1.0].
- Cannot be set for INTERNAL backend services.
returned: success
type: str
connectionDraining:
Expand Down