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-83476 - Enable dns private resolution in cluster creation #212

Merged
merged 19 commits into from
Oct 10, 2024

Conversation

PaulomeeCb
Copy link
Contributor

@PaulomeeCb PaulomeeCb commented Aug 2, 2024

Jira

Description

Please include a summary of the fix/feature/change, including any relevant motivation and context.

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
  1. Setting enable_private_dns_resolution = true -
terraform plan 
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/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.
╵
data.couchbase-capella_clusters.existing_clusters: Reading...
data.couchbase-capella_clusters.existing_clusters: Read complete after 1s

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_cluster.new_cluster will be created
  + resource "couchbase-capella_cluster" "new_cluster" {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "192.168.0.0/20"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = true
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + name                          = "New Terraform Cluster"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + cluster_id    = (known after apply)
  + new_cluster   = {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "192.168.0.0/20"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = true
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + if_match                      = null
      + name                          = "New Terraform Cluster"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

terraform apply-
enable_private_dns_resolution = true

 terraform apply
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/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.
╵
data.couchbase-capella_clusters.existing_clusters: Reading...
data.couchbase-capella_clusters.existing_clusters: Read complete after 0s

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_cluster.new_cluster will be created
  + resource "couchbase-capella_cluster" "new_cluster" {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "192.168.0.0/20"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = true
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + name                          = "New Terraform Cluster"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + cluster_id    = (known after apply)
  + new_cluster   = {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "192.168.0.0/20"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = true
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + if_match                      = null
      + name                          = "New Terraform Cluster"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

couchbase-capella_cluster.new_cluster: Creating...
couchbase-capella_cluster.new_cluster: Still creating... [10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [40s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [50s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m0s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m40s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m50s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m0s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m40s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m50s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [3m0s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [3m10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [3m20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [3m30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [3m40s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [3m50s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [4m0s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [4m10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [4m20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [4m30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [4m40s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [4m50s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [5m0s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [5m10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [5m20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [5m30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [5m40s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [5m50s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [6m0s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [6m10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [6m20s elapsed]
couchbase-capella_cluster.new_cluster: Creation complete after 6m22s [id=391eb24a-52ef-4071-b249-956783712473]

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

Outputs:

cluster_id = "391eb24a-52ef-4071-b249-956783712473"
clusters_list = {
  "data" = tolist(null) /* of object */
  "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
  "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
}
new_cluster = {
  "app_service_id" = tostring(null)
  "audit" = {
    "created_at" = "2024-08-02 20:54:21.07775863 +0000 UTC"
    "created_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
    "modified_at" = "2024-08-02 21:00:42.208574667 +0000 UTC"
    "modified_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
    "version" = 4
  }
  "availability" = {
    "type" = "multi"
  }
  "cloud_provider" = {
    "cidr" = "192.168.0.0/20"
    "region" = "us-east-1"
    "type" = "aws"
  }
  "couchbase_server" = {
    "version" = "7.6"
  }
  "current_state" = "healthy"
  "description" = "My first test cluster for multiple services."
  "enable_private_dns_resolution" = true
  "etag" = "Version: 4"
  "id" = "391eb24a-52ef-4071-b249-956783712473"
  "if_match" = tostring(null)
  "name" = "New Terraform Cluster"
  "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
  "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
  "service_groups" = toset([
    {
      "node" = {
        "compute" = {
          "cpu" = 4
          "ram" = 16
        }
        "disk" = {
          "autoexpansion" = tobool(null)
          "iops" = 5000
          "storage" = 50
          "type" = "io2"
        }
      }
      "num_of_nodes" = 3
      "services" = toset([
        "data",
        "index",
        "query",
      ])
    },
  ])
  "support" = {
    "plan" = "developer pro"
    "timezone" = "PT"
  }
}

  1. Without adding the field in the request-
terraform plan 
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/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.
╵
data.couchbase-capella_clusters.existing_clusters: Reading...
data.couchbase-capella_clusters.existing_clusters: Read complete after 0s

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_cluster.new_cluster will be created
  + resource "couchbase-capella_cluster" "new_cluster" {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "10.4.0.0/23"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = (known after apply)
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + name                          = "New Terraform Cluster 2"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + cluster_id    = (known after apply)
  + new_cluster   = {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "10.4.0.0/23"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = (known after apply)
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + if_match                      = null
      + name                          = "New Terraform Cluster 2"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

terraform apply -
enable_private_dns_resolution = false for new cluster-

terraform apply
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/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.
╵
data.couchbase-capella_clusters.existing_clusters: Reading...
data.couchbase-capella_clusters.existing_clusters: Read complete after 0s

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_cluster.new_cluster will be created
  + resource "couchbase-capella_cluster" "new_cluster" {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "10.4.0.0/23"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = (known after apply)
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + name                          = "New Terraform Cluster 2"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + cluster_id    = (known after apply)
  + new_cluster   = {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "10.4.0.0/23"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = (known after apply)
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + if_match                      = null
      + name                          = "New Terraform Cluster 2"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

couchbase-capella_cluster.new_cluster: Creating...
couchbase-capella_cluster.new_cluster: Still creating... [10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [40s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [50s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m0s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m40s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [1m50s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m0s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m10s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m20s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m30s elapsed]
couchbase-capella_cluster.new_cluster: Still creating... [2m40s elapsed]
couchbase-capella_cluster.new_cluster: Creation complete after 2m46s [id=7a04a8e3-7ad3-4302-ad0d-647eeb5ef3cc]

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

Outputs:

cluster_id = "7a04a8e3-7ad3-4302-ad0d-647eeb5ef3cc"
clusters_list = {
  "data" = tolist([
    {
      "app_service_id" = tostring(null)
      "audit" = {
        "created_at" = "2024-08-02 20:54:21.07775863 +0000 UTC"
        "created_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
        "modified_at" = "2024-08-02 21:00:43.106558626 +0000 UTC"
        "modified_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
        "version" = 5
      }
      "availability" = {
        "type" = "multi"
      }
      "cloud_provider" = {
        "cidr" = "192.168.0.0/20"
        "region" = "us-east-1"
        "type" = "aws"
      }
      "couchbase_server" = {
        "version" = "7.6.2"
      }
      "current_state" = "healthy"
      "description" = "My first test cluster for multiple services."
      "enable_private_dns_resolution" = true
      "id" = "391eb24a-52ef-4071-b249-956783712473"
      "name" = "New Terraform Cluster"
      "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
      "service_groups" = tolist([
        {
          "node" = {
            "compute" = {
              "cpu" = 4
              "ram" = 16
            }
            "disk" = {
              "autoexpansion" = tobool(null)
              "iops" = 5000
              "storage" = 50
              "type" = "io2"
            }
          }
          "num_of_nodes" = 3
          "services" = tolist([
            "index",
            "data",
            "query",
          ])
        },
      ])
      "support" = {
        "plan" = "developer pro"
        "timezone" = "PT"
      }
    },
  ])
  "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
  "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
}
new_cluster = {
  "app_service_id" = tostring(null)
  "audit" = {
    "created_at" = "2024-08-02 21:39:18.025023295 +0000 UTC"
    "created_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
    "modified_at" = "2024-08-02 21:42:03.432727052 +0000 UTC"
    "modified_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
    "version" = 5
  }
  "availability" = {
    "type" = "multi"
  }
  "cloud_provider" = {
    "cidr" = "10.4.0.0/23"
    "region" = "us-east-1"
    "type" = "aws"
  }
  "couchbase_server" = {
    "version" = "7.6"
  }
  "current_state" = "healthy"
  "description" = "My first test cluster for multiple services."
  "enable_private_dns_resolution" = false
  "etag" = "Version: 5"
  "id" = "7a04a8e3-7ad3-4302-ad0d-647eeb5ef3cc"
  "if_match" = tostring(null)
  "name" = "New Terraform Cluster 2"
  "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
  "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
  "service_groups" = toset([
    {
      "node" = {
        "compute" = {
          "cpu" = 4
          "ram" = 16
        }
        "disk" = {
          "autoexpansion" = tobool(null)
          "iops" = 5000
          "storage" = 50
          "type" = "io2"
        }
      }
      "num_of_nodes" = 3
      "services" = toset([
        "data",
        "index",
        "query",
      ])
    },
  ])
  "support" = {
    "plan" = "developer pro"
    "timezone" = "PT"
  }
}

Created successfully-

Screen Shot 2024-08-02 at 3 21 18 PM
  1. cluster metadata-
    We can see "enablePrivateDNSResolution": true for cluster 391eb24a-52ef-4071-b249-956783712473 , and none for the other one.
[
  {
    "cpapi": {
      "_type": "dataplane.clusters",
      "config": {
        "backupDisabled": false,
        "baseHostname": "jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "connect": {
          "privateZone": false,
          "srv": "cb.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com"
        },
        "enablePrivateDNSResolution": true,
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "intendedState": "healthy",
        "manage": {
          "agent": "agent.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
          "metrics": "https://metrics.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com:12003/metrics",
          "modifiedAt": "0001-01-01T00:00:00Z"
        },
        "provider": "hostedAWS",
        "region": "us-east-1",
        "resourceContainer": {
          "kind": "hosted"
        },
        "singleAz": false,
        "specs": [
          {
            "compute": {
              "cpu": 4,
              "memoryInGb": 16,
              "type": "m5.xlarge"
            },
            "count": 3,
            "disk": {
              "iops": 5000,
              "sizeInGb": 50,
              "type": "io2"
            },
            "diskAutoScaling": {
              "enabled": true
            },
            "services": [
              {
                "memoryAllocationInMb": 4139,
                "type": "index"
              },
              {
                "memoryAllocationInMb": 4139,
                "type": "kv"
              },
              {
                "memoryAllocationInMb": 4139,
                "type": "n1ql"
              }
            ]
          }
        ],
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        }
      },
      "createdAt": "2024-08-02T20:54:21.07775863Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "description": "My first test cluster for multiple services.",
      "id": "391eb24a-52ef-4071-b249-956783712473",
      "modifiedAt": "2024-08-02T21:00:43.106558626Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "name": "New Terraform Cluster",
      "package": {
        "key": "developerPro",
        "timezone": "PT"
      },
      "playgroundDisabled": false,
      "preAuthorizeSupport": true,
      "projectId": "c3610699-6eea-45f4-8d22-e87145460059",
      "status": {
        "state": "healthy",
        "stateEnteredAt": "2024-08-02T21:00:42.208541459Z"
      },
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 5
    }
  },
  {
    "cpapi": {
      "_type": "dataplane.clusters",
      "config": {
        "backupDisabled": false,
        "baseHostname": "f7hpv8vgkr-jx1pe.aws-guardians.nonprod-project-avengers.com",
        "connect": {
          "privateZone": false,
          "srv": "cb.f7hpv8vgkr-jx1pe.aws-guardians.nonprod-project-avengers.com"
        },
        "encryption": {
          "providerId": "8bf62805-a279-4234-8397-b3d4ad64bfb5"
        },
        "intendedState": "healthy",
        "manage": {
          "agent": "agent.f7hpv8vgkr-jx1pe.aws-guardians.nonprod-project-avengers.com",
          "metrics": "https://metrics.f7hpv8vgkr-jx1pe.aws-guardians.nonprod-project-avengers.com:12003/metrics",
          "modifiedAt": "0001-01-01T00:00:00Z"
        },
        "provider": "hostedAWS",
        "region": "us-east-1",
        "resourceContainer": {
          "kind": "hosted"
        },
        "singleAz": false,
        "specs": [
          {
            "compute": {
              "cpu": 4,
              "memoryInGb": 16,
              "type": "m5.xlarge"
            },
            "count": 3,
            "disk": {
              "iops": 5000,
              "sizeInGb": 50,
              "type": "io2"
            },
            "diskAutoScaling": {
              "enabled": true
            },
            "services": [
              {
                "memoryAllocationInMb": 4139,
                "type": "index"
              },
              {
                "memoryAllocationInMb": 4139,
                "type": "kv"
              },
              {
                "memoryAllocationInMb": 4139,
                "type": "n1ql"
              }
            ]
          }
        ],
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        }
      },
      "createdAt": "2024-08-02T21:39:18.025023295Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "description": "My first test cluster for multiple services.",
      "id": "7a04a8e3-7ad3-4302-ad0d-647eeb5ef3cc",
      "modifiedAt": "2024-08-02T21:42:03.432727052Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "name": "New Terraform Cluster 2",
      "package": {
        "key": "developerPro",
        "timezone": "PT"
      },
      "playgroundDisabled": false,
      "preAuthorizeSupport": true,
      "projectId": "c3610699-6eea-45f4-8d22-e87145460059",
      "status": {
        "state": "healthy",
        "stateEnteredAt": "2024-08-02T21:42:02.496814927Z"
      },
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 5
    }
  }
]
  1. node metadata for cluster 391eb24a-52ef-4071-b249-956783712473, managementHostname is populated -
[
  {
    "cpapi": {
      "_type": "dataplane.nodes",
      "certificatesInstalled": false,
      "clusterId": "391eb24a-52ef-4071-b249-956783712473",
      "config": {
        "address": {
          "private": "",
          "public": ""
        },
        "compute": {
          "cpu": 4,
          "image": "",
          "memoryInGb": 16,
          "providerId": "",
          "type": "m5.xlarge"
        },
        "disk": {
          "providerId": "",
          "sizeInGb": 1024,
          "type": "gp3"
        },
        "diskAutoScaling": {
          "enabled": false
        },
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "hostname": "",
        "isColumnarNode": false,
        "isServerlessNode": false,
        "provider": "hostedAWS",
        "region": "us-east-1",
        "serverGroup": 0,
        "subnetId": "subnet-0f5d317996de10c98",
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-backup-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        },
        "vpcId": "vpc-029e702667142457e",
        "zone": "us-east-1c"
      },
      "couchbaseServerStopped": false,
      "createdAt": "2024-08-02T21:00:19.395873837Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "id": "9a9e30f3-9b7b-42e6-a5ca-3db92e65d0ff",
      "modifiedAt": "2024-08-02T21:00:19.395873837Z",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "status": "pending",
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "type": "backup",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 1
    }
  },
  {
    "cpapi": {
      "_type": "dataplane.nodes",
      "certificatesInstalled": true,
      "clusterId": "391eb24a-52ef-4071-b249-956783712473",
      "config": {
        "address": {
          "private": "192.168.9.199",
          "public": "3.237.28.131"
        },
        "compute": {
          "cpu": 4,
          "image": "ami-09ff8357ed3e5ba3b",
          "memoryInGb": 16,
          "providerId": "i-034487a4d5fe4ae77",
          "type": "m5.xlarge"
        },
        "disk": {
          "iops": 5000,
          "providerId": "vol-01523ba292437e861",
          "sizeInGb": 50,
          "throughputMbps": null,
          "throughputMbpsOverride": null,
          "type": "io2"
        },
        "diskAutoScaling": {
          "enabled": true
        },
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "hostname": "svc-dqi-node-003.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "isColumnarNode": false,
        "isServerlessNode": false,
        "managementHostname": "svc-dqi-node-003-mg.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "provider": "hostedAWS",
        "region": "us-east-1",
        "serverGroup": 3,
        "services": [
          {
            "memoryAllocationInMb": 4139,
            "type": "index"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "kv"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "n1ql"
          }
        ],
        "subnetId": "subnet-0e6f169a00a1dcec0",
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        },
        "vpcId": "vpc-029e702667142457e",
        "zone": "us-east-1f"
      },
      "couchbaseServerStopped": false,
      "createdAt": "2024-08-02T20:54:51.527879588Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "id": "a7070d3e-c63e-4f52-a3c3-41efe861bd5e",
      "modifiedAt": "2024-08-02T20:59:51.763071463Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "status": "member",
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "type": "couchbase",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 7
    }
  },
  {
    "cpapi": {
      "_type": "dataplane.nodes",
      "certificatesInstalled": true,
      "clusterId": "391eb24a-52ef-4071-b249-956783712473",
      "config": {
        "address": {
          "private": "192.168.1.5",
          "public": "54.91.134.165"
        },
        "compute": {
          "cpu": 4,
          "image": "ami-09ff8357ed3e5ba3b",
          "memoryInGb": 16,
          "providerId": "i-0523093d444ba90e8",
          "type": "m5.xlarge"
        },
        "disk": {
          "iops": 5000,
          "providerId": "vol-0c1efde598535e8b1",
          "sizeInGb": 50,
          "throughputMbps": null,
          "throughputMbpsOverride": null,
          "type": "io2"
        },
        "diskAutoScaling": {
          "enabled": true
        },
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "hostname": "svc-dqi-node-001.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "isColumnarNode": false,
        "isServerlessNode": false,
        "managementHostname": "svc-dqi-node-001-mg.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "provider": "hostedAWS",
        "region": "us-east-1",
        "serverGroup": 1,
        "services": [
          {
            "memoryAllocationInMb": 4139,
            "type": "index"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "kv"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "n1ql"
          }
        ],
        "subnetId": "subnet-0f5d317996de10c98",
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        },
        "vpcId": "vpc-029e702667142457e",
        "zone": "us-east-1c"
      },
      "couchbaseServerStopped": false,
      "createdAt": "2024-08-02T20:54:51.529533422Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "id": "b7cb250d-72ef-441e-b106-76b8f19383ea",
      "modifiedAt": "2024-08-02T20:59:51.781694922Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "status": "member",
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "type": "couchbase",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 7
    }
  },
  {
    "cpapi": {
      "_type": "dataplane.nodes",
      "certificatesInstalled": true,
      "clusterId": "391eb24a-52ef-4071-b249-956783712473",
      "config": {
        "address": {
          "private": "192.168.5.214",
          "public": "18.234.37.110"
        },
        "compute": {
          "cpu": 4,
          "image": "ami-09ff8357ed3e5ba3b",
          "memoryInGb": 16,
          "providerId": "i-08b7025f71e5c37d6",
          "type": "m5.xlarge"
        },
        "disk": {
          "iops": 5000,
          "providerId": "vol-0f7d11954163b3c04",
          "sizeInGb": 50,
          "throughputMbps": null,
          "throughputMbpsOverride": null,
          "type": "io2"
        },
        "diskAutoScaling": {
          "enabled": true
        },
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "hostname": "svc-dqi-node-002.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "isColumnarNode": false,
        "isServerlessNode": false,
        "managementHostname": "svc-dqi-node-002-mg.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "provider": "hostedAWS",
        "region": "us-east-1",
        "serverGroup": 2,
        "services": [
          {
            "memoryAllocationInMb": 4139,
            "type": "index"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "kv"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "n1ql"
          }
        ],
        "subnetId": "subnet-0b3a3e60d8d88a388",
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        },
        "vpcId": "vpc-029e702667142457e",
        "zone": "us-east-1d"
      },
      "couchbaseServerStopped": false,
      "createdAt": "2024-08-02T20:54:51.528250297Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "id": "dfd6d7d5-77b6-4ec4-b867-434f7f4882c2",
      "modifiedAt": "2024-08-02T20:59:55.956866424Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "status": "member",
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "type": "couchbase",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 7
    }
  }
]

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

Further comments

@PaulomeeCb PaulomeeCb requested review from a team as code owners August 2, 2024 21:10
@PaulomeeCb PaulomeeCb self-assigned this Aug 2, 2024
@PaulomeeCb PaulomeeCb marked this pull request as draft August 2, 2024 21:10
@PaulomeeCb PaulomeeCb marked this pull request as ready for review August 2, 2024 22:12
@Talina06
Copy link
Member

Talina06 commented Sep 3, 2024

closing as stale, please reopen when ready to merge

@Talina06 Talina06 closed this Sep 3, 2024
@PaulomeeCb PaulomeeCb reopened this Sep 23, 2024
@PaulomeeCb PaulomeeCb force-pushed the AV-83476_enable_dns_private_resolution branch from 77b1246 to e03e90f Compare September 23, 2024 19:45
aniket-Kumar-c
aniket-Kumar-c previously approved these changes Sep 25, 2024
Copy link
Collaborator

@aniket-Kumar-c aniket-Kumar-c left a comment

Choose a reason for hiding this comment

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

LGTM!

SaicharanCB
SaicharanCB previously approved these changes Oct 4, 2024
Copy link
Contributor

@SaicharanCB SaicharanCB left a comment

Choose a reason for hiding this comment

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

+1

@PaulomeeCb PaulomeeCb merged commit 2517eb6 into main Oct 10, 2024
4 checks passed
@PaulomeeCb PaulomeeCb requested review from a-atri and removed request for a-atri October 10, 2024 22:13
Lagher0 added a commit that referenced this pull request Oct 22, 2024
* main:
  AV-83476 - Enable dns private resolution in cluster creation (#212)
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.

5 participants