terraform-provider-couchbase

command module
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

README

Terraform provider for couchbase

GitHub release (with filter) GitHub Workflow Status (with event) GitHub all releases GitHub contributors GitHub Repo stars

Terraform provider for Couchbase allow manage resources in couchbase cluster

Requirements

  • terraform 1.10.5
  • go 1.24.0 (for plugin build)
  • docker compose v2.32.4-desktop.1
  • docker desktop 4.38.0

Run couchbase on localhost

In terraform_example folder is docker-compose.yml with couchbase server.

How to run couchbase on localhost. (Works on Ubuntu)

# Add couchbase to your /etc/hosts file
sudo su -
echo "127.0.0.1 couchbase" >> /etc/hosts
exit

# Create couchbase network
make cbnetup

# Create couchbase
make cbup

# Couchbase initialization
make cbinit

How to destroy local infrastructure

# Destroy couchbase
make cbdown

# Destroy couchbase network
make cbnetdown

Provider

WARNING

If you create multiple query index at once you can get internal server failure error because you can't create next index until previous is created.

Suggested solution is to reduce parallelism. Add -parallelism=1 parameter during terraform apply

Example:

terraform apply -parallelism=1
Base provider configuration
terraform {
  required_version = ">= 1.10.5"
  required_providers {
    couchbase = {
      version = "~> 1.1.3"
      source  = "lukasbudisky/couchbase"
    }
  }
}

provider "couchbase" {
  address                   = "couchbase.couchbase"
  client_port               = 8091
  node_port                 = 11210
  username                  = "Administrator"
  password                  = "123456"
  management_timeout        = 10
  tls_root_cert_skip_verify = false
}
TLS provider configuration
terraform {
  required_version = ">= 1.10.5"
  required_providers {
    couchbase = {
      version = "~> 1.1.3"
      source  = "lukasbudisky/couchbase"
    }
  }
}

provider "couchbase" {
  address                   = "couchbase.couchbase"
  client_port               = 18091
  node_port                 = 11207
  username                  = "Administrator"
  password                  = "123456"
  management_timeout        = 10
  tls_root_cert_skip_verify = true
  tls_root_cert             = "certificate.pem"
  allow_sasl_mechanism      = "SCRAM-SHA1,SCRAM-SHA256,SCRAM-SHA512"
}

Resources

We currently manage these operations via terraform resources

  • buckets: couchbase_bucket_manager
  • groups: couchbase_security_group
  • users: couchbase_security_user
  • primary: query index couchbase_primary_query_index
  • query index: couchbase_query_index

Developing provider

Provider tests

make test

Acceptance tests

make testacc

Build provider

make build

Install provider

make install

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL