Maintainers
This provider plugin is maintained by the team at ArangoDB.
Requirements
- Terraform 0.10.x
- Go 1.11 (to build the provider plugin)
Usage
TODOs:
Explain how to:
- Create/Retrieve API Key
- Retrieve relevant ids (org, project, provider, ca_certificate, ip_whitelist)
provider "oasis" {
api_key_id = "xx"
api_key_secret = "xxx"
organization = "190765105"
project = "foo"
}
// Example of oneshard deployment
resource "oasis_deployment" "my_oneshard_deployment" {
project = "190765139" // If set here, overrides project in provider
location {
region = "gcp-europe-west4" // Required
}
version {
db_version = "3.6.0" // Required
}
security { // this section is optional
ca_certificate = "" // If not set, uses default certificate from project
ip_whitelist = "" // If not set, no whitelist is configured
}
configuration {
model = "oneshard"
node_size_id = "a4"
node_disk_size = 20
}
}
// Example of oneshard deployment without node specification
resource "oasis_deployment" "my_oneshard_deployment" {
project = "190765139" // If set here, overrides project in provider
location {
region = "gcp-europe-west4" // Required
}
version {
db_version = "3.6.0" // Required
}
security { // this section is optional
ca_certificate = "" // If not set, uses default certificate from project
ip_whitelist = "" // If not set, no whitelist is configured
}
configuration {
model = "oneshard" // the smallest will be selected that's available in the given region
}
}
// Example of a sharded deployment
resource "oasis_deployment" "my_sharded_deployment" {
project = "190765139" // If set here, overrides project in provider
location {
region = "gcp-eu-west4" // Required
}
version {
db_version = "3.6.0" // Required
}
security { // this section is optional
ca_certificate = "" // If not set, uses default certificate from project
ip_whitelist = "" // If not set, no whitelist is configured
}
configuration {
model = "sharded"
node_size_id = "a4"
node_disk_size = 20
num_nodes = 5
}
}
Organization Data Source
To define and use an organization as data source, consider the following terraform configuration:
data "oasis_organization" "my_organization" {
name = "MyOrganization"
id = "123456789"
}
resource "oasis_deployment" "my_flexible_deployment" {
organization = data.oasis_organization.my_organization.id
...
}