» Yandex.Cloud Provider
The Yandex.Cloud provider is used to interact with Yandex.Cloud services. The provider needs to be configured with the proper credentials before it can be used.
Use the navigation to the left to read about the available resources.
» Example Usage
// Configure the Yandex.Cloud provider
provider "yandex" {
token = "auth_token_here"
service_account_key_file = "path_to_service_account_key_file"
cloud_id = "cloud_id_here"
folder_id = "folder_id_here"
zone = "ru-central1-a"
}
// Create a new instance
resource "yandex_compute_instance" "default" {
...
}
» Configuration Reference
The following keys can be used to configure the provider.
token
- (Optional) Security token used for authentication in Yandex.Cloud.
This can also be specified using environment variable YC_TOKEN
.
service_account_key_file
- (Optional) Path to file that contains service account key data.
This can also be specified using environment variable YC_SERVICE_ACCOUNT_KEY_FILE
.
You can read how to create service account key file here.
NOTE: Only one of token
or service_account_key_file
can be specified.
NOTE: One can authenticate via instance service account from inside a compute instance. In order to use this method, omit both token
/service_account_key_file
and attach service account to the instance.
Working with Yandex.Cloud from inside an instance
This can also be specified using environment variable YC_CLOUD_ID
.
This can also be specified using environment variable YC_FOLDER_ID
.
zone
- (Optional) The default availability zone to operate under, if not specified by a given resource.
This can also be specified using environment variable YC_ZONE
.
max_retries
- (Optional) This is the maximum number of times an API call is retried, in the case where requests
are being throttled or experiencing transient failures. The delay between the subsequent API calls increases exponentially.
storage_access_key
- (Optional) Yandex.Cloud storage service access key, which is used when a storage data/resource doesn't have an access key explicitly specified.
This can also be specified using environment variable YC_STORAGE_ACCESS_KEY
.
storage_secret_key
- (Optional) Yandex.Cloud storage service secret key, which is used when a storage data/resource doesn't have a secret key explicitly specified.
This can also be specified using environment variable YC_STORAGE_SECRET_KEY
.