{"id":13604617,"url":"https://github.com/ravendb/terraform-provider-ravendb","last_synced_at":"2025-04-09T16:15:59.433Z","repository":{"id":45133866,"uuid":"409226493","full_name":"ravendb/terraform-provider-ravendb","owner":"ravendb","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-12T08:11:33.000Z","size":259,"stargazers_count":6,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T16:15:28.055Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ravendb.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-09-22T13:59:56.000Z","updated_at":"2024-06-26T07:19:39.000Z","dependencies_parsed_at":"2024-04-19T13:47:11.775Z","dependency_job_id":"cd962bf4-8e0a-4d6c-95ec-f5745832f24b","html_url":"https://github.com/ravendb/terraform-provider-ravendb","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fterraform-provider-ravendb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fterraform-provider-ravendb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fterraform-provider-ravendb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fterraform-provider-ravendb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravendb","download_url":"https://codeload.github.com/ravendb/terraform-provider-ravendb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065283,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T19:00:49.319Z","updated_at":"2025-04-09T16:15:59.405Z","avatar_url":"https://github.com/ravendb.png","language":"Go","funding_links":[],"categories":["DevOps"],"sub_categories":[],"readme":"# Terraform provider for RavenDB\n\n## Supported Platforms\n\n- Linux\n- Windows\n\n## Where to Ask for Help\n\nIf you have any questions, or need further assistance, you can [contact us directly](https://ravendb.net/contact).\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | \u003e = 1.0.3 |\n\n## Providers\n\n| Name    | Version |\n|---------|---------|\n| ravendb | 1.0.2   |\n\n## Sample usage\n\n### Providers\n\n```hcl\nterraform {\n  required_providers {\n    ravendb = {\n      source  = \"ravendb/ravendb\"\n      version = \"\u003e=1.0.0\"\n    }\n  }\n}\n    \nprovider \"aws\" {\n  region = \"us-east-1\"\n}\n```\n\n### Local variables for RavenDB server resource\n\n#### Example getting RavenDB server parameters from EC2 instances Terraform resources\n\n```hcl\nlocals {\n  \n  # Node tags\n  nodes = toset([\"a\", \"b\", \"c\"])\n  \n  # Ec2 hosts\n  hosts = flatten([\n    for instance in module.ec2_instances : [\n      instance.public_ip\n    ]\n  ])\n  \n  # This sample represents the nodes that will be used for unsecured setup.\n  ravendb_nodes_urls = flatten([\n    for instance in module.ec2_instances: [\n       \"http://${instance.public_ip}:8080\"\n    ]\n  ])\n  \n  # This samples represents the nodes that will be used for secure setup.\n  ravendb_nodes_urls = [for tag in local.nodes : \"https://${tag}.omermichleviz.development.run\"]\n  \n  # This smaples shows the usage of map reduce parameters to a given index.\n  maps = [\n\u003c\u003cEOT\n map('employees',  function(e) {\n  return {\n    Country: e.Address.Country,\n    Count: 1\n  }\n}) \nEOT\n,\n\u003c\u003cEOT\nmap('employees', function(e) {\n  return {\n      Country: e.Address.Country,\n      Count: 1\n  }\n})\nEOT\n  ]\n\n  reduce = \u003c\u003cEOT\ngroupBy(x =\u003e x.Country).aggregate(g =\u003e {\n  return {\n    Country: g.key,\n    Count: g.values.reduce((count, val) =\u003e val.Count + count, 0)\n  }\n })\nEOT\n  \n}\n```\n\n#### RavenDB server Terraform resource parameters\n\n```hcl\nlocals {\n  \n  # IP addresses for hosts to deploy RavenDB to\n  hosts = [\n         \"3.95.238.149\", \n         \"3.87.248.150\", \n         \"3.95.220.189\" \n         ]\n  \n  # This sample represents the nodes that will be used for unsecured setup.\n  ravendb_nodes_urls = [\n         \"http://3.95.238.149:8080\", \n         \"http://3.87.248.150:8080\", \n         \"http://3.95.220.189:8080\"\n         ]\n  \n  # This samples represents the nodes that will be used for secure setup.\n  ravendb_nodes_urls = [\n         \"https://a.domain.development.run\", \n         \"https://b.domain.development.run\", \n         \"https://c.domain.development.run\" \n         ]\n}\n```\n\n### RavenDB server resource\n\n```hcl\nresource \"ravendb_server\" \"server\" {\n  hosts              = local.hosts\n  database           = \"firewire\"\n  unsecured          = true\n  cluster_setup_zip  = \"/path/to/cluster/setup.zip\"\n  package {\n    version = \"5.4.111\"\n  }\n  url {\n    list      = local.ravendb_nodes_urls\n    http_port = 8080\n    tcp_port  = 38880\n  }\n  license = filebase64(\"/path/to/license.json\")\n  settings_override = {\n   \"Indexing.MapBatchSize\" = 16384\n  }\n  assets = {\n   \"/path/to/file/file_name.extension\" = filebase64(\"/path/to/file_name.extension\")\n  }\n  ssh {\n    user = \"ubuntu\"\n    pem  = filebase64(\"/path/to/server.pem\")\n  }\n  \n  databases_to_delete {\n    database {\n      name        = \"database_name\"\n      hard_delete = false\n    }\n  }\n\n  indexes_to_delete {\n    index {\n      database_name = \"database_name\"\n      indexes_names = [\n        \"index_name\",\n        \"index_name\",\n      ]\n    }\n  }\n  \n  databases {\n    database {\n      name              = \"database_name\"\n      replication_nodes =  local.nodes \n      encryption_key    = \"base64_encryption_key\"\n      settings = {\n        \"Subscriptions.MaxNumberOfConcurrentConnections\" = 2000\n    }\n\n    indexes {\n       index {\n          index_name = \"index_name\"\n          maps       = local.map\n          reduce     = local.reduce\n          configuration = {\n            \"Indexing.MapBatchSize\" = 128\n          }\n        }\n      }\n    }\n  }\n} \n\n```\n\n### Output\n\n```hcl\noutput \"public_instance_ips\" {\n    value = local.list\n}\noutput \"database_name\" {\n    value = ravendb_server.server.database\n}\n```\n\n## Inputs\n\n| Name| Description| Type| Required |\n|-|-|-|-|\n| hosts | The ip addresses of the nodes that terraform will use to setup the RavenDB cluster. | `list` | yes |\n| database - `optional` | The database name to check whether he is alive or not. It will create the given database if it doesn't exists | `string` | no |\n| cluster_setup_zip - `optional` | The cluster setup zip file that is used by RavenDB for setup secured cluster. | `string` | no |\n| license | The license file that will be used for the setup of the RavenDB cluster. | `filebase64` | yes |\n| package\u003cul\u003e\u003cli\u003eversion\u003c/li\u003e\u003cli\u003earch - `optional`\u003c/li\u003e\u003cli\u003eUbuntuVersion - `optional`\u003c/li\u003e\u003c/ul\u003e | Object that represents the version and the OS RavenDB will be running on. Supported architectures are: amd64, arm64 and arm32. Supported Ubuntu versions are: 18.04, 20.04, 22.04 | `set`\u003cul\u003e\u003cli\u003e`string`\u003c/li\u003e\u003cli\u003e`string`\u003c/li\u003e\u003cli\u003e`string`\u003c/li\u003e\u003c/ul\u003e | yes |\n| unsecured | Whatever to allow to run RavenDB in unsecured mode. This is ***NOT*** recommended! | `bool` | no | |\n| settings_override | Overriding the settings.json. | `map[string][string]` | no |\n| assets | Upload files to an absolute path. | `map[string][string]` | no |\n| url\u003cul\u003e\u003cli\u003elist\u003c/li\u003e\u003cli\u003ehttp_url - `optional`\u003c/li\u003e\u003cli\u003etcp_url - `optional`\u003c/li\u003e\u003c/ul\u003e | Object that represents the nodes. | `set`\u003cul\u003e\u003cli\u003e`List(string)`\u003c/li\u003e\u003cli\u003e`int`\u003c/li\u003e \u003c/li\u003e\u003cli\u003e`int`\u003c/li\u003e | yes |\n| databases - `optional`\u003cul\u003e\u003cli\u003edatabase\u003cul\u003e \u003cul\u003e \u003cli\u003ename\u003c/li\u003e \u003cli\u003ereplication_nodes\u003c/li\u003e \u003cli\u003eencryption_key\u003c/li\u003e \u003cli\u003esettings\u003c/li\u003e \u003cli\u003eindexes\u003c/li\u003e \u003cul\u003e\u003cli\u003eindex\u003c/li\u003e\u003cul\u003e \u003cli\u003eindex_name\u003c/li\u003e \u003cli\u003emaps\u003c/li\u003e \u003cli\u003ereduce\u003c/li\u003e \u003cli\u003econfiguration\u003c/li\u003e \u003c/ul\u003e\u003c/ul\u003e\u003c/ul\u003e\u003c/ul\u003e\u003c/ul\u003e | Object that represents creation of databases and indexes. | `set`\u003cul\u003e\u003cli\u003e`set` \u003cul\u003e\u003c/li\u003e\u003cli\u003e`string`\u003c/li\u003e\u003c/li\u003e\u003cli\u003e`list(string)`\u003c/li\u003e \u003cli\u003e`string`\u003c/li\u003e\u003cli\u003e`map(string)`\u003c/li\u003e\u003cul\u003e \u003cli\u003e`set`\u003c/li\u003e\u003cul\u003e\u003cli\u003e`set`\u003c/li\u003e \u003cul\u003e\u003cli\u003e`string`\u003c/li\u003e\u003cli\u003e`list(string)`\u003c/li\u003e\u003cli\u003e`string`\u003c/li\u003e\u003cli\u003e`map(string)`\u003c/li\u003e\u003c/ul\u003e\u003c/ul\u003e\u003c/ul\u003e\u003c/ul\u003e\u003c/ul\u003e | no |\n| databases_to_delete - `optional`\u003cul\u003e\u003cli\u003edatabase\u003cul\u003e \u003cul\u003e \u003cli\u003ename\u003c/li\u003e \u003cli\u003ehard_delete\u003c/li\u003e | Databases that will be hard/soft deleted. | `set`\u003cul\u003e\u003cli\u003e`set` \u003cul\u003e\u003c/li\u003e\u003cli\u003e`string`\u003c/li\u003e\u003c/li\u003e\u003cli\u003e`bool`\u003c/li\u003e\u003c/ul\u003e\u003c/ul\u003e | no |\n| indexes_to_delete - `optional`\u003cul\u003e\u003cli\u003eindex\u003cul\u003e \u003cul\u003e \u003cli\u003ename\u003c/li\u003e \u003cli\u003eindexes_names\u003c/li\u003e | Indexes that will be deleted on a given database. | `set`\u003cul\u003e\u003cli\u003e`set` \u003cul\u003e\u003c/li\u003e\u003cli\u003e`string`\u003c/li\u003e\u003c/li\u003e\u003cli\u003e`list(string)`\u003c/li\u003e\u003c/ul\u003e\u003c/ul\u003e | no |\n\n## Debug mode\n\nIn order to be able to see debug log you need to define `environment variables`.\n\nFor `powershell`\n\n```shell\n$env:TF_LOG=\"DEBUG\"\n$env:TF_LOG_PATH='d:/debug_log.txt'\n```\n\nFor `bash`\n\n```shell\nexport TF_LOG=DEBUG\nexport TF_LOG_PATH=d:/debug_log.txt\n```\n\n### Environment variables information\n\nhttps://www.terraform.io/docs/cli/config/environment-variables.html\n\n## Environment variables for running acceptances tests\n\n`powershell`\n\n```shell\n$env:TF_ACC=1\n```\n\n```bash\nexport TF_ACC=1\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravendb%2Fterraform-provider-ravendb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravendb%2Fterraform-provider-ravendb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravendb%2Fterraform-provider-ravendb/lists"}