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

Removed deprecated variable and added labels #1923

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/bigtable-instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ module "bigtable-instance" {
| [deletion_protection](variables.tf#L56) | Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply that would delete the instance will fail. | <code>bool</code> | | <code>true</code> |
| [display_name](variables.tf#L63) | The human-readable display name of the Bigtable instance. | <code>string</code> | | <code>null</code> |
| [iam](variables.tf#L69) | IAM bindings for topic in {ROLE => [MEMBERS]} format. | <code>map&#40;list&#40;string&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [instance_type](variables.tf#L75) | (deprecated) The instance type to create. One of 'DEVELOPMENT' or 'PRODUCTION'. | <code>string</code> | | <code>null</code> |
| [labels](variables.tf#L75) | Labels to be attached to the instance. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [tables](variables.tf#L91) | Tables to be created in the BigTable instance. | <code title="map&#40;object&#40;&#123;&#10; split_keys &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; column_families &#61; optional&#40;map&#40;object&#40;&#10; &#123;&#10; gc_policy &#61; optional&#40;object&#40;&#123;&#10; deletion_policy &#61; optional&#40;string&#41;&#10; gc_rules &#61; optional&#40;string&#41;&#10; mode &#61; optional&#40;string&#41;&#10; max_age &#61; optional&#40;string&#41;&#10; max_version &#61; optional&#40;string&#41;&#10; &#125;&#41;, null&#41;&#10; &#125;&#41;&#41;, &#123;&#125;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |

## Outputs
Expand Down
11 changes: 5 additions & 6 deletions modules/bigtable-instance/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* 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.
Expand Down Expand Up @@ -36,12 +36,11 @@ locals {
}

resource "google_bigtable_instance" "default" {
project = var.project_id
name = var.name

instance_type = var.instance_type
display_name = var.display_name == null ? var.display_name : var.name
project = var.project_id
name = var.name
display_name = coalesce(var.display_name, var.name)
deletion_protection = var.deletion_protection
labels = var.labels

dynamic "cluster" {
for_each = local.clusters_autoscaling
Expand Down
2 changes: 1 addition & 1 deletion modules/bigtable-instance/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* 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.
Expand Down
8 changes: 4 additions & 4 deletions modules/bigtable-instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ variable "iam" {
default = {}
}

variable "instance_type" {
description = "(deprecated) The instance type to create. One of 'DEVELOPMENT' or 'PRODUCTION'."
type = string
default = null
variable "labels" {
description = "Labels to be attached to the instance."
type = map(string)
default = {}
}

variable "name" {
Expand Down