目录

terraform-provider-vestack

Terraform Provider

Requirements

  • Terraform 0.12.x
  • Go 1.13 (to build the provider plugin)

Vestack Provider

The Vestack provider is used to interact with many resources supported by Vestack. The provider needs to be configured with the proper credentials before it can be used.

Use the navigation on the left to read about the available resources.

-> Note: This guide requires an available Vestack account or sub-account with project to create resources.

Example Usage

# Configure the Vestack Provider
provider "vestack" {
  access_key = "your ak"
  secret_key = "your sk"
  session_token = "sts token"
  region = "cn-beijing"
}

# Query Vpc
data "vestack_vpcs" "default"{
  ids = ["vpc-mizl7m1kqccg5smt1bdpijuj"]
}

#Create vpc
resource "vestack_vpc" "foo" {
  vpc_name = "tf-test-1"
  cidr_block = "172.16.0.0/16"
  dns_servers = ["8.8.8.8","114.114.114.114"]
}

Authentication

The Vestack provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:

  • Static credentials
  • Environment variables

Static credentials

Static credentials can be provided by adding an public_key and private_key in-line in the vestack provider block:

Usage:

provider "vestack" {
   access_key = "your ak"
   secret_key = "your sk"
   region = "cn-beijing"
}

Environment variables

You can provide your credentials via VESTACK_ACCESS_KEY and VESTACK_SECRET_KEY environment variables, representing your vestack public key and private key respectively. VESTACK_REGION is also used, if applicable:

provider "vestack" {
  
}

Usage:

$ export VESTACK_ACCESS_KEY="your_public_key"
$ export VESTACK_SECRET_KEY="your_private_key"
$ export VESTACK_REGION="cn-beijing"
$ terraform plan

Security and privacy

This project takes security seriously. For vulnerability reporting and supported versions, see SECURITY.md

关于
18.0 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号