Coder Social home page Coder Social logo

purestorage-openconnect / terraform-provider-fusion Goto Github PK

View Code? Open in Web Editor NEW
3.0 7.0 3.0 487 KB

Pure Storage Fusion Terraform Provider

License: Apache License 2.0

Makefile 0.02% Go 99.98%
automation fusion purestorage terraform terraform-provider

terraform-provider-fusion's Introduction

Terraform Provider for Pure Storage Fusion

GitHub tag (latest SemVer) License

The Terraform Provider for Fusion is a plugin for Terraform that allows you to interact with Fusion. Fusion is a Pure Storage product that allows you to provision, manage, and consume enterprise storage with the simple on-demand provisioning, with effortless scale, and self-management of the cloud. Read more about fusion here. This provider can be used to manage consumer oriented resources such as volumes, hosts, placement groups, tenant spaces.

Learn More:

Requirements

In order to access the fusion API, you will need the required credentials and configuration. Namely you will need the api_host, private_key_file, and issuer_id. These need to be specified in the provider block in your terraform configuration. Alternatively, these values can also be supplied using the environment variables: FUSION_API_HOST, FUSION_PRIVATE_KEY_FILE and FUSION_ISSUER_ID

Using the provider

It is highly reccomended that you use the pre-built providers. You should include a block in your terraform config like this:

terraform {
  required_providers {
    fusion = {
      source  = "PureStorage-OpenConnect/fusion"
      version = "1.0.0"
    }
  }
}

Then you should be able to just run terraform init and it should automatically install the right provider version. Please check out examples from the documentation Note: The version number specified here is not the most up-to-date version, please refer to the documentation for the latest version information.

Getting support

Please don't hesitate to reach out to Pure Storage Customer Support. If you are having trouble, please try to save and provide the terraform logs. You can get those logs by setting the TF_LOG/TF_LOG_PATH envionment variables, for example:

export TF_LOG=TRACE
export TF_LOG_PATH=/tmp/terraform-logs
terraform apply
<....>
gzip /tmp/terraform-log

Then the logs will be located at /tmp/terraform-log.gz

Developing on the provider

Unit tests can be run like normal go tests, for example:

go test ./... -v

โš ๏ธ Caution! Acceptance tests may wipe your data or delete Fusion infrastructure!

To run acceptance tests, you must have pre-created infrastructure:

  • Region
  • Availability Zone in this Region (All resources which depend on this AZ will be deleted)
  • At least one array in this Availability Zone

You also need to set environment variables.

  • FUSION_API_HOST=http://your-fusion-control-plane:8080 This needs to be set to your controlplane endpoint
  • FUSION_ISSUER_ID=pure1:apikey:abcdefghigjlkmnop Set this to your fusion issuer ID
  • FUSION_PRIVATE_KEY_FILE=/tmp/your-fusion-key.pem Set this to the path of your fusion private key file
  • FUSION_CONFIG=<path-to-your-fusion-config> Set this to the path of your fusion config file
  • TEST_EXISTING_REGION=<name-of-pre-created-az> Set this to to the pre-created region name. By default pure-us-west
  • TEST_EXISTING_AVAILABILITY_ZONE=<name-of-pre-created-az> Set this to the pre-created availability zone name. By default az1

Acceptance test can be run with go test using TF_ACC environment variable:

TF_ACC=1 go test ./... -v -timeout 0

terraform-provider-fusion's People

Contributors

ccannon424 avatar codyhosterman avatar mikenelson-io avatar pure-blim avatar pure-cye avatar pure-rrobertson avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.