Аутентификация Selectel-провайдера
Use the Selectel provider to manage Selectel products.
To manage resources available via OpenStack API, use OpenStack Terraform provider.
Example Usage
terraform {
required_providers {
selectel = {
source = "selectel/selectel"
version = "~> 6.0.0"
}
}
}
# Create a project
resource "selectel_vpc_project_v2" "project_1" {
...
}
Authentication (6.0.0 and later)
# Configure the Selectel provider
provider "selectel" {
domain_name = "123456"
username = "user"
password = "password"
auth_region = "pool"
auth_url = "https://cloud.api.selcloud.ru/identity/v3/"
}
Argument Reference (6.0.0 and later)
-
domain_name
— (Required) Selectel account ID. The account ID is in the top right corner of the Control panel. For import, use the value in theOS_DOMAIN_NAME
environment variable. Learn more about Registration. -
username
— (Required) Name of the service user. To get the name, in the Control panel, go to Identity & Access Management ⟶ User management ⟶ the Service users tab ⟶ copy the name of the required user. For import, use the value in theOS_USERNAME
environment variable. Learn more about Service users and how to create a service user. -
password
— (Required, Sensitive) Password of the service user. For import, use the value in theOS_PASSWORD
environment variable. -
auth_url
- (Required) Keystone Identity authentication URL for authentication via user credentials. For import, use the value in theOS_AUTH_URL
environment variable. -
auth_region
— (Required) Pool where the endpoint for Keystone API and Resell API is located. For import, use the value in theOS_REGION_NAME
environment variable. Learn more about available pools in the Availability matrix. -
user_domain_name
— (Optional) Selectel account ID. Use only for users that were created and assigned a role in a different account. Applicable only to public cloud. The account ID is in the top right corner of the Control panel. For import, use the value in theOS_USER_DOMAIN_NAME
environment variable. -
project_id
— (Optional) Unique identifier of the project. Use only to import resources that are associated with the specific project. To get the ID, in the Control panel, go to the product section in the navigation menu ⟶ project name ⟶ copy the ID of the required project. As an alternative, you can retrieve project ID from the selectel_vpc_project_v2 resource. If skipped, use theINFRA_PROJECT_ID
environment variable. Learn more about Projects. -
region
— (Optional) Pool, for example,ru-3
. Use only to import resources from the specific pool. If skipped, use theINFRA_REGION
environment variable. Learn more about available pools in the Availability matrix.
Authentication (4.0.0 up to 5.*)
# Configure the Selectel provider
provider "selectel" {
domain_name = "123456"
username = "user"
password = "password"
}
Argument Reference (4.0.0 and later)
-
domain_name
— (Required) Selectel account ID. The account ID is in the top right corner of the Control panel. For import, use the value in theOS_DOMAIN_NAME
environment variable. Learn more about Registration. -
username
— (Required) Name of the service user. To get the name, in the top right corner of the Control panel, go to the account menu ⟶ Profile and Settings ⟶ User management ⟶ the Service users tab ⟶ copy the name of the required user. For import, use the value in theOS_USERNAME
environment variable. Learn more about Service users and how to create a service user. -
password
— (Required, Sensitive) Password of the service user. For import, use the value in theOS_PASSWORD
environment variable. -
user_domain_name
— (Optional) Selectel account ID. Use only for users that were created and assigned a role in a different account. Applicable only to a public cloud. The account ID is in the top right corner of the Control panel. For import, use the value in theOS_USER_DOMAIN_NAME
environment variable. -
auth_url
- (Optional) Keystone Identity authentication URL for authentication via user credentials. If skipped, the provider uses the default endpointhttps://cloud.api.selcloud.ru/identity/v3/
. For import, use the value in theOS_AUTH_URL
environment variable. -
auth_region
— (Optional) Pool where the endpoint for Keystone API and Resell API is located, for example,ru-3
. If skipped, the provider uses the default poolru-1
. Does not affect the region parameter in the resources, but it is preferable to use one pool in a manifest. For import, use the value in theOS_REGION_NAME
environment variable. Learn more about available pools in the Availability matrix. -
project_id
— (Optional) Unique identifier of the Cloud Platform project. Use only to import resources that are associated with the specific project. To get the ID, in the Control panel, go to the Cloud Platform ⟶ project name ⟶ copy the ID of the required project. As an alternative, you can retrieve project ID from the selectel_vpc_project_v2 resource. If skipped, use theSEL_PROJECT_ID
environment variable. Learn more about Cloud Platform projects. -
region
— (Optional) Pool, for example,ru-3
. Use only to import resources from the specific pool. If skipped, use theSEL_REGION
environment variable. Learn more about available pools in the Availability matrix.
Authentication (up to 3.11.0)
# Configure the Selectel provider
provider "selectel" {
token = "Kfpfdf7fjdv0_123456"
}
Argument Reference (up to 3.11.0)
-
token
— (Required) Selectel token. To get the token, in the top right corner of the Control panel, go to the account menu ⟶ Profile and Settings ⟶ API keys ⟶ copy the token. Learn more about Selectel token. -
endpoint
— (Optional) Selectel API endpoint. Use only for test environments. If skipped, the provider automatically uses the official Selectel endpoint. -
project_id
— (Optional) Unique identifier of the Cloud Platform project. Use only to import resources that are associated with the specific project. To get the ID, in the Control panel, go to the Cloud Platform ⟶ project name ⟶ copy the ID of the required project. As an alternative, you can retrieve project ID from the selectel_vpc_project_v2 resource. If skipped, use theSEL_PROJECT_ID
environment variable. Learn more about Cloud Platform projects. -
region
— (Optional) Pool, for example,ru-3
. Use only to import resources from the specific pool. If skipped, use theSEL_REGION
environment variable. Learn more about available pools in the Availability matrix.