Skip to content

Commit

Permalink
Added support for Private Services Connect for Google APIs (#4358) (#376
Browse files Browse the repository at this point in the history
)

* updated to mmv1 folder

* replaced data source with resources in tests

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Feb 12, 2021
1 parent 26487b3 commit 3c921dc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 15 deletions.
16 changes: 11 additions & 5 deletions plugins/modules/gcp_compute_global_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
description:
- The prefix length of the IP range. If not present, it means the address field
is a single IP address.
- This field is not applicable to addresses with addressType=EXTERNAL.
- This field is not applicable to addresses with addressType=EXTERNAL, or addressType=INTERNAL
when purpose=PRIVATE_SERVICE_CONNECT .
required: false
type: int
address_type:
Expand All @@ -93,8 +94,10 @@
purpose:
description:
- The purpose of the resource. For global internal addresses it can be * VPC_PEERING
- for peer networks This should only be set when using an Internal address.
- 'Some valid choices include: "VPC_PEERING"'
- for peer networks * PRIVATE_SERVICE_CONNECT - for ([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) Private Service Connect networks This should only be set when using an
Internal address.
- 'Some valid choices include: "VPC_PEERING", "PRIVATE_SERVICE_CONNECT"'
required: false
type: str
network:
Expand Down Expand Up @@ -218,7 +221,8 @@
description:
- The prefix length of the IP range. If not present, it means the address field
is a single IP address.
- This field is not applicable to addresses with addressType=EXTERNAL.
- This field is not applicable to addresses with addressType=EXTERNAL, or addressType=INTERNAL
when purpose=PRIVATE_SERVICE_CONNECT .
returned: success
type: int
addressType:
Expand All @@ -231,7 +235,9 @@
purpose:
description:
- The purpose of the resource. For global internal addresses it can be * VPC_PEERING
- for peer networks This should only be set when using an Internal address.
- for peer networks * PRIVATE_SERVICE_CONNECT - for ([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) Private Service Connect networks This should only be set when using an Internal
address.
returned: success
type: str
network:
Expand Down
7 changes: 5 additions & 2 deletions plugins/modules/gcp_compute_global_address_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@
description:
- The prefix length of the IP range. If not present, it means the address field
is a single IP address.
- This field is not applicable to addresses with addressType=EXTERNAL.
- This field is not applicable to addresses with addressType=EXTERNAL, or addressType=INTERNAL
when purpose=PRIVATE_SERVICE_CONNECT .
returned: success
type: int
addressType:
Expand All @@ -171,7 +172,9 @@
purpose:
description:
- The purpose of the resource. For global internal addresses it can be * VPC_PEERING
- for peer networks This should only be set when using an Internal address.
- for peer networks * PRIVATE_SERVICE_CONNECT - for ([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) Private Service Connect networks This should only be set when using
an Internal address.
returned: success
type: str
network:
Expand Down
24 changes: 18 additions & 6 deletions plugins/modules/gcp_compute_global_forwarding_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@
ip_protocol:
description:
- The IP protocol to which this rule applies. When the load balancing scheme is
INTERNAL_SELF_MANAGED, only TCP is valid.
INTERNAL_SELF_MANAGED, only TCP is valid. This field must not be set if the
global address is configured as a purpose of PRIVATE_SERVICE_CONNECT and addressType
of INTERNAL .
- 'Some valid choices include: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP"'
required: false
type: str
Expand All @@ -98,8 +100,9 @@
- This signifies what the GlobalForwardingRule will be used for.
- 'The value of INTERNAL_SELF_MANAGED means that this will be used for Internal
Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External
Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently
global forwarding rules cannot be used for INTERNAL load balancing.'
Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) ([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) Note: This field must be set "" if the global address is configured as
a purpose of PRIVATE_SERVICE_CONNECT and addressType of INTERNAL.'
- 'Some valid choices include: "EXTERNAL", "INTERNAL_SELF_MANAGED"'
required: false
default: EXTERNAL
Expand Down Expand Up @@ -196,6 +199,9 @@
- The URL of the target resource to receive the matched traffic.
- The forwarded traffic must be of a type appropriate to the target object.
- For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid.
- ([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) For global address with a purpose of PRIVATE_SERVICE_CONNECT and addressType
of INTERNAL, only "all-apis" and "vpc-sc" are valid.
required: true
type: str
project:
Expand Down Expand Up @@ -361,7 +367,9 @@
IPProtocol:
description:
- The IP protocol to which this rule applies. When the load balancing scheme is
INTERNAL_SELF_MANAGED, only TCP is valid.
INTERNAL_SELF_MANAGED, only TCP is valid. This field must not be set if the global
address is configured as a purpose of PRIVATE_SERVICE_CONNECT and addressType
of INTERNAL .
returned: success
type: str
ipVersion:
Expand All @@ -374,8 +382,9 @@
- This signifies what the GlobalForwardingRule will be used for.
- 'The value of INTERNAL_SELF_MANAGED means that this will be used for Internal
Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External
Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently
global forwarding rules cannot be used for INTERNAL load balancing.'
Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) ([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) Note: This field must be set "" if the global address is configured as a
purpose of PRIVATE_SERVICE_CONNECT and addressType of INTERNAL.'
returned: success
type: str
metadataFilters:
Expand Down Expand Up @@ -461,6 +470,9 @@
- The URL of the target resource to receive the matched traffic.
- The forwarded traffic must be of a type appropriate to the target object.
- For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid.
- ([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) For global address with a purpose of PRIVATE_SERVICE_CONNECT and addressType
of INTERNAL, only "all-apis" and "vpc-sc" are valid.
returned: success
type: str
'''
Expand Down
11 changes: 9 additions & 2 deletions plugins/modules/gcp_compute_global_forwarding_rule_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@
IPProtocol:
description:
- The IP protocol to which this rule applies. When the load balancing scheme
is INTERNAL_SELF_MANAGED, only TCP is valid.
is INTERNAL_SELF_MANAGED, only TCP is valid. This field must not be set if
the global address is configured as a purpose of PRIVATE_SERVICE_CONNECT and
addressType of INTERNAL .
returned: success
type: str
ipVersion:
Expand All @@ -169,7 +171,9 @@
- 'The value of INTERNAL_SELF_MANAGED means that this will be used for Internal
Global HTTP(S) LB. The value of EXTERNAL means that this will be used for
External Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)
NOTE: Currently global forwarding rules cannot be used for INTERNAL load balancing.'
([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) Note: This field must be set "" if the global address is configured
as a purpose of PRIVATE_SERVICE_CONNECT and addressType of INTERNAL.'
returned: success
type: str
metadataFilters:
Expand Down Expand Up @@ -259,6 +263,9 @@
- The forwarded traffic must be of a type appropriate to the target object.
- For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are
valid.
- ([Beta](U(https://terraform.io/docs/providers/google/guides/provider_versions.html))
only) For global address with a purpose of PRIVATE_SERVICE_CONNECT and addressType
of INTERNAL, only "all-apis" and "vpc-sc" are valid.
returned: success
type: str
'''
Expand Down

0 comments on commit 3c921dc

Please sign in to comment.