Skip to content

Commit 35e7891

Browse files
efeelaihoPhilip Jonany
authored and
Philip Jonany
committed
Add Private Service Connect to Looker (GoogleCloudPlatform#11487)
1 parent a85cf25 commit 35e7891

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

mmv1/products/looker/Instance.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ examples:
8989
client_id: 'my-client-id'
9090
client_secret: 'my-client-secret'
9191
custom_domain: 'my-custom-domain'
92+
- !ruby/object:Provider::Terraform::Examples
93+
name: 'looker_instance_psc'
94+
primary_resource_id: 'looker-instance'
95+
vars:
96+
instance_name: 'my-instance'
97+
client_id: 'my-client-id'
98+
client_secret: 'my-client-secret'
9299
parameters:
93100
- !ruby/object:Api::Type::String
94101
name: 'region'
@@ -392,6 +399,55 @@ properties:
392399
description: |
393400
Whether private IP is enabled on the Looker instance.
394401
default_value: false
402+
# PscConfig Object
403+
- !ruby/object:Api::Type::NestedObject
404+
name: pscConfig
405+
description: |
406+
Information for Private Service Connect (PSC) setup for a Looker instance.
407+
update_mask_fields:
408+
- 'psc_config.allowed_vpcs'
409+
- 'psc_config.service_attachments'
410+
properties:
411+
- !ruby/object:Api::Type::Array
412+
name: 'allowedVpcs'
413+
item_type: Api::Type::String
414+
description: |
415+
List of VPCs that are allowed ingress into the Looker instance.
416+
- !ruby/object:Api::Type::String
417+
name: 'lookerServiceAttachmentUri'
418+
description: |
419+
URI of the Looker service attachment.
420+
output: true
421+
- !ruby/object:Api::Type::Array
422+
name: 'serviceAttachments'
423+
description: |
424+
List of egress service attachment configurations.
425+
item_type: !ruby/object:Api::Type::NestedObject
426+
properties:
427+
- !ruby/object:Api::Type::Enum
428+
name: connectionStatus
429+
description: |
430+
Status of the service attachment connection.
431+
output: true
432+
values:
433+
- :ACCEPTED
434+
- :PENDING
435+
- :REJECTED
436+
- :NEEDS_ATTENTION
437+
- :CLOSED
438+
- !ruby/object:Api::Type::String
439+
name: localFqdn
440+
description: |
441+
Fully qualified domain name that will be used in the private DNS record created for the service attachment.
442+
- !ruby/object:Api::Type::String
443+
name: targetServiceAttachmentUri
444+
description: |
445+
URI of the service attachment to connect to.
446+
# PscConfig Object - End
447+
- !ruby/object:Api::Type::Boolean
448+
name: pscEnabled
449+
description: |
450+
Whether Public Service Connect (PSC) is enabled on the Looker instance
395451
- !ruby/object:Api::Type::Boolean
396452
name: publicIpEnabled
397453
description: |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
resource "google_looker_instance" "<%= ctx[:primary_resource_id] %>" {
2+
name = "<%= ctx[:vars]["instance_name"] %>"
3+
platform_edition = "LOOKER_CORE_ENTERPRISE_ANNUAL"
4+
region = "us-central1"
5+
private_ip_enabled = false
6+
public_ip_enabled = false
7+
psc_enabled = true
8+
oauth_config {
9+
client_id = "<%= ctx[:vars]["client_id"] %>"
10+
client_secret = "<%= ctx[:vars]["client_secret"] %>"
11+
}
12+
psc_config {
13+
allowed_vpcs = ["projects/test-project/global/networks/test"]
14+
# update only
15+
# service_attachments = [{local_fqdn: "www.local-fqdn.com" target_service_attachment_uri: "projects/my-project/regions/us-east1/serviceAttachments/sa"}]
16+
}
17+
}

0 commit comments

Comments
 (0)