terraform-provider-oasis

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: MPL-2.0 Imports: 3 Imported by: 0

README

ArangoDB Oasis Terraform Provider

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
  ...
}

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