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

Add Private Service Connect to Looker #11487

Merged
merged 8 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
56 changes: 56 additions & 0 deletions mmv1/products/looker/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ examples:
client_id: 'my-client-id'
client_secret: 'my-client-secret'
custom_domain: 'my-custom-domain'
- !ruby/object:Provider::Terraform::Examples
name: 'looker_instance_psc'
primary_resource_id: 'looker-instance'
vars:
instance_name: 'my-instance'
client_id: 'my-client-id'
client_secret: 'my-client-secret'
parameters:
- !ruby/object:Api::Type::String
name: 'region'
Expand Down Expand Up @@ -381,6 +388,55 @@ properties:
description: |
Whether private IP is enabled on the Looker instance.
default_value: false
# PscConfig Object
- !ruby/object:Api::Type::NestedObject
name: pscConfig
description: |
Information for Private Service Connect (PSC) setup for a Looker instance.
update_mask_fields:
- 'psc_config.allowed_vpcs'
- 'psc_config.service_attachments'
properties:
- !ruby/object:Api::Type::Array
name: 'allowedVpcs'
item_type: Api::Type::String
description: |
List of VPCs that are allowed ingress into the Looker instance.
- !ruby/object:Api::Type::String
name: 'lookerServiceAttachmentUri'
description: |
URI of the Looker service attachment.
output: true
- !ruby/object:Api::Type::Array
name: 'serviceAttachments'
description: |
List of egress service attachment configurations.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::Enum
name: connectionStatus
description: |
Status of the service attachment connection.
output: true
values:
- :ACCEPTED
- :PENDING
- :REJECTED
- :NEEDS_ATTENTION
- :CLOSED
- !ruby/object:Api::Type::String
name: localFqdn
description: |
Fully qualified domain name that will be used in the private DNS record created for the service attachment.
- !ruby/object:Api::Type::String
name: targetServiceAttachmentUri
description: |
URI of the service attachment to connect to.
# PscConfig Object - End
- !ruby/object:Api::Type::Boolean
name: pscEnabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting... this is usually in the config field itself.

description: |
Whether Public Service Connect (PSC) is enabled on the Looker instance
- !ruby/object:Api::Type::Boolean
name: publicIpEnabled
description: |
Expand Down
17 changes: 17 additions & 0 deletions mmv1/templates/terraform/examples/looker_instance_psc.tf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resource "google_looker_instance" "<%= ctx[:primary_resource_id] %>" {
efeelaiho marked this conversation as resolved.
Show resolved Hide resolved
name = "<%= ctx[:vars]["instance_name"] %>"
platform_edition = "LOOKER_CORE_ENTERPRISE_ANNUAL"
region = "us-central1"
private_ip_enabled = false
public_ip_enabled = false
psc_enabled = true
oauth_config {
client_id = "<%= ctx[:vars]["client_id"] %>"
client_secret = "<%= ctx[:vars]["client_secret"] %>"
}
psc_config {
allowed_vpcs: ["projects/test-project/global/networks/test"]
# update only
# service_attachments: [{local_fqdn: "www.local-fqdn.com" target_service_attachment_uri: "projects/my-project/regions/us-east1/serviceAttachments/sa"}]
}
}
Loading