- Notifications
You must be signed in to change notification settings - Fork3
Terraform provider for Pure Cloud Block Store.
License
PureStorage-OpenConnect/terraform-provider-cbs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Terraform Provider for Pure Storage Cloud Block Store deployments
- Install Terraform 0.13 (or higher) from:https://terraform.io
- Install Golang from:https://golang.org/dl
go mod download
make
Note: The provider has only been tested on Linux and might not work on other platforms.
The provider is built using AWS SDK for Go, and will require the AWS credentials configuredin the sytem. for more information about setting up the SDK, refer to this page:https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html
The provider can be authenticated to Azure using either the Azure CLI or an Azure Service Principal. For Azure CLI,Terraform only supports authenticating using theaz CLI (and this must be available on your PATH). Authenticatingusing the olderazure CLI or PowerShell Cmdlets are not supported.Login to the Azure CLI:
az login
And list the Subscriptions associated with the account:
az account list
You can specify the Subscription to be default if you have more than one Subscription:
az accountset --subscription="SUBSCRIPTION_ID"
Terraform can be authenticated with a Service Principal in the provider configuration:
provider"cbs" {azure {client_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"client_secret="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"tenant_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }}
Alternatively, those values can also be supplied to the provider through the following environment variables:
export ARM_CLIENT_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"export ARM_CLIENT_SECRET="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"export ARM_SUBSCRIPTION_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"export ARM_TENANT_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Example terraform configuration templates can be found in the examples/ subdirectory.
To run acceptance tests, a JSON config file must be specified to supply the input parameters tothe test CBS instances. An example config file for AWS can be found attesting/example_aws_config.The config file is passed to the test using theTEST_ACC_AWS_PARAMS_PATH environment variable.An example config file for Azure can be found attesting/example_azure_config.The config file is passed to the test using theTEST_ACC_AZURE_PARAMS_PATH environment variable.
Acceptance tests can be run withmake testacc:
export TEST_ACC_AWS_PARAMS_PATH=<path to config file>export TEST_ACC_AZURE_PARAMS_PATH=<path to config file>make testacc
By default, test resources are created in theus-west-2 AWS region. TheAWS_TEST_REGIONcan be used to specify an alternate region.
Note: Running acceptance tests requires a valid Cloud Block Store license and will createactual CBS instances. CBS and AWS billing costs will apply.
For assistance, please either open GitHub issues or go to the Pure Code() Slack channel here:
#terraformhttps://code-purestorage.slack.com/archives/CFYKBGNMP
Self-register for our Slack team athttps://codeinvite.purestorage.com/
About
Terraform provider for Pure Cloud Block Store.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.