Skip to content
35 changes: 35 additions & 0 deletions looker/looker-core-psc/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* 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.
*/
# [START looker_google_looker_instance_psc]
# Create an ENTERPRISE edition Looker (Google Cloud core) instance that has PSC enabled.
resource "google_looker_instance" "main" {
name = "my-instance"
platform_edition = "LOOKER_CORE_ENTERPRISE_ANNUAL"
region = "us-central1"
private_ip_enabled = false
public_ip_enabled = false
psc_enabled = true
oauth_config {
client_id = "my-client-id"
client_secret = "my-client-secret"
}
psc_config {
allowed_vpcs = ["projects/test-project/global/networks/test"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This value won't work, as test-project is not a valid project ID.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the comments in the sample. The test-project and test parts of the VPC URL are unique to the user's project, so the value here is just an example.

# update only
# service_attachments = [{local_fqdn: "www.local-fqdn.com" target_service_attachment_uri: "projects/my-project/regions/us-east1/serviceAttachments/sa"}]
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these comments needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the comments to hopefully be more useful!

}
}
# [END looker_google_looker_instance_psc]
Loading