2.0 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
azure | Provider: Azure | docs-azure-index | The Azure provider is used to interact with the many resources supported by Azure. The provider needs to be configured with a publish settings file and optionally a subscription ID before it can be used. |
Azure Provider
The Azure provider is used to interact with the many resources supported by Azure. The provider needs to be configured with a publish settings file and optionally a subscription ID before it can be used.
Use the navigation to the left to read about the available resources.
Example Usage
# Configure the Azure Provider
provider "azure" {
settings_file = "${file("credentials.publishsettings")}"
}
# Create a web server
resource "azure_instance" "web" {
...
}
Argument Reference
The following arguments are supported:
-
settings_file
- (Required) Contents of a validpublishsettings
file, used to authenticate with the Azure API. You can download the settings file here: https://manage.windowsazure.com/publishsettings. You must either provide (or source from theAZURE_SETTINGS_FILE
environment variable) a settings file or both asubscription_id
andcertificate
. -
subscription_id
- (Optional) The subscription ID to use. If asettings_file
is not providedsubscription_id
is required. It can also be sourced from theAZURE_SUBSCRIPTION_ID
environment variable. -
certificate
- (Optional) The certificate used to authenticate with the Azure API. If asettings_file
is not providedcertificate
is required. It can also be sourced from theAZURE_CERTIFICATE
environment variable.
Testing:
The following environment variables must be set for the running of the acceptance test suite:
-
A valid combination of the above which are required for authentification.
-
AZURE_STORAGE
- The name of a storage account to be used in tests which require a storage backend. The storage account needs to be located in the Western US Azure region.