All Projects → squat → Terraform Provider Vultr

squat / Terraform Provider Vultr

Licence: mpl-2.0
Terraform Vultr Provider

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Terraform Provider Vultr

Terraform Provider Zerotier
Create, modify and destroy ZeroTier networks and members through Terraform.
Stars: ✭ 113 (-34.3%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Google Beta
Terraform Google Cloud Platform Beta provider
Stars: ✭ 123 (-28.49%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Databricks
Databricks Terraform Provider
Stars: ✭ 119 (-30.81%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Linode
Terraform Linode provider
Stars: ✭ 105 (-38.95%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Scaffolding
Quick start repository for creating a Terraform provider
Stars: ✭ 129 (-25%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Pagerduty
Terraform PagerDuty provider
Stars: ✭ 106 (-38.37%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Grafana
Terraform Grafana provider
Stars: ✭ 118 (-31.4%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Google
Terraform Google Cloud Platform provider
Stars: ✭ 1,318 (+666.28%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Docker
As part of our introduction to self-service publishing in the Terraform Registry, this copy of the provider has been archived, and ownership has been transferred to active maintainers in the community. Please see the new location on the Terraform Registry: https://registry.terraform.io/providers/kreuzwerker/docker/latest
Stars: ✭ 131 (-23.84%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Rancher2
Terraform Rancher2 provider
Stars: ✭ 129 (-25%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Postgresql
As part of our introduction to self-service publishing in the Terraform Registry, this copy of the provider has been archived, and ownership has been transferred to active maintainers in the community. Please see the new location on the Terraform Registry: https://registry.terraform.io/providers/cyrilgdn/postgresql
Stars: ✭ 101 (-41.28%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Shell
Terraform provider for executing shell commands and saving output to state file
Stars: ✭ 172 (+0%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Namecheap
Terraform provider for Namecheap
Stars: ✭ 101 (-41.28%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Okta
🎉 Now an official Terraform provider! 🚚 We've moved to https://github.com/terraform-providers/terraform-provider-okta/
Stars: ✭ 111 (-35.47%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Matchbox
Terraform provider for Matchbox on-premise / bare-metal provisioning
Stars: ✭ 100 (-41.86%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Template
Terraform template provider
Stars: ✭ 119 (-30.81%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Tencentcloud
Terraform TencentCloud Provider
Stars: ✭ 85 (-50.58%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Tls
Provides utilities for working with Transport Layer Security keys and certificates. It provides resources that allow private keys, certificates and certficate requests to be created as part of a Terraform deployment.
Stars: ✭ 88 (-48.84%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Mongodbatlas
Terraform provider for MongoDB Atlas
Stars: ✭ 126 (-26.74%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Stripe
A Terraform Provider for Stripe
Stars: ✭ 143 (-16.86%)
Mutual labels:  terraform, terraform-provider

Vultr Terraform Provider

This is a Terraform provider for Vultr. Find out more about Vultr.

Build Status Go Report Card

Requirements

  • A Vultr account and API key
  • Terraform 0.12+
  • Go 1.8 (to build the provider plugin)

Usage

Download terraform-provider-vultr from the releases page and follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.

Note: in order to build and install the provider from the latest commit on master, run:

go get -u github.com/squat/terraform-provider-vultr

and then register the plugin by symlinking the binary to the third-party plugins directory:

mkdir -p ~/.terraform.d/plugins
ln -s "$GOPATH/bin/terraform-provider-vultr" ~/.terraform.d/plugins/terraform-provider-vultr

Set an environment variable containing the Vultr API key:

export VULTR_API_KEY=<your-vultr-api-key>

Note: as an alternative, the API key can be specified in configuration as shown below.

Examples

// Configure the Vultr provider. 
// Alternatively, export the API key as an environment variable: `export VULTR_API_KEY=<your-vultr-api-key>`.
provider "vultr" {
  api_key = "<your-vultr-api-key>"
}

// Find the ID of the Silicon Valley region.
data "vultr_region" "silicon_valley" {
  filter {
    name   = "name"
    values = ["Silicon Valley"]
  }
}

// Find the ID for CoreOS Container Linux.
data "vultr_os" "container_linux" {
  filter {
    name   = "family"
    values = ["coreos"]
  }
}

// Find the ID for a starter plan.
data "vultr_plan" "starter" {
  filter {
    name   = "price_per_month"
    values = ["5.00"]
  }

  filter {
    name   = "ram"
    values = ["1024"]
  }
}

// Find the ID of an existing SSH key.
data "vultr_ssh_key" "squat" {
  filter {
    name   = "name"
    values = ["squat"]
  }
}

// Create a Vultr virtual machine.
resource "vultr_instance" "example" {
  name              = "example"
  region_id         = "${data.vultr_region.silicon_valley.id}"
  plan_id           = "${data.vultr_plan.starter.id}"
  os_id             = "${data.vultr_os.container_linux.id}"
  ssh_key_ids       = ["${data.vultr_ssh_key.squat.id}"]
  hostname          = "example"
  tag               = "container-linux"
  firewall_group_id = "${vultr_firewall_group.example.id}"
}

// Create a new firewall group.
resource "vultr_firewall_group" "example" {
  description = "example group"
}

// Add a firewall rule to the group allowing SSH access.
resource "vultr_firewall_rule" "ssh" {
  firewall_group_id = "${vultr_firewall_group.example.id}"
  cidr_block        = "0.0.0.0/0"
  protocol          = "tcp"
  from_port         = 22
  to_port           = 22
}

Development

To develop the plugin locally, install the following dependencies:

  • Go 1.8 (to build the provider plugin)
  • Glide (to install and maintain dependencies)
  • glide-vc (to clean up dependencies)

To build the plugin run:

make build

To update Go dependencies run:

make vendor
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].