This project uses the terraform-provider-ibm plugin to interact with IBM Cloud. The docker image provided is running the following versions:
- Terraform 0.12
- Go 1.12
- IBM Cloud Provider v1.8.0
- You need to have an account to the IBM Cloud and can create resources. This usually mean your account is upgraded to internal plan or equivalent.
- You need to have Docker and docker-compose installed on the machine that will be running Terraform. Docker Docker-compose
- You have generated SSH keys in
~/.ssh/
directory. It is required that you generate a new key to be used with Terraform as IBM Cloud will return error if your public key is already registered in the cloud.
N.B. It is recommended that you generate a new SSH key that is not passphrase-protected as the current implementation does not handle passphrase for SSH connections.
- Clone this repository.
$ git clone git@github.com:nqdao/ibmcloud-terraform-demo.git
- Run docker-compose to launch deployer docker container.
$ docker-compose run --rm deployer
- Once inside the docker container (bash shell prompt is shown
bash-4.4#
), initialize Terraform workspace.
$ terraform init
- It is recommended that you make a copy of
terraform.tfvars.example
and name itterraform.tfvars
to override the default values to be specific to your environment and credential.
You are now ready to use Terraform.