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

AV-97596 | set computed value for replica correctly #278

Merged
merged 2 commits into from
Mar 11, 2025
Merged

Conversation

l0n3star
Copy link
Contributor

@l0n3star l0n3star commented Mar 10, 2025

Jira

  • AV-97596

Description

initialize replica to 0 only if it's not in the plan

Type of Change

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Manual Testing Approach

How was this change tested and do you have evidence? (REQUIRED: Select at least 1)

  • Manually tested
  • Unit tested
  • Acceptance tested
  • Unable to test / will not test (Please provide comments in section below)

Testing

Testing
terraform apply -auto-approve
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/$USER/GolandProjects/terraform-provider-couchbase-capella/bin
│ 
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # couchbase-capella_query_indexes.idx will be created
  + resource "couchbase-capella_query_indexes" "idx" {
      + bucket_name     = "test"
      + cluster_id      = <cluster_id>
      + collection_name = "test"
      + index_name      = "primary_index"
      + is_primary      = true
      + organization_id = <org_id>
      + project_id      = <project_id>
      + scope_name      = "test"
      + status          = (known after apply)
      + with            = {
          + num_replica = 1
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
couchbase-capella_query_indexes.idx: Creating...
couchbase-capella_query_indexes.idx: Creation complete after 4s

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Required Checklist:

  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if required)
  • I have run make fmt and formatted my code
  • I have made sure that no schema field is marked with both requiresReplace and computed

Further comments

@l0n3star l0n3star requested a review from a team as a code owner March 10, 2025 22:47
@l0n3star l0n3star self-assigned this Mar 10, 2025
@l0n3star l0n3star added the bug Something isn't working label Mar 10, 2025
PaulomeeCb
PaulomeeCb previously approved these changes Mar 11, 2025
Copy link
Contributor

@PaulomeeCb PaulomeeCb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@l0n3star l0n3star merged commit 1141901 into main Mar 11, 2025
7 checks passed
@l0n3star l0n3star deleted the AV-97596_replica branch March 11, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants