Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a35c07f
add Looker product
efeelaiho May 6, 2023
a9a6e34
Update Instance.yaml
efeelaiho May 6, 2023
60cce0f
Update description for allowed email domains in Instance.yaml
efeelaiho May 6, 2023
b5235a6
Add looker_instance_basic example
efeelaiho May 7, 2023
2eebe60
add async definition to product.yaml
efeelaiho May 7, 2023
6971f45
Update Instance.yaml for Looker
efeelaiho May 8, 2023
db84947
update Instance yaml and looker_instance_basic example
efeelaiho May 8, 2023
e24e40a
Merge branch 'GoogleCloudPlatform:main' into main
efeelaiho May 8, 2023
2d06723
Merge branch 'GoogleCloudPlatform:main' into main
efeelaiho May 9, 2023
e2d19ac
remove custom domain as it requires steps outside of terraform provis…
efeelaiho May 9, 2023
0d7cbd2
Merge branch 'main' of https://github.com/efeelaiho/magic-modules
efeelaiho May 9, 2023
b9db09a
fix day of week name for maintenance window in Instance.yaml
efeelaiho May 10, 2023
6bbb0b6
Merge branch 'GoogleCloudPlatform:main' into main
efeelaiho May 10, 2023
4bedf6d
Merge branch 'GoogleCloudPlatform:main' into main
efeelaiho May 30, 2023
1dc6de5
Add Enterprise example
efeelaiho May 31, 2023
3780615
Merge branch 'GoogleCloudPlatform:main' into main
efeelaiho May 31, 2023
2cc971e
add connections variables to the examples
efeelaiho Jun 9, 2023
5c889b8
Merge branch 'GoogleCloudPlatform:main' into main
efeelaiho Jun 9, 2023
fe1af54
Merge branch 'main' of https://github.com/efeelaiho/magic-modules
efeelaiho Jun 9, 2023
83316b1
Move netwirk to the root of module
efeelaiho Jun 9, 2023
60d0eca
Merge branch 'main' of https://github.com/efeelaiho/magic-modules
efeelaiho Jun 9, 2023
c2eba44
Merge branch 'GoogleCloudPlatform:main' into main
efeelaiho Jun 11, 2023
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
366 changes: 366 additions & 0 deletions mmv1/products/looker/Instance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,366 @@
# Copyright 2023 Google Inc.
# 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.

--- !ruby/object:Api::Resource
name: 'Instance'
base_url: projects/{{project}}/locations/{{region}}/instances
create_url: projects/{{project}}/locations/{{region}}/instances?instanceId={{name}}
update_verb: :PATCH
update_mask: true
description: |
A Google Cloud Looker instance.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation': 'https://cloud.google.com/looker/docs/looker-core'
api: 'https://cloud.google.com/looker/docs/reference/rest/v1/projects.locations.instances'
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 180
update_minutes: 90
delete_minutes: 60
autogen_async: true
examples:
- !ruby/object:Provider::Terraform::Examples
name: 'looker_instance_standard_basic'
primary_resource_id: 'looker-instance'
vars:
instance_name: 'my-instance'
client_id: 'my-client-id'
client_secret: 'my-client-secret'
- !ruby/object:Provider::Terraform::Examples
name: 'looker_instance_enterprise_full'
primary_resource_id: 'looker-instance'
vars:
instance_name: 'my-instance'
client_id: 'my-client-id'
client_secret: 'my-client-secret'
network_name: 'looker-test-network'
parameters:
# TODO: resourceref?
- !ruby/object:Api::Type::String
name: 'region'
description: |
The name of the Looker region of the instance.
required: false
immutable: true
url_param_only: true
ignore_read: true
default_from_api: true
properties:
# Admin Settings Object
- !ruby/object:Api::Type::NestedObject
name: adminSettings
description: |
Looker instance Admin settings.
properties:
- !ruby/object:Api::Type::Array
name: 'allowedEmailDomains'
item_type: Api::Type::String
description: |
Email domain allowlist for the instance.

Define the email domains to which your users can deliver Looker (Google Cloud core) content.
Updating this list will restart the instance. Updating the allowed email domains from terraform
means the value provided will be considered as the entire list and not an amendment to the
existing list of allowed email domains.
# Admin Settings Object - End
- !ruby/object:Api::Type::String
name: consumerNetwork
description: |
Network name in the consumer project in the format of: projects/{project}/global/networks/{network}
Note that the consumer network may be in a different GCP project than the consumer
project that is hosting the Looker Instance.
- !ruby/object:Api::Type::Time
name: createTime
description: |
The time the instance was created in RFC3339 UTC "Zulu" format,
accurate to nanoseconds.
output: true
# Deny Maintenance Period Object
- !ruby/object:Api::Type::NestedObject
name: denyMaintenancePeriod
description: |
Maintenance denial period for this instance.

You must allow at least 14 days of maintenance availability
between any two deny maintenance periods.
properties:
- !ruby/object:Api::Type::NestedObject
name: 'startDate'
required: true
description: |
Required. Start date of the deny maintenance period
properties:
- !ruby/object:Api::Type::Integer
name: 'year'
description: |
Year of the date. Must be from 1 to 9999, or 0 to specify a date without
a year.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,10000)'
- !ruby/object:Api::Type::Integer
name: 'month'
description: |
Month of a year. Must be from 1 to 12, or 0 to specify a year without a
month and day.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,13)'
- !ruby/object:Api::Type::Integer
name: 'day'
description: |
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
to specify a year by itself or a year and month where the day isn't significant.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,32)'
- !ruby/object:Api::Type::NestedObject
name: 'endDate'
required: true
description: |
Required. Start date of the deny maintenance period
properties:
- !ruby/object:Api::Type::Integer
name: 'year'
description: |
Year of the date. Must be from 1 to 9999, or 0 to specify a date without
a year.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,10000)'
- !ruby/object:Api::Type::Integer
name: 'month'
description: |
Month of a year. Must be from 1 to 12, or 0 to specify a year without a
month and day.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,13)'
- !ruby/object:Api::Type::Integer
name: 'day'
description: |
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
to specify a year by itself or a year and month where the day isn't significant.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,32)'


- !ruby/object:Api::Type::NestedObject
name: 'time'
required: true
description: |
Required. Start time of the window in UTC time.
properties:
- !ruby/object:Api::Type::Integer
name: 'hours'
description: |
Hours of day in 24 hour format. Should be from 0 to 23.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,23)'
- !ruby/object:Api::Type::Integer
name: 'minutes'
description: |
Minutes of hour of day. Must be from 0 to 59.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,60)'
- !ruby/object:Api::Type::Integer
name: 'seconds'
description: |
Seconds of minutes of the time. Must normally be from 0 to 59.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,60)'
- !ruby/object:Api::Type::Integer
name: 'nanos'
description: |
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,999999999)'

# Deny Maintenance Period Object - End
- !ruby/object:Api::Type::String
name: egressPublicIp
description: |
Public Egress IP (IPv4).
output: true
- !ruby/object:Api::Type::String
name: ingressPrivateIp
description: |
Private Ingress IP (IPv4).
output: true
- !ruby/object:Api::Type::String
name: ingressPublicIp
description: |
Public Ingress IP (IPv4).
output: true
- !ruby/object:Api::Type::String
name: lookerVersion
description: |
The Looker version that the instance is using.
output: true
- !ruby/object:Api::Type::String
name: lookerUri
description: |
Looker instance URI which can be used to access the Looker Instance UI.
output: true

# Maintenance Window Object
- !ruby/object:Api::Type::NestedObject
name: maintenanceWindow
description: |
Maintenance window for an instance.

Maintenance of your instance takes place once a month, and will require
your instance to be restarted during updates, which will temporarily
disrupt service.
properties:
- !ruby/object:Api::Type::Enum
name: 'dayOfWeek'
required: true
description: |
Required. Day of the week for this MaintenanceWindow (in UTC).

- DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified.
- MONDAY: Monday
- TUESDAY: Tuesday
- WEDNESDAY: Wednesday
- THURSDAY: Thursday
- FRIDAY: Friday
- SATURDAY: Saturday
- SUNDAY: Sunday
values:
- :DAY_OF_WEEK_UNSPECIFIED
- :MONDAY
- :TUESDAY
- :WEDNESDAY
- :THURSDAY
- :FRIDAY
- :SATURDAY
- :SUNDAY
- !ruby/object:Api::Type::NestedObject
name: 'startTime'
required: true
description: |
Required. Start time of the window in UTC time.
properties:
- !ruby/object:Api::Type::Integer
name: 'hours'
description: |
Hours of day in 24 hour format. Should be from 0 to 23.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,23)'
- !ruby/object:Api::Type::Integer
name: 'minutes'
description: |
Minutes of hour of day. Must be from 0 to 59.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,60)'
- !ruby/object:Api::Type::Integer
name: 'seconds'
description: |
Seconds of minutes of the time. Must normally be from 0 to 59.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,60)'
- !ruby/object:Api::Type::Integer
name: 'nanos'
description: |
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
validation: !ruby/object:Provider::Terraform::Validation
function: 'validation.IntBetween(0,999999999)'
# Maintenance Window Object - End
- !ruby/object:Api::Type::String
name: name
description: |
The ID of the instance or a fully qualified identifier for the instance.
required: true
immutable: true
url_param_only: true
validation: !ruby/object:Provider::Terraform::Validation
regex: '^[a-z][a-z0-9-]{0,39}[a-z0-9]$'
# Oauth Object
- !ruby/object:Api::Type::NestedObject
name: oauthConfig
ignore_read: true
description: |
Looker Instance OAuth login settings.
properties:
- !ruby/object:Api::Type::String
name: 'clientId'
description: |
The client ID for the Oauth config.
- !ruby/object:Api::Type::String
name: 'clientSecret'
description: |
The client secret for the Oauth config.
# Oauth Object - End
- !ruby/object:Api::Type::Enum
name: platformEdition
description: |
Platform editions for a Looker instance. Each edition maps to a set of instance features, like its size. Must be one of these values:
- LOOKER_CORE_TRIAL: trial instance
- LOOKER_CORE_STANDARD: pay as you go standard instance
- LOOKER_CORE_STANDARD_ANNUAL: subscription standard instance
- LOOKER_CORE_ENTERPRISE_ANNUAL: subscription enterprise instance
- LOOKER_CORE_EMBED_ANNUAL: subscription embed instance
- LOOKER_MODELER: standalone modeling service
values:
- :LOOKER_CORE_TRIAL
- :LOOKER_CORE_STANDARD
- :LOOKER_CORE_STANDARD_ANNUAL
- :LOOKER_CORE_ENTERPRISE_ANNUAL
- :LOOKER_CORE_EMBED_ANNUAL
- :LOOKER_MODELER
default_value: :LOOKER_CORE_TRIAL
immutable: true
- !ruby/object:Api::Type::Boolean
name: privateIpEnabled
description: |
Whether private IP is enabled on the Looker instance.
default_value: false
- !ruby/object:Api::Type::Boolean
name: publicIpEnabled
description: |
Whether public IP is enabled on the Looker instance.
default_value: true
- !ruby/object:Api::Type::String
name: reservedRange
description: |
Name of a reserved IP address range within the consumer network, to be used for
private service access connection. User may or may not specify this in a request.
- !ruby/object:Api::Type::Time
name: updateTime
description: |
The time the instance was updated in RFC3339 UTC "Zulu" format,
accurate to nanoseconds.
output: true
# UserMetadata Object
- !ruby/object:Api::Type::NestedObject
name: userMetadata
description: |
Metadata about users for a Looker instance.

There are ten Standard and two Developer users included in the cost of the product.
You can allocate additional Standard, Viewer, and Developer users for this instance.
It is an optional step and can be modified later.

With the Standard edition of Looker (Google Cloud core), you can provision up to 50
total users, distributed across Viewer, Standard, and Developer.
properties:
- !ruby/object:Api::Type::Integer
name: 'additionalViewerUserCount'
description: |
Number of additional Viewer Users to allocate to the Looker Instance.
- !ruby/object:Api::Type::Integer
name: 'additionalStandardUserCount'
description: |
Number of additional Standard Users to allocate to the Looker Instance.
- !ruby/object:Api::Type::Integer
name: 'additionalDeveloperUserCount'
description: |
Number of additional Developer Users to allocate to the Looker Instance.
# UserMetadata Object - End

Loading