Skip to content

cloud-ca/confoo-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Deployment with Terraform in cloud.ca

This deployment example will deploy :

  • A VPC
  • Two tiers, web (load balancing enabled) and data (standard).
  • The web tier will contain 3 load balanced instances
  • The data tier will contain 1 instance
  • A public IP address will be acquired to load balance the instances in the web tier
  • The tfstate.tf state file will be stored in swift to allow sharing within a team

Usage

  1. Install Terraform

  2. Retrive your API keys for your cloud.ca compute and object-storage environments, and export them to environment variables

    export TF_VAR_api_key=YOUR_CS_API_KEY
    export TF_VAR_secret_key=YOUR_CS_SECRET_KEY
    export OS_USERNAME=YOUR_SWIFT_USERNAME
    export OS_PASSWORD=YOUR_SWIFT_PASSWORD
    export OS_TENANT_NAME=YOUR_SWIFT_TENANT_NAME
    export OS_AUTH_URL=https://auth-qc.cloud.ca/v2.0
    
  3. Set terraform to use a container as remote backend.

    terraform remote config -backend=swift -backend-config="path=dev"
    

    By default, backend_container variable is set to dev. If you would like to use a different container, be sure to change it in the variables.tf file and modify the command above.

  4. View plan to deploy infrastructure

    terraform plan
    
  5. Deploy your infrastructure

    terraform apply
    

About

Demo code for the ConFoo presentation on Terraform and cloud.ca

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages