modules/data-ingestion/variables.tf (114 lines of code) (raw):
/**
* Copyright 2021 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.
*/
variable "labels" {
description = "(Optional) Labels attached to Data Warehouse resources."
type = map(string)
default = {}
}
variable "pubsub_resource_location" {
description = "The locaiton in which Pub/Sub message will be stored."
type = string
default = "us-east4"
}
variable "terraform_service_account" {
description = "The email address of the service account that will run the Terraform code."
type = string
}
variable "data_ingestion_project_id" {
description = "The ID of the project in which the data ingestion resources will be created."
type = string
}
variable "non_confidential_data_project_id" {
description = "The ID of the project in which the Bigquery will be created."
type = string
}
variable "data_governance_project_id" {
description = "The ID of the project in which the KMS and DLP are created."
type = string
}
variable "bucket_name" {
description = "The main part of the name of the bucket to be created."
type = string
}
variable "bucket_location" {
description = "Bucket location."
type = string
default = "US"
}
variable "bucket_class" {
description = "Bucket storage class."
type = string
default = "STANDARD"
}
variable "delete_contents_on_destroy" {
description = "(Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present."
type = bool
default = false
}
variable "bucket_lifecycle_rules" {
description = "List of lifecycle rules to configure. Format is the same as described in provider documentation https://www.terraform.io/docs/providers/google/r/storage_bucket.html#lifecycle_rule except condition.matches_storage_class should be a comma delimited string."
type = list(object({
# Object with keys:
# - type - The type of the action of this Lifecycle Rule. Supported values: Delete and SetStorageClass.
# - storage_class - (Required if action type is SetStorageClass) The target Storage Class of objects affected by this Lifecycle Rule.
action = any
# Object with keys:
# - age - (Optional) Minimum age of an object in days to satisfy this condition.
# - created_before - (Optional) Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
# - with_state - (Optional) Match to live and/or archived objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
# - matches_storage_class - (Optional) Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
# - matches_prefix - (Optional) One or more matching name prefixes to satisfy this condition.
# - matches_suffix - (Optional) One or more matching name suffixes to satisfy this condition
# - num_newer_versions - (Optional) Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
condition = any
}))
default = [{
action = {
type = "Delete"
}
condition = {
age = 30
with_state = "ANY"
matches_storage_class = "STANDARD"
}
}]
}
variable "dataset_id" {
description = "Unique ID for the dataset being provisioned."
type = string
}
variable "dataset_name" {
description = "Friendly name for the dataset being provisioned."
type = string
default = "Data-ingestion dataset"
}
variable "dataset_description" {
description = "Dataset description."
type = string
default = "Data-ingestion dataset"
}
variable "dataset_location" {
description = "The regional location for the dataset only US and EU are allowed in module."
type = string
default = "US"
}
variable "dataset_default_table_expiration_ms" {
description = "TTL of tables using the dataset in MS. The default value is null."
type = number
default = null
}
variable "bigquery_encryption_key" {
description = "Self-link of the encryption key to be used by Bigquery."
type = string
}
variable "data_ingestion_encryption_key" {
description = "Self-link of the encryption key to be used by Pub/Sub and Storage."
type = string
}
variable "enable_bigquery_read_roles" {
description = "(Optional) If set to true, it will grant to the `dataflow_controller_service_account` the necessary roles to read from a bigquery table."
type = bool
default = false
}