Источник данных selectel_dedicated_configuration_v1
Эта инструкция — копия документации Selectel Terraform-провайдера в Terraform Registry.
Provides a list of server configurations available. For more information about server configurations, see the official Selectel documentation.
Example Usage
Search configuration ID by name
data "selectel_dedicated_configuration_v1" "server_config_1" {
project_id = selectel_vpc_project_v2.project_1.id
deep_filter = "{\"name\":\"CL25-NVMe\"}"
}
Search available configurations with additional parameters
data "selectel_dedicated_configuration_v1" "server_config_1" {
project_id = selectel_vpc_project_v2.project_1.id
deep_filter = <<EOT
{
"gpu": {
"count": 1
},
"state": "Active",
}
EOT
}
Search available configurations with additional parameters from file
data "selectel_dedicated_configuration_v1" "server_config_1" {
project_id = selectel_vpc_project_v2.project_1.id
deep_filter = file("filter.json")
}
Search available configurations using filter block
data "selectel_dedicated_configuration_v1" "server_config_1" {
project_id = selectel_vpc_project_v2.project_1.id
filter {
name = "CL25-NVMe"
location_id = data.selectel_dedicated_location_v1.server_location.locations[0].id
}
}
Argument Reference
-
project_id— (Required) Unique identifier of the associated project. Retrieved from the selectel_vpc_project_v2 resource. Learn more about Projects. -
deep_filter— (Optional) JSON filter for available configuration:-
You can use only the name of the configuration to get the results. To get the name of the configuration, in the Selectel site.
-
You can use additional parameters or their combinations to filter available configurations. You can set them in place or use another file. See a list of the filter values in the response of the List servers method described in the Dedicated Servers API.
-
filter — (Optional) Values to filter available configurations:
-
name— (Optional) Configuration name. Supports partial match, case-insensitive. -
location_id— (Optional) Unique identifier of a location.
Attributes Reference
-
configurations— List of the available configurations:-
id— Unique identifier of the configuration. -
name— Configuration name. -
config_name— Configuration description.
-