Add PNA support to Service Directory module

Endpoints in Service Directory can be *associated* with a
VPC. In this case, they can be used by supported Google
Cloud products to send requests directly to resources inside
a VPC. This feature is called Private Network Access.

The `google_service_directory_endpoint` resource supports
this configuration with a new argument `network`.
Unfortunately, this argument has an unusual format: it
is similar to a standard VPC ID, but instead of the project ID,
it expects the project number.
This commit is contained in:
Stefano Tribioli
2024-01-04 18:18:34 +01:00
committed by Stefano Tribioli
parent c13a192755
commit a4def10c19
4 changed files with 87 additions and 10 deletions

View File

@@ -0,0 +1,37 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
values:
module.service-directory.google_service_directory_endpoint.default["one/first"]:
address: 10.0.0.11
endpoint_id: first
port: 443
network: projects/123456789012/locations/global/networks/vpc-name
module.service-directory.google_service_directory_endpoint.default["one/second"]:
address: 10.0.0.12
endpoint_id: second
port: 443
network: projects/123456789012/locations/global/networks/vpc-name
module.service-directory.google_service_directory_namespace.default:
location: europe-west1
namespace_id: sd-1
project: my-project
module.service-directory.google_service_directory_service.default["one"]:
metadata: null
service_id: one
counts:
google_service_directory_endpoint: 2
google_service_directory_namespace: 1
google_service_directory_service: 1