terraform-provider-elephantsql

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

README

Terraform provider for ElephantSQL

Setup your ElephantSQL cluster with Terraform. Create your account at https://customer.elephantsql.com/ to get an API key.

Example

terraform {
  required_providers {
    elephantsql = {
      source = "elephantsql/elephantsql"
    }
  }
}

resource "elephantsql_instance" "sql_hippo" {
  name   = "terraform-provider-test"
  plan   = "hippo"
  region = "amazon-web-services::us-east-1"
}

output "psql_url" {
  sensitive = true
  value = elephantsql_instance.sql_hippo.url
}
export ELEPHANTSQL_APIKEY=<your-key>

terraform init

# Create the database instance
terraform apply -auto-approve

# View the database URL
terraform output -raw psql_url

Use from source

git clone https://github.com/ElephantSQL/terraform-provider-elephantsql.git
cd terraform-provider-elephantsql
make local-install

You can use dev_overrides to make Terraform use your local build:

# save as $HOME/elephantsql-provider-dev.tfrc
provider_installation {
  dev_overrides {
    "elephantsql/elephantsql" = "/home/foo/terraform-provider-elephantsql"
  }
}
TERRAFORM_CONFIG=$HOME/elephantsql-provider-dev.tfrc terraform apply -auto-approve

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