wangyuelucky / terraform-alicloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aliyun (Alibaba Cloud) terraform provider

This is the official repository for the Aliyun terraform provider. Currently it is under active development and must be installed as described in the developer notes.

Sample modules

Sample modules can be found in the terraform/alicloud directory.

instance

  • vpc module will create a cluster of machines in a VPC with security groups.

instance

  • slb module will create an SLB with ECS instances.

instance

Developer notes

Setting up

cd $GOPATH
mkdir -p src/github.com/alibaba
git clone git@github.com:alibaba/terraform-alicloud.git 
mv terraform-alicloud src/github.com/alibaba

# switch to project
cd src/github.com/alibaba/terraform-alicloud

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

# set the creds
cat > my.tfvars <<EOF
ali_access_key = "YOUR_KEY"
ali_secret_key = "YOUR_SECRET"
EOF

# you're good to start rocking
# alicloud.tf contains some samples
terraform plan
# terraform apply
# terraform destroy

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

  • 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

License:Apache License 2.0


Languages

Language:Go 82.6%Language:HCL 17.2%Language:Makefile 0.2%