Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Fixed error when modifying VPC Cluster configuration #18

Closed
wants to merge 2 commits into from

Conversation

jamesrwilkinson
Copy link
Contributor

When modifying the terraform configuration file for a VPC Cluster that has already been deployed, running terraform apply will result in the following error:

Plan: 0 to add, 1 to change, 0 to destroy.
couchbasecapella_vpc_cluster.cluster: Modifying... [id=<cluster-id>]
╷
│ Error: doesn't support update
│ 
│   with couchbasecapella_vpc_cluster.cluster,
│   on main.tf line 11, in resource "couchbasecapella_vpc_cluster" "cluster":
│   11: resource "couchbasecapella_vpc_cluster" "cluster" {
│ 
╵
Releasing state lock. This may take a few moments...
ERRO[0046] 1 error occurred:
        * exit status 1

The expected behaviour should be to delete the currently deployed VPC Cluster and then recreate it with the updated configuration.

I've added ForceNew: true to all fields of resource_couchbasecapella_vpc_cluster.go. ForceNew: true tells Terraform that any change to this field should result in the deletion and recreation of the resource.

This change fixes #17.

@jamesrwilkinson jamesrwilkinson requested a review from a team May 10, 2022 09:51
@jamesrwilkinson jamesrwilkinson self-assigned this May 10, 2022
@jamesrwilkinson jamesrwilkinson requested a review from d-asmaa June 14, 2022 15:26
@Talina06 Talina06 closed this Mar 14, 2024
@Talina06 Talina06 deleted the fix/vpc-cluster-update branch March 14, 2024 21:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cluster modification is not allowed with couchbasecapella_vpc_cluster.cluster resource.
2 participants