Skip to content

Support for google_gke_backup_backup_plan #2259

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

Open
NeckBeardPrince opened this issue Jan 29, 2025 · 2 comments · May be fixed by #2270
Open

Support for google_gke_backup_backup_plan #2259

NeckBeardPrince opened this issue Jan 29, 2025 · 2 comments · May be fixed by #2270
Labels
enhancement New feature or request

Comments

@NeckBeardPrince
Copy link

NeckBeardPrince commented Jan 29, 2025

TL;DR

Backups of our workloads may be useful for disaster recovery, CI/CD pipelines, cloning workloads, or upgrade scenarios. Protecting your workloads can help you achieve business-critical recovery point objectives.

Terraform Resources

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/gke_backup_backup_plan

Detailed design

resource "google_gke_backup_backup_plan" "full" {
  name = "backup-plan"
  cluster = google_container_cluster.primary.id
  location = "asia"
  retention_policy {
    backup_delete_lock_days = 30
    backup_retain_days = 180
  }
  backup_schedule {
    cron_schedule = "0 0 * * *"
  }
  backup_config {
    include_volume_data = true
    include_secrets = true
    selected_applications {
      namespaced_names {
        name = "app1"
        namespace = "ns1"
      }
      namespaced_names {
        name = "app2"
        namespace = "ns2"
      }
    }
  }
}

Additional information

This was brought up back in 2023 but closed as "not planned"

@NeckBeardPrince NeckBeardPrince added the enhancement New feature or request label Jan 29, 2025
@rsantacreu
Copy link

Please at least it is needed to add addons_config block

addons_config {
    gke_backup_agent_config {
      enabled = true
    }
}

into the google_container_cluster resource

@Ameausoone
Copy link
Contributor

@rsantacreu

The addon configuration in cluster configuration is already available : https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/main/cluster.tf#L280

@Ameausoone Ameausoone linked a pull request Feb 7, 2025 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants