terraform-provider-oxide

command module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

README

Terraform Provider Oxide

Requirements

  • Terraform 1.x and above, we recommend using the latest stable release whenever possible. When installing on an Illumos machine use the Solaris binary.

Using the provider

As a preferred method of authentication, export the OXIDE_HOST and OXIDE_TOKEN environment variables with their corresponding values.

Alternatively, it is possible to authenticate via the optional host and token arguments. In most cases this method of authentication is not recommended. It is generally preferable to keep credential information out of the configuration.

To generate a token, follow these steps:

  • Make sure you have installed the Oxide CLI
  • Log in via the Oxide console.
  • Run oxide auth login --host <host>
  • Retrieve the token associated with the host from $HOME/.config/oxide/credentials.toml.
Example
terraform {
  required_version = ">= 1.0"

  required_providers {
    oxide = {
      source  = "oxidecomputer/oxide"
      version = "0.7.0"
    }
  }
}

provider "oxide" {
  # The provider will default to use $OXIDE_HOST and $OXIDE_TOKEN.
  # If necessary they can be set explicitly (not recommended).
  # host = "<host address>"
  # token = "<token value>"
}

# Create a blank disk
resource "oxide_disk" "example" {
  project_id  = "c1dee930-a8e4-11ed-afa1-0242ac120002"
  description = "a test disk"
  name        = "mydisk"
  size        = 1073741824
  block_size  = 512
}

There are several examples in the examples/ directory.

Development guides and contributing information

Read CONTRIBUTING.md to learn more.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL