{"id":44386038,"url":"https://github.com/nuodb/terraform-provider-nuodbaas","last_synced_at":"2026-02-12T00:44:08.995Z","repository":{"id":225581787,"uuid":"713937978","full_name":"nuodb/terraform-provider-nuodbaas","owner":"nuodb","description":"Terraform provider for the NuoDB DBaaS Control Plane","archived":false,"fork":false,"pushed_at":"2024-05-22T17:39:16.000Z","size":722,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-05-22T23:21:23.099Z","etag":null,"topics":["dbaas","nuodb","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuodb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-03T14:57:31.000Z","updated_at":"2024-05-28T15:21:32.427Z","dependencies_parsed_at":"2024-03-11T16:32:35.153Z","dependency_job_id":"f5d49c53-0444-41e4-87af-f9228504900b","html_url":"https://github.com/nuodb/terraform-provider-nuodbaas","commit_stats":null,"previous_names":["nuodb/terraform-provider-nuodbaas"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/nuodb/terraform-provider-nuodbaas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuodb%2Fterraform-provider-nuodbaas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuodb%2Fterraform-provider-nuodbaas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuodb%2Fterraform-provider-nuodbaas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuodb%2Fterraform-provider-nuodbaas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuodb","download_url":"https://codeload.github.com/nuodb/terraform-provider-nuodbaas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuodb%2Fterraform-provider-nuodbaas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29351058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T20:11:40.865Z","status":"ssl_error","status_checked_at":"2026-02-11T20:10:41.637Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbaas","nuodb","terraform","terraform-provider"],"created_at":"2026-02-12T00:44:03.943Z","updated_at":"2026-02-12T00:44:08.986Z","avatar_url":"https://github.com/nuodb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NuoDB DBaaS Provider for Terraform\n\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/nuodb/terraform-provider-nuodbaas/tree/main.svg?style=shield\u0026circle-token=64fc942b186124a09d998787035b14627614064f)](https://dl.circleci.com/status-badge/redirect/gh/nuodb/terraform-provider-nuodbaas/tree/main)\n\nThe NuoDB DBaaS Provider for Terraform allows NuoDB databases to be managed using Terraform within the [NuoDB Control Plane](https://github.com/nuodb/nuodb-cp-releases).\n\nFor more information, see the [NuoDB DBaaS Provider](https://registry.terraform.io/providers/nuodb/nuodbaas) page in the Terraform Registry.\n\n## Usage requirements\n\n* Terraform v1.5.x or greater\n* Access to NuoDB Control Plane v2.3.x or greater\n\n## Configuring DBaaS access\n\nAccess to an instance of the NuoDB Control Plane is required in order to use the NuoDB DBaaS provider.\nIf you do not have access to a running instance of the NuoDB Control Plane, you can set one up yourself by following the instructions in [DBaaS Quick Start Guide](https://github.com/nuodb/nuodb-cp-releases/blob/main/docs/QuickStart.md).\n\nThe access credentials and URL for the NuoDB Control Plane can be supplied to the NuoDB DBaaS provider as configuration attributes or as environment variables.\nIn the example below, we use environment variables:\n\n```bash\nexport NUODB_CP_USER=org/user\nexport NUODB_CP_PASSWORD=secret\nexport NUODB_CP_URL_BASE=https://example.dbaas.nuodb.com/api\n```\n\nSee the [Documentation](docs/index.md) for information on provider configuration.\n\n## Getting started\n\nOnce DBaaS access has been configured, you can use Terraform to manage NuoDB projects and databases.\n\nThe following Terraform configuration defines a NuoDB project (`nuodbaas_project`) and database (`nuodbaas_database`).\n\n```hcl\nterraform {\n  required_providers {\n    nuodbaas = {\n      source  = \"registry.terraform.io/nuodb/nuodbaas\"\n      version = \"1.1.0\"\n    }\n  }\n}\n\nprovider \"nuodbaas\" {\n  # Credentials and URL supplied by environment variables\n}\n\n# Create a project\nresource \"nuodbaas_project\" \"proj\" {\n  organization = \"org\"\n  name         = \"proj\"\n  sla          = \"dev\"\n  tier         = \"n0.nano\"\n}\n\n# Create a database within the project\nresource \"nuodbaas_database\" \"db\" {\n  organization = nuodbaas_project.proj.organization\n  project      = nuodbaas_project.proj.name\n  name         = \"db\"\n  dba_password = \"secret\"\n}\n\n# Expose nuosql arguments to connect to database\noutput \"nuosql_args\" {\n  value = \u003c\u003c-EOT\n  ${nuodbaas_database.db.name}@${nuodbaas_database.db.status.sql_endpoint}:443 \\\n      --user dba --password ${nuodbaas_database.db.dba_password} \\\n      --connection-property trustedCertificates='${nuodbaas_database.db.status.ca_pem}'\n  EOT\n  sensitive = true\n}\n```\n\nThe example above provides the minimum configuration attributes needed in order to create a NuoDB project and database.\nA project belongs to an `organization` and has a `name`, `sla`, and `tier`, which define management policies and configuration attributes that are inherited by databases.\nA database belongs to `project` and has a `name` and `dba_password`, which is the password of the DBA user that can be used to create less-privileged database users.\n\n\u003e [!IMPORTANT]\n\u003e The `organization` and `project` attributes of the database are resolved from the project resource.\nThis is important because it defines an [implicit dependency](https://developer.hashicorp.com/terraform/tutorials/configuration-language/dependencies#manage-implicit-dependencies) on the project, which forces the project to be created before the database.\n\nFor a complete list of project and database attributes, see the [Project](docs/resources/project.md) and [Database](docs/resources/database.md) resource documentation.\n\n### Creating resources\n\nNow that we understand what the configuration defines, we can use Terraform to create the actual resources.\n\n1. Create a file named `example.tf` from the content above.\n2. Run `terraform init` to initialize your Terraform workspace.\n3. Run `terraform apply` to create the project and database.\nIn this step, you will be prompted to confirm that you want to create the resources.\nResource creation will be aborted unless you enter `yes`.\n\nBy default, the `terraform apply` invocation will block until the project and database both become available, which may take a few minutes.\n\n### Inspecting resources\n\nOnce the database is running, you can connect to it by using the `sql_endpoint` and `ca_pem` read-only attributes, which are available after the database resource has been created.\nTo display all resource attributes, you can run `terraform show` within your workspace.\n\n```console\n$ terraform show\n...\nresource \"nuodbaas_database\" \"db\" {\n    dba_password = (sensitive value)\n    labels       = {}\n    name         = \"db\"\n    organization = \"org\"\n    project      = \"proj\"\n    properties   = {\n        product_version = \"5.0\"\n        tier_parameters = {}\n    }\n    status       = {\n        ca_pem       = \u003c\u003c-EOT\n            -----BEGIN CERTIFICATE-----\n            MIICxDCCAaygAwIBAgIJAJdWQkAR7tVqMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV\n            BAMMDGNhLm51b2RiLmNvbTAeFw0yNDAzMDEyMDIyMDlaFw0yNTAzMDEyMDIyMDla\n            MBcxFTATBgNVBAMMDGNhLm51b2RiLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP\n            ADCCAQoCggEBAIvrbA9ZNSE4NvWblJJ1dlcM3mBNxnSti9FaFsf20uxydOKn1gpC\n            Qwo6hQvXOD+nI5N1a/YSKbp+HyDgU/4XDCVetjpxLzem049v+1Fa00EkM2aMoQQF\n            ke4SFkgDUoxqTHZ2lqHEDJwUu9zhwoxbsoxKpGNvmsP3kJvevoFiTKlIfBW8kw/H\n            2PXXOjkopvIM7gOr9vIIZV40zJZpp7e0i9MWNWNsL8XJqIYUFCTit0W8CbqTHoO0\n            WiYxSeiuV0rtFA1wMpXz5vSp3l9SskbKbQQmJFsst50s80KqZUnIDsiKXBOfZF6l\n            pz8K2NOs9XP35CzpVXHF3pnLGVsaY+ZFMtkCAwEAAaMTMBEwDwYDVR0TAQH/BAUw\n            AwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAEifAXDhWDIUwF8/GxlXbO5AY60ZS6S9n\n            hcaLmVDAYK+JmBEcpmdDQUegOaajsO0zN25DR7Obkfw0Nq5imVYCaVEEmY4j6tL/\n            KAOBw6NxT1sy32IHKcREFd4qlgE6pgaET87S4uL6Ej4QlKR0ksB+bBTA6NKgmX+W\n            qW8fjXs/q2ey45hUigSCfXspO5bS8OX0iAxQA+5Sw1Ys4GpaM4Y/1FscPCh99hzv\n            rpnZ3nuGnXnKy7oceAaG/bBxnMK4BEbm4TIO1MHHdTZL5+gcnuDMtKTxjdpgziud\n            ECB524GGqjDOBQ/Ixa6bRT2hM2LaqTcPzlPICl5NNTyhoQlSDIGdYQ==\n            -----END CERTIFICATE-----\n        EOT\n        message      = \"database is available\"\n        ready        = true\n        shutdown     = false\n        sql_endpoint = \"proj-f4ccefc29c8d.dbaas.nuodb.com\"\n        state        = \"Available\"\n    }\n    tier         = \"n0.nano\"\n}\n```\n\n### Connecting to the database\n\nThe example configuration above also exposes an [`output`](https://developer.hashicorp.com/terraform/language/values/outputs) named `nuosql_args`, which makes available the arguments to supply to the `nuosql` tool in order to establish a client connection to the database.\nThe `nuosql` tool can be found in the [NuoDB Client Package](https://github.com/nuodb/nuodb-client) ([v20230228](https://github.com/nuodb/nuodb-client/releases/tag/v20230228) or greater is required in order to connect to DBaaS databases).\n\nOnce `nuosql` is installed and available on the system path, you can connect to the database by running the command:\n\n```bash\neval \"nuosql $(terraform output -raw nuosql_args)\"\n```\n\n### Destroying resources\n\nOnce you are done using your database and project, you can delete them by running `terraform destroy`.\n\n## Build requirements\n\n* GNU Make 4.4\n* Golang 1.19\n* Java 11 (for integration testing)\n* Minikube / Docker Desktop and Kubernetes 1.28.x (for end-to-end testing)\n\n### Installing development builds\n\nYou can also build the provider locally and configure Terraform to use it.\nThe `make package` command builds and stages the provider in the `dist/pkg_mirror` directory so that it can be used as a local [`filesystem_mirror`](https://developer.hashicorp.com/terraform/cli/config/config-file#filesystem_mirror).\n\nA locally built provider can be used as follows:\n\n```bash\n# Build provider, which is staged in dist/pkg_mirror\nmake package\n\n# Create Terraform configuration\ncat \u003c\u003cEOF \u003e terraform.rc\nprovider_installation {\n    filesystem_mirror {\n        path    = \"$(pwd)/dist/pkg_mirror\"\n        include = [\"registry.terraform.io/nuodb/nuodbaas\"]\n    }\n    direct {\n        exclude = [\"registry.terraform.io/nuodb/nuodbaas\"]\n    }\n}\nEOF\n\n# Use Terraform configuration\nexport TF_CLI_CONFIG_FILE=\"$(pwd)/terraform.rc\"\n```\n\nAlternatively, the Terraform configuration file can be placed in `~/.terraformrc` so that it gets picked up automatically without `TF_CLI_CONFIG_FILE` being set.\n\n## Local testing\n\nThere are two configurations that are used by the tests that are run as part of continuous integration.\nThe integration tests use a stripped-down CRUD-only Kubernetes environment consisting of a Kubernetes API server backed by `etcd`, along with the NuoDB Control Plane REST service.\nThe end-to-end tests use a real Kubernetes environment to run a full instance of the NuoDB Control Plane as described in [DBaaS Quick Start Guide](https://github.com/nuodb/nuodb-cp-releases/blob/main/docs/QuickStart.md).\n\n### Integration testing\n\nTo run integration tests:\n\n```bash\nmake integration-tests\n```\n\nThis downloads and deploys the CRUD-only Kubernetes environment and NuoDB Control Plane REST service, runs the tests, and shuts down the test environment when finished.\n\n### End-to-end testing\n\nTo run end-to-end tests:\n\n1. Deploy the NuoDB Control Plane into the Kubernetes cluster that `kubectl` is configured to use.\n    ```bash\n    make deploy-cp\n    ```\n2. Configure the credentials needed to access the NuoDB Control Plane.\n    ```bash\n    eval \"$(make extract-creds)\"\n    ```\n3. Run the tests.\n    ```bash\n    make testacc\n    ```\n4. Clean up all resources created for the NuoDB Control Plane when finished.\n    ```bash\n    make undeploy-cp\n    ```\n\n### Running a single test\n\nTo run a single test:\n\n```sh\nTESTARGS=\"-run=TestFullLifecycle\" make testacc\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuodb%2Fterraform-provider-nuodbaas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuodb%2Fterraform-provider-nuodbaas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuodb%2Fterraform-provider-nuodbaas/lists"}