|
| 1 | +# CloudStack Provider |
| 2 | + |
| 3 | +The CloudStack provider is used to interact with the many resources |
| 4 | +supported by CloudStack. The provider needs to be configured with a |
| 5 | +URL pointing to a running CloudStack API and the proper credentials |
| 6 | +before it can be used. |
| 7 | + |
| 8 | +In order to provide the required configuration options you can either |
| 9 | +supply values for the `api_url`, `api_key` and `secret_key` fields, or |
| 10 | +for the `config` and `profile` fields. A combination of both is not |
| 11 | +allowed and will not work. |
| 12 | + |
| 13 | +Use the navigation to the left to read about the available resources. |
| 14 | + |
| 15 | +## Example Usage |
| 16 | + |
| 17 | +```hcl |
| 18 | +# Configure the CloudStack Provider |
| 19 | +provider "cloudstack" { |
| 20 | + api_url = "${var.cloudstack_api_url}" |
| 21 | + api_key = "${var.cloudstack_api_key}" |
| 22 | + secret_key = "${var.cloudstack_secret_key}" |
| 23 | +} |
| 24 | +
|
| 25 | +# Create a web server |
| 26 | +resource "cloudstack_instance" "web" { |
| 27 | + # ... |
| 28 | +} |
| 29 | +``` |
| 30 | + |
| 31 | +## Argument Reference |
| 32 | + |
| 33 | +The following arguments are supported: |
| 34 | + |
| 35 | +* `api_url` - (Optional) This is the CloudStack API URL. It can also be sourced |
| 36 | + from the `CLOUDSTACK_API_URL` environment variable. |
| 37 | + |
| 38 | +* `api_key` - (Optional) This is the CloudStack API key. It can also be sourced |
| 39 | + from the `CLOUDSTACK_API_KEY` environment variable. |
| 40 | + |
| 41 | +* `secret_key` - (Optional) This is the CloudStack secret key. It can also be |
| 42 | + sourced from the `CLOUDSTACK_SECRET_KEY` environment variable. |
| 43 | + |
| 44 | +* `config` - (Optional) The path to a `CloudMonkey` config file. If set the API |
| 45 | + URL, key and secret will be retrieved from this file. |
| 46 | + |
| 47 | +* `profile` - (Optional) Used together with the `config` option. Specifies which |
| 48 | + `CloudMonkey` profile in the config file to use. |
| 49 | + |
| 50 | +* `http_get_only` - (Optional) Some cloud providers only allow HTTP GET calls to |
| 51 | + their CloudStack API. If using such a provider, you need to set this to `true` |
| 52 | + in order for the provider to only make GET calls and no POST calls. It can also |
| 53 | + be sourced from the `CLOUDSTACK_HTTP_GET_ONLY` environment variable. |
| 54 | + |
| 55 | +* `timeout` - (Optional) A value in seconds. This is the time allowed for Cloudstack |
| 56 | + to complete each asynchronous job triggered. If unset, this can be sourced from the |
| 57 | + `CLOUDSTACK_TIMEOUT` environment variable. Otherwise, this will default to 300 |
| 58 | + seconds. |
| 59 | + |
| 60 | +## Data Sources |
| 61 | + |
| 62 | +- [instance](./d/instance.html.markdown) |
| 63 | +- [ipaddress](./d/ipaddress.html.markdown) |
| 64 | +- [network_offering](./d/network_offering.html.markdown) |
| 65 | +- [service_offering](./d/service_offering.html.markdown) |
| 66 | +- [ssh_keypair](./d/ssh_keypair.html.markdown) |
| 67 | +- [template](./d/template.html.markdown) |
| 68 | +- [user](./d/user.html.markdown) |
| 69 | +- [volume](./d/volume.html.markdown) |
| 70 | +- [vpc](./d/vpc.html.markdown) |
| 71 | +- [vpn_connection](./d/vpn_connection.html.markdown) |
| 72 | +- [zone](./d/zone.html.markdown) |
| 73 | +## Resources |
| 74 | + |
| 75 | +- [account](./r/account.html.markdown) |
| 76 | +- [affinity_group](./r/affinity_group.html.markdown) |
| 77 | +- [autoscale_vm_profile](./r/autoscale_vm_profile.html.markdown) |
| 78 | +- [disk](./r/disk.html.markdown) |
| 79 | +- [disk_offering](./r/disk_offering.html.markdown) |
| 80 | +- [domain](./r/domain.html.markdown) |
| 81 | +- [egress_firewall](./r/egress_firewall.html.markdown) |
| 82 | +- [firewall](./r/firewall.html.markdown) |
| 83 | +- [instance](./r/instance.html.markdown) |
| 84 | +- [ipaddress](./r/ipaddress.html.markdown) |
| 85 | +- [kubernetes_cluster](./r/kubernetes_cluster.html.markdown) |
| 86 | +- [kubernetes_version](./r/kubernetes_version.html.markdown) |
| 87 | +- [loadbalancer_rule](./r/loadbalancer_rule.html.markdown) |
| 88 | +- [network](./r/network.html.markdown) |
| 89 | +- [network_acl](./r/network_acl.html.markdown) |
| 90 | +- [network_acl_rule](./r/network_acl_rule.html.markdown) |
| 91 | +- [network_offering](./r/network_offering.html.markdown) |
| 92 | +- [nic](./r/nic.html.markdown) |
| 93 | +- [port_forward](./r/port_forward.html.markdown) |
| 94 | +- [private_gateway](./r/private_gateway.html.markdown) |
| 95 | +- [secondary_ipaddress](./r/secondary_ipaddress.html.markdown) |
| 96 | +- [security_group](./r/security_group.html.markdown) |
| 97 | +- [security_group_rule](./r/security_group_rule.html.markdown) |
| 98 | +- [service_offering](./r/service_offering.html.markdown) |
| 99 | +- [ssh_keypair](./r/ssh_keypair.html.markdown) |
| 100 | +- [static_nat](./r/static_nat.html.markdown) |
| 101 | +- [static_route](./r/static_route.html.markdown) |
| 102 | +- [template](./r/template.html.markdown) |
| 103 | +- [user](./r/user.html.markdown) |
| 104 | +- [volume](./r/volume.html.markdown) |
| 105 | +- [vpc](./r/vpc.html.markdown) |
| 106 | +- [vpn_connection](./r/vpn_connection.html.markdown) |
| 107 | +- [vpn_customer_gateway](./r/vpn_customer_gateway.html.markdown) |
| 108 | +- [vpn_gateway](./r/vpn_gateway.html.markdown) |
| 109 | +- [zone](./r/zone.html.markdown) |
0 commit comments