Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Terraform provider for Pure Cloud Block Store.

License

NotificationsYou must be signed in to change notification settings

PureStorage-OpenConnect/terraform-provider-cbs

Repository files navigation

Terraform Provider for Pure Storage Cloud Block Store deployments

Prerequisites

Tools

Install Go Modules

go mod download

Build and Install Provider

make

Note: The provider has only been tested on Linux and might not work on other platforms.

AWS Credentials

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

Azure Credentials

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"

Using the Provider

Provider Documentation

Example terraform configuration templates can be found in the examples/ subdirectory.

Testing

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/

Packages

No packages published

Contributors7


[8]ページ先頭

©2009-2025 Movatter.jp