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

Add cross-region replication support to AlloyDB #6474

Conversation

modular-magician
Copy link
Collaborator

To Create a Secondary Cluster, cluster_type and secondary_config are the additional fields to be mentioned in the cluster.
The secondary cluster is dependent on the primary instance and the same needs to be added in the config using the depends_on field.
The field continuous_backup_config.enabled needs to be set false as continuous backup is not supported for secondary clusters.
The deletion_policy is set to FORCE as the secondary instance that will be created in the secondary cluster can not be deleted independently, but instead the entire secondary cluster needs to be deleted forcefully along with its secondary instance.

  cluster_type = "SECONDARY"
  deletion_policy = "FORCE"
  secondary_config {
    primary_cluster_name = <fully qualified primary cluster name>
    // Eg: primary_cluster_name = google_alloydb_cluster.<primary_cluster_name>.name
  }

  continuous_backup_config {
    enabled = false
  }

  depends_on = [google_alloydb_instance.<primary_instance_name>]

Part of hashicorp/terraform-provider-google#13251

Release Note Template for Downstream PRs (will be copied)

alloydb: added `cluster_type` and `secondary_config` fields to support secondary clusters in `google_alloydb_cluster` resource. 

Derived from GoogleCloudPlatform/magic-modules#9012

Co-authored-by: Riley Karson <[email protected]>
Co-authored-by: Shubham Sahu <[email protected]>
[upstream:79d5d56903e5ad2b38e9f855164132e5c53da8f6]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician merged commit 9f5ccc4 into hashicorp:main Oct 10, 2023
2 checks passed
cheftako added a commit to cheftako/k8s-config-connector that referenced this pull request Mar 25, 2024
Backport hashicorp/terraform-provider-google-beta#6474

To Create a Secondary Cluster, `cluster_type` and `secondary_config` are the additional fields to be mentioned in the cluster. The secondary cluster is dependent on the primary instance and the same needs to be added in the config using the `depends_on` field. The field continuous_backup_config.enabled needs to be set false as continuous backup is not supported for secondary clusters. The deletion_policy is set to FORCE as the secondary instance that will be created in the secondary cluster can not be deleted independently, but instead the entire secondary cluster needs to be deleted forcefully along with its secondary instance.

```
  cluster_type = "SECONDARY"
  deletion_policy = "FORCE"
  secondary_config {
    primary_cluster_name = <fully qualified primary cluster name>
    // Eg: primary_cluster_name = google_alloydb_cluster.<primary_cluster_name>.name
  }

  continuous_backup_config {
    enabled = false
  }

  depends_on = [google_alloydb_instance.<primary_instance_name>]
```

Part of [hashicorp/terraform-provider-google#13251](hashicorp/terraform-provider-google#13251)

**Release Note Template for Downstream PRs (will be copied)**

```
alloydb: added `cluster_type` and `secondary_config` fields to support secondary clusters in `google_alloydb_cluster` resource.
```

Derived from [GoogleCloudPlatform/magic-modules#9012](GoogleCloudPlatform/magic-modules#9012)
cheftako added a commit to cheftako/k8s-config-connector that referenced this pull request Mar 25, 2024
Backport hashicorp/terraform-provider-google-beta#6474

To Create a Secondary Cluster, `cluster_type` and `secondary_config` are the additional fields to be mentioned in the cluster. The secondary cluster is dependent on the primary instance and the same needs to be added in the config using the `depends_on` field. The field continuous_backup_config.enabled needs to be set false as continuous backup is not supported for secondary clusters. The deletion_policy is set to FORCE as the secondary instance that will be created in the secondary cluster can not be deleted independently, but instead the entire secondary cluster needs to be deleted forcefully along with its secondary instance.

```
  cluster_type = "SECONDARY"
  deletion_policy = "FORCE"
  secondary_config {
    primary_cluster_name = <fully qualified primary cluster name>
    // Eg: primary_cluster_name = google_alloydb_cluster.<primary_cluster_name>.name
  }

  continuous_backup_config {
    enabled = false
  }

  depends_on = [google_alloydb_instance.<primary_instance_name>]
```

Part of [hashicorp/terraform-provider-google#13251](hashicorp/terraform-provider-google#13251)

**Release Note Template for Downstream PRs (will be copied)**

```
alloydb: added `cluster_type` and `secondary_config` fields to support secondary clusters in `google_alloydb_cluster` resource.
```

Derived from [GoogleCloudPlatform/magic-modules#9012](GoogleCloudPlatform/magic-modules#9012)
@modular-magician modular-magician deleted the downstream-pr-79d5d56903e5ad2b38e9f855164132e5c53da8f6 branch November 16, 2024 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant