removing deprecated field from gke-hub

This commit is contained in:
Valerio Ponza 2023-03-28 16:14:02 +00:00 committed by Wiktor Niesiobędzki
parent 44d2e9e50e
commit 596acb63e4
3 changed files with 13 additions and 13 deletions

View File

@ -387,11 +387,11 @@ resource "google_container_cluster" "cluster" {
}
resource "google_gke_backup_backup_plan" "backup_plan" {
for_each = try(var.backup_configs.enable_backup_agent, false) ? var.backup_configs.backup_plans : {}
name = each.key
cluster = google_container_cluster.cluster.id
for_each = try(var.backup_configs.enable_backup_agent, false) ? var.backup_configs.backup_plans : {}
name = each.key
cluster = google_container_cluster.cluster.id
location = each.value.region
project = var.project_id
project = var.project_id
retention_policy {
backup_delete_lock_days = try(each.value.retention_policy_delete_lock_days)
backup_retain_days = try(each.value.retention_policy_days)
@ -403,8 +403,8 @@ resource "google_gke_backup_backup_plan" "backup_plan" {
#TODO add support for configs
backup_config {
include_volume_data = true
include_secrets = true
all_namespaces = true
include_secrets = true
all_namespaces = true
}
}

View File

@ -16,13 +16,13 @@
variable "backup_configs" {
description = "Configuration for Backup for GKE."
type = object({
type = object({
enable_backup_agent = optional(bool, false)
backup_plans = optional(map( object({
region = string
schedule = string
retention_policy_days = optional(string)
retention_policy_lock = optional(bool, false)
backup_plans = optional(map(object({
region = string
schedule = string
retention_policy_days = optional(string)
retention_policy_lock = optional(bool, false)
retention_policy_delete_lock_days = optional(string)
})))
})

View File

@ -79,7 +79,7 @@ resource "google_gke_hub_feature_membership" "servicemesh" {
membership = google_gke_hub_membership.default[each.key].membership_id
mesh {
management = "MANAGEMENT_AUTOMATIC"
management = "MANAGEMENT_AUTOMATIC"
}
}