Skip to content

Instantly share code, notes, and snippets.

@kiranchavala
Created May 31, 2021 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiranchavala/ce250d57b49ab1e8112ee0abdc64ff1c to your computer and use it in GitHub Desktop.
Save kiranchavala/ce250d57b49ab1e8112ee0abdc64ff1c to your computer and use it in GitHub Desktop.
Terrraform cloudstack integration
#create directory
#mkdir -p terraformcloudstack
#tocuh main.tf
terraform {
required_providers {
cloudstack = {
source = "localdomain/provider/cloudstack"
version = "0.3.0"
}
}
}
provider "cloudstack" {
api_url = "http://10.207.253.10:8080/client/api"
api_key = "m9Sp_8ZQW2OvL3dEH-2uzE6YMqveh_tghys3kdBFEvYwWNtD9jgwkXM4gkuQiQJYSa4TAOmIXAb8yXQAHcYYMw"
secret_key = "eQYXq5vzwoEoi_iSv9KYScnanEZA16neF7RmhOfSpHIQT1HZlRbIDmcpueZyCWF-P2g665HclYBGi82SrIx1uQ"
}
resource "cloudstack_instance" "terraforminstance" {
service_offering="63b906fa-6ae3-40dd-9af9-ec6ae09910d2"
template="83f134e1-9d1e-11eb-a8e7-1e00f200001d"
zone="8b340ea8-eb7b-4b56-9629-319f152d7ecb"
network_id="f8324a78-1ba3-42b9-96d8-1bf907cbaaef"
display_name="teraform"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment