Coder Social home page Coder Social logo

coderall / terraform-provider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alibaba/terraform-provider

0.0 1.0 0.0 55.5 MB

[DEPRECATED] This repo has been deprecated and please access https://github.com/terraform-providers/terraform-provider-alicloud

License: Apache License 2.0

Makefile 0.08% HCL 0.04% Go 98.00% Shell 0.06% HTML 1.82%

terraform-provider's Introduction

[NOTES]: This repo has been deprecated and please refer to the latest repo: https://github.com/terraform-providers/terraform-provider-alicloud

Alicloud (Alibaba Cloud) Terraform provider

This is the official repository of the Alicloud Terraform provider. It currently 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 binaries (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 a Windows computer, please install golang first, otherwise you might get this issue (the bug appeared in the version 1.8.1 and was fixed in the version 1.11.0).

Example

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

Developer notes

Setting up

mkdir -p $GOPATH/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

# build provider

## Mac
make dev
## Linux
make devlinux
## Windows
make devwin

# install modules
terraform get

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

# 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 information about the regions and availability zones, please use the data sources alicloud_regions and alicloud_zones.

Supported products

Documents

The most recent documentation is available here:

Acceptance Testing

Before making a release, the resources and data sources are tested automatically with acceptance tests (the tests are located in the alicloud/*_test.go files). You can run them by entering the following instructions in a terminal:

cd $GOPATH/src/github.com/alibaba/terraform-provider
export ALICLOUD_ACCESS_KEY=xxx
export ALICLOUD_SECRET_KEY=xxx
export ALICLOUD_REGION=xxx
export ALICLOUD_ACCOUNT_ID=xxx
export outfile=gotest.out
TF_ACC=1 TF_LOG=INFO go test ./alicloud -v -run=TestAccAlicloud -timeout=1440m | tee $outfile
go2xunit -input $outfile -output $GOPATH/tests.xml

-> Note: The last line is optional, it allows to convert test results into a XML format compatible with xUnit.

Because some features are not available in all regions, the following environment variables can be set in order to skip tests that use these features:

  • ALICLOUD_SKIP_TESTS_FOR_SLB_SPECIFICATION=true - Server Load Balancer with guaranteed performance specifications (old implementation has only shared performance)
  • ALICLOUD_SKIP_TESTS_FOR_SLB_PAY_BY_BANDWIDTH=true - Server Load Balancer with a "pay by bandwidth" billing method (mostly available in China)
  • ALICLOUD_SKIP_TESTS_FOR_FUNCTION_COMPUTE=true - Function Compute
  • ALICLOUD_SKIP_TESTS_FOR_PVTZ_ZONE=true - Private Zone
  • ALICLOUD_SKIP_TESTS_FOR_RDS_MULTIAZ=true - Apsara RDS with multiple availability zones
  • ALICLOUD_SKIP_TESTS_FOR_CLASSIC_NETWORK=true - Classic network configuration

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

  • If you are not sure or have any doubt, feel free to ask and/or submit an issue or PR. We appreciate all contributions and try to make the process as smooth as possible.
  • 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

terraform-provider's People

Contributors

arafato avatar demonwy avatar heww avatar kuien avatar marcplouhinec avatar mosuke5 avatar otarabai avatar paolomainardi avatar shuwei-yin avatar super468 avatar talentning avatar timorunge avatar vasi-grigo avatar wangyuelucky avatar wgliang avatar xiaozhu36 avatar zhaojie-xu avatar zhuzhih2017 avatar zzxwill avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.