https://github.com/volcengine/terraform-provider-volcengine
https://github.com/volcengine/terraform-provider-volcengine
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/volcengine/terraform-provider-volcengine
- Owner: volcengine
- License: mpl-2.0
- Created: 2022-06-30T11:24:26.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2026-02-27T08:08:51.000Z (4 months ago)
- Last Synced: 2026-02-27T13:53:54.650Z (4 months ago)
- Language: Go
- Size: 6.07 MB
- Stars: 34
- Watchers: 5
- Forks: 11
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-provider-volcengine
Terraform Provider
==================
- Website: https://www.terraform.io
- [](https://gitter.im/hashicorp-terraform/Lobby)
- Mailing list: [Google Groups](http://groups.google.com/group/terraform-tool)
Requirements
------------
- [Terraform](https://www.terraform.io/downloads.html) 0.12.x
- [Go](https://golang.org/doc/install) 1.13 (to build the provider plugin)
# Volcengine Provider
The Volcengine provider is used to interact with many resources supported by [Volcengine](https://www.volcengine.com/).
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 Volcengine account or sub-account with project to create resources.
## Example Usage
```hcl
# Configure the Volcengine Provider
provider "volcengine" {
access_key = "your ak"
secret_key = "your sk"
session_token = "sts token"
region = "cn-beijing"
}
# Query Vpc
data "volcengine_vpcs" "default"{
ids = ["vpc-mizl7m1kqccg5smt1bdpijuj"]
}
#Create vpc
resource "volcengine_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 Volcengine 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
volcengine provider block:
Usage:
```hcl
provider "volcengine" {
access_key = "your ak"
secret_key = "your sk"
region = "cn-beijing"
}
```
### Environment variables
You can provide your credentials via `VOLCENGINE_ACCESS_KEY` and `VOLCENGINE_SECRET_KEY`
environment variables, representing your volcengine public key and private key respectively.
`VOLCENGINE_REGION` is also used, if applicable:
```hcl
provider "volcengine" {
}
```
Usage:
```
$ export VOLCENGINE_ACCESS_KEY="your_public_key"
$ export VOLCENGINE_SECRET_KEY="your_private_key"
$ export VOLCENGINE_REGION="cn-beijing"
$ terraform plan
```
## Manual Install Volcengine Provider
You can use the script [manual_install_tf.sh](manual_install_tf.sh) to manually install the required version of terraform-provider-volcengine.
This script is only for linux. ( windows will support later )
Prerequisite: you must install terraform, wget, xattr at first.
```
$ ./manual_intall_tf.sh --version YourVersion --provider /YourPath/ProviderFile.zip
```
Usage:
```
options:
-h, --help show help
-v, --version [required] specify the version of the terraform-provider-volcengine
-p, --provider [optional] specify the local path of the provider zip file, if no value is specified, the file will be downloaded from github by default
-a, --arch [optional] specify the architecture, if no value is specified, the default value is amd64
```