Skip to content

Terraform for Alibaba Cloud, Support ECS, Block Storage, SLB, VPC, Nat Gateway, RDS, ESS, OSS etc.

License

Notifications You must be signed in to change notification settings

autonomic-ai/terraform-provider

 
 

Repository files navigation

Alicloud (Alibaba Cloud) terraform provider

This is the official repository for the Alicloud terraform provider. Currently it supports terraform version ≥ v0.8.2.

If you are not planning to contribute to this repo, you can download the compiled binaries from https://github.com/alibaba/terraform-provider/releases and move the banaries (bin/terraform-provider-alicloud) into the folder under the Terraform PATH such as /usr/local/terraform.

Alternatively, the provider can be installed as described in the developer notes.
This way you will be able to sync the repo as active development is going on.

-> Note: When you use terraform on the Windowns computer, please install golang in your computer, otherwise, you will happened the issue from version 1.8.1 and the issue details can refer to Crash Error.

Example

Example modules can be found in the terraform/examples directory.

Developer notes

Setting up

cd $GOPATH
mkdir -p src/github.com/alibaba
cd $GOPATH/src/github.com/alibaba
git clone https://github.com/alibaba/terraform-provider.git

# switch to project
cd $GOPATH/src/github.com/alibaba/terraform-provider

# get all dependencies and install modules
go get ./...
glide up
sudo -E "PATH=$PATH" make all
terraform get

# set the creds
export ALICLOUD_ACCESS_KEY="***"
export ALICLOUD_SECRET_KEY="***"
export ALICLOUD_REGION="***"

# you're good to start rocking
# alicloud.tf contains the default example
terraform plan
# terraform apply
# terraform destroy

Regions

cn-qingdao
cn-beijing
cn-zhangjiakou
cn-huhehaote
cn-hangzhou
cn-shanghai
cn-shenzhen
cn-hongkong

ap-northeast-1
ap-southeast-1
ap-southeast-2
ap-southeast-3
ap-southeast-5
ap-south-1

us-east-1
us-west-1

me-east-1

eu-central-1

For more about the regions and availability zones, use data source alicloud_regions and alicloud_zones.

Support products

Documents

The latest supported product document as follows:

Common problems

Error configuring: 1 error(s) occurred:
* Incompatible API version with plugin. Plugin version: 2, Ours: 1

# fix by manually setting the branch in the sources
cd src/github.com/hashicorp/terraform/
git checkout v<YOUR_TF_VERSION_HERE>
cd -

# rebuild
sudo -E "PATH=$PATH" make all

How to contribute code

  • If you are not sure or have any doubts, feel free to ask and/or submit an issue or PR. We appreciate all contributions and don't want to create artificial obstacles that get in the way.
  • Contributions are welcome and will be merged via PRs.

Contributors

License

  • This project is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Reference

About

Terraform for Alibaba Cloud, Support ECS, Block Storage, SLB, VPC, Nat Gateway, RDS, ESS, OSS etc.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 97.7%
  • HTML 2.0%
  • Other 0.3%