From fec125428ecd9b2e2ffe28358f31b1bc35f1dd45 Mon Sep 17 00:00:00 2001 From: "iatchenko.d" Date: Wed, 16 Aug 2023 15:27:34 +0300 Subject: [PATCH 1/5] edits v1 --- ...dbaas_available_extension_v1.html.markdown | 42 +-- ...s_configuration_parameter_v1.html.markdown | 70 ++--- .../d/dbaas_datastore_type_v1.html.markdown | 96 +++++-- website/docs/d/dbaas_flavor_v1.html.markdown | 52 ++-- ...s_prometheus_metric_token_v1.html.markdown | 35 +-- .../docs/d/domains_domain_v1.html.markdown | 17 +- ...mks_admission_controllers_v1.html.markdown | 34 +-- .../docs/d/mks_feature_gates_v1.html.markdown | 32 +-- .../docs/d/mks_kube_versions_v1.html.markdown | 21 +- .../docs/d/mks_kubeconfig_v1.html.markdown | 56 ++-- website/docs/index.html.markdown | 66 ++--- .../docs/r/craas_registry_v1.html.markdown | 39 +-- website/docs/r/craas_token_v1.html.markdown | 31 +-- .../r/dbaas_mysql_database_v1.html.markdown | 77 ++---- ...dbaas_postgresql_database_v1.html.markdown | 101 +++---- ...gical_replication_slot_v1.html.markdown.md | 102 ++----- ...s_prometheus_metric_token_v1.html.markdown | 45 ++-- website/docs/r/dbaas_user_v1.html.markdown | 87 +++--- .../docs/r/domains_domain_v1.html.markdown | 27 +- .../docs/r/domains_record_v1.html.markdown | 249 ++++++++++-------- website/docs/r/mks_nodegroup_v1.html.markdown | 118 ++++----- .../docs/r/vpc_floatingip_v2.html.markdown | 41 +-- website/docs/r/vpc_keypair_v2.html.markdown | 50 ++-- website/docs/r/vpc_license_v2.html.markdown | 43 +-- website/docs/r/vpc_project_v2.html.markdown | 91 +++---- website/docs/r/vpc_role_v2.html.markdown | 46 ++-- website/docs/r/vpc_subnet_v2.html.markdown | 50 ++-- website/docs/r/vpc_token_v2.html.markdown | 28 +- website/docs/r/vpc_user_v2.html.markdown | 27 +- 29 files changed, 793 insertions(+), 980 deletions(-) diff --git a/website/docs/d/dbaas_available_extension_v1.html.markdown b/website/docs/d/dbaas_available_extension_v1.html.markdown index f8f982cf..4702987e 100644 --- a/website/docs/d/dbaas_available_extension_v1.html.markdown +++ b/website/docs/d/dbaas_available_extension_v1.html.markdown @@ -8,46 +8,32 @@ description: |- # selectel\_dbaas\_available_extension_v1 -Use this data source to get all available extensions within Selectel DBaaS API Service +Provides a list of extensions available for Managed Databases. Applicable to PostgreSQL, PostgreSQL for 1C, PostgreSQL TimescaleDB. For more information about extensions, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/add-extensions/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/extensions-1c/), and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/add-extensions/). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -data "selectel_dbaas_available_extension_v1" "ae" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - name = "hstore" - } +data "selectel_dbaas_available_extension_v1" "available_extension_1" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" } ``` ## Argument Reference -The folowing arguments are supported - -* `project_id` - (Required) An associated Selectel VPC project. - -* `region` - (Required) A Selectel VPC region. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `filter` - (Optional) One or more values used to look up available extensions +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -**filter** - -- `name` - (Optional) Name of the available extension to lookup. +* `filter` - (Optional) Values to filter available extensions. + + * `name` - (Optional) Name of the extension to search. ## Attributes Reference -The following attributes are exported: - -* `available_extensions` - Contains a list of the found available extensions. - -**available_extensions** +* `available_extensions` - List of the available extensions: -- `id` - ID of the extension. -- `name` - Name of the extension. -- `datastore_type_ids` - List of datastore types that support this extension. -- `dependency_ids` - List of extensions that depend on this extension. + * `id` - Unique identifier of the extension. + * `name` - Extension name. + * `datastore_type_ids` - List of datastore types that support the extension. + * `dependency_ids` - List of extensions that depend on this extension. \ No newline at end of file diff --git a/website/docs/d/dbaas_configuration_parameter_v1.html.markdown b/website/docs/d/dbaas_configuration_parameter_v1.html.markdown index a601df1a..762f2c17 100644 --- a/website/docs/d/dbaas_configuration_parameter_v1.html.markdown +++ b/website/docs/d/dbaas_configuration_parameter_v1.html.markdown @@ -8,64 +8,40 @@ description: |- # selectel\_dbaas\_configuration_parameter_v1 -Use this data source to get all available confguration parameters within Selectel DBaaS API Service +Provides a list of configuration parameters available for Managed Databases. For more information about configuration parameters, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/settings/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/settings-1c/), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/settings/), [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/settings/), [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/settings/), and [Redis](https://docs.selectel.ru/cloud/managed-databases/redis/eviction-policy/). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "postgresql" - version = "12" - } -} - -data "selectel_dbaas_configuration_parameter_v1" "config" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - datastore_type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - name = "work_mem" - } +data "selectel_dbaas_configuration_parameter_v1" "configuration_parameter_1" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" } ``` ## Argument Reference -The folowing arguments are supported - -* `project_id` - (Required) An associated Selectel VPC project. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `filter` - (Optional) One or more values used to look up configuration parameters - -**filter** - -- `datastore_type_id` - (Optional) Datastore type id to lookup all available parameters for this type. -- `name` - (Optional) Name of the parameter to lookup. +* `filter` - (Optional) Values to filter available extensions. + + * `datastore_type_id` - (Optional) Unique identifier of the datastore type for which you get configuration parameters. You can retrieve information about available datastore types with the [selectel_dbaas_datastore_type_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_datastore_type_v1) data source. + * `name` - (Optional) Name of the configuration parameter to search. ## Attributes Reference -The following attributes are exported: - -* `configuration_parameters` - Contains a list of the found configuration parameters. - -**configuration_parameters** - -- `id` - ID of the configuration parameter. -- `datastore_type_id` - Datastore type id for which the configuration parameter is availabe. -- `name` - Name of the configuration parameter. -- `type` - Type of the configuration parameter. -- `unit` - Unit of the configuration parameter. Might be empty. -- `min` - Min value of the configuration parameter. Might be empty. -- `max` - Max value of the configuration parameter. Might be empty. -- `default_value` - Default value of the configuration parameter. Might be empty. -- `choices` - Available choices for the configuration parameter. Some parameters have list of available options. -- `is_restart_required` - Shows if database needs a restart to apply changes of this parameter. -- `is_changeable` - Shows if parameter can be changed. +* `configuration_parameters` - List of available configuration parameters. + + * `id` - Unique identifier of the configuration parameter. + * `datastore_type_id` - Unique identifier of the datastore type for which the configuration parameter is available. + * `name` - Name of the configuration parameter. + * `type` - Type of the configuration parameter. + * `unit` - Unit of the configuration parameter. Might be empty. + * `min` - Minimum value of the configuration parameter. Might be empty. + * `max` - Maximum value of the configuration parameter. Might be empty. + * `default_value` - Default value of the configuration parameter. Might be empty. + * `choices` - Available choices for the configuration parameter. Some parameters have list of available options. + * `is_restart_required` - Shows if the database needs a restart to apply changes. + * `is_changeable` - Shows if the parameter can be changed. \ No newline at end of file diff --git a/website/docs/d/dbaas_datastore_type_v1.html.markdown b/website/docs/d/dbaas_datastore_type_v1.html.markdown index c2756aa8..dd5372ea 100644 --- a/website/docs/d/dbaas_datastore_type_v1.html.markdown +++ b/website/docs/d/dbaas_datastore_type_v1.html.markdown @@ -8,47 +8,101 @@ description: |- # selectel\_dbaas\_datastore_type_v1 -Use this data source to get all available datastore types within Selectel DBaaS API Service +Provides a list of available datastore types in Managed Databases. For more information about available datastore types, see the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-databases/about/about-managed-databases/#поддерживаемые-облачные-базы-данных). -## Example Usage +## Example Usage for PostgreSQL ```hcl -resource "selectel_vpc_project_v2" "project_1" { +data "selectel_dbaas_datastore_type_v1" "dt" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + filter { + engine = "postgresql" + version = "14" + } } +``` +## Example Usage for PostgreSQL for 1C + +```hcl data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" filter { engine = "postgresql" - version = "12" + version = "14-1C" } } ``` -## Argument Reference +## Example Usage for PostgreSQL TimescaleDB + +```hcl +data "selectel_dbaas_datastore_type_v1" "dt" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + filter { + engine = "postgresql" + version = "14-TimescaleDB" + } +} +``` + +## Example Usage for MySQL semi-sync + +```hcl +data "selectel_dbaas_datastore_type_v1" "dt" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + filter { + engine = "mysql_native" + version = "8" + } +} +``` + +## Example Usage for MySQL sync -The folowing arguments are supported +```hcl +data "selectel_dbaas_datastore_type_v1" "dt" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + filter { + engine = "mysql" + version = "8" + } +} +``` -* `project_id` - (Required) An associated Selectel VPC project. +## Example Usage for Redis -* `region` - (Required) A Selectel VPC region. +```hcl +data "selectel_dbaas_datastore_type_v1" "dt" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + filter { + engine = "redis" + version = "6" + } +} +``` -* `filter` - (Optional) One or more values used to look up datastore types +## Argument Reference -**filter** +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -- `engine` - (Optional) Engine of the datastore type to lookup. -- `version` - (Optional) Version of the datastore type to lookup. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -## Attributes Reference +* `filter` - (Optional) Values to filter available datastore types: -The following attributes are exported: + * `engine` - (Optional) Engine of the datastore type to search. Available values are `postgresql` (for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/)), `mysql` (for [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/)), `mysql_native` (for [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/)), and `redis`(for [Redis](https://docs.selectel.ru/cloud/managed-databases/redis/)). + * `version` - (Optional) Version of the datastore type to search. For PostgreSQL for 1C, the versions are in the format `-1C`. For PostgreSQL TimescaleDB, the versions are in the format `-TimescaleDB`. Learn more about available versions for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/configurations/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/configurations-1c/), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/configurations/), [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/configurations/), [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/configurations/), and [Redis](https://docs.selectel.ru/cloud/managed-databases/redis/configurations/). -* `datastore_types` - Contains a list of the found datastore types. +## Attributes Reference -**datastore_types** +* `datastore_types` - List of available datastore types. -- `id` - ID of the datastore type. -- `engine` - Engine of the datastore type. -- `version` - Version of the datastore type. + * `id` - ID of the datastore type. + * `engine` - Engine of the datastore type. + * `version` - Version of the datastore type. \ No newline at end of file diff --git a/website/docs/d/dbaas_flavor_v1.html.markdown b/website/docs/d/dbaas_flavor_v1.html.markdown index 787131e4..c50a1334 100644 --- a/website/docs/d/dbaas_flavor_v1.html.markdown +++ b/website/docs/d/dbaas_flavor_v1.html.markdown @@ -8,54 +8,38 @@ description: |- # selectel\_dbaas\_flavors_v1 -Use this data source to get all available flavors within Selectel DBaaS API Service +Provides a list of flavors available in Managed Databases. For more information about available configurations, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/configurations/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/configurations-1c/), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/configurations/), [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/configurations/), [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/configurations/), and [Redis](https://docs.selectel.ru/cloud/managed-databases/redis/configurations/). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - data "selectel_dbaas_flavor_v1" "flavor" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - vcpus = 2 - ram = 4096 - disk = 10 - } + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" } ``` ## Argument Reference -The folowing arguments are supported - -* `project_id` - (Required) An associated Selectel VPC project. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `filter` - (Optional) One or more values used to look up flavors. +* `filter` - (Optional) Values to filter available flavors: -**filter** - -- `vcpus` - (Optional) vCPU of the flavor to lookup. -- `ram` - (Optional) RAM of the flavor to lookup. -- `disk` - (Optional) Disk of the flavor to lookup. -- `datastore_type_id` - (Optional) Datastore type ID of the flavor to lookup. + * `vcpus` - (Optional) Number of vCPU cores. + * `ram` - (Optional) Amount of RAM in MB. + * `disk` - (Optional) Volume size in GB. + * `datastore_type_id` - (Optional) Unique identifier of the datastore type. ## Attributes Reference -The following attributes are exported: - -* `flavors` - Contains a list of the found flavors. - -**flavors** +* `flavors` - List of available flavors. -- `id` - ID of the flavor. -- `name` - Name of the flavor. -- `description` - Description of the flavor. -- `vcpus` - CPU count for the flavor. -- `ram` - RAM count for the flavor. -- `disk` - Disk size for the flavor. -- `datastore_type_ids` - List of datastore types that support this flavor. + * `id` - Unique identifier of the flavor. + * `name` - Flavor name. + * `description` - Flavor description. + * `vcpus` - Number of vCPU cores. + * `ram` - Amount of RAM in MB. + * `disk` - Volume size in GB. + * `datastore_type_ids` - List of datastore types that support this flavor. \ No newline at end of file diff --git a/website/docs/d/dbaas_prometheus_metric_token_v1.html.markdown b/website/docs/d/dbaas_prometheus_metric_token_v1.html.markdown index bec16987..01803b50 100644 --- a/website/docs/d/dbaas_prometheus_metric_token_v1.html.markdown +++ b/website/docs/d/dbaas_prometheus_metric_token_v1.html.markdown @@ -8,39 +8,30 @@ description: |- # selectel\_dbaas\_prometheus_metric_token_v1 -Use this data source to get all available prometheus metrics tokens within Selectel DBaaS API Service +Provides a list of tokens for Prometheus available in Managed Databases. For more information about tokens for Prometheus, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/monitoring/#экспортировать-метрики-в-формате-prometheus), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/monitoring-1c/#экспортировать-метрики-в-формате-prometheus), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/monitoring/#экспортировать-метрики-в-формате-prometheus), [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/monitoring/#экспортировать-метрики-в-формате-prometheus), [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/monitoring/#экспортировать-метрики-в-формате-prometheus), and [Redis](https://docs.selectel.ru/cloud/managed-databases/redis/monitoring/#экспортировать-метрики-в-формате-prometheus). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -data "selectel_dbaas_prometheus_metric_token_v1" "token" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" +data "selectel_dbaas_prometheus_metric_token_v1" "token_1" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" } ``` ## Argument Reference -The folowing arguments are supported - -* `project_id` - (Required) An associated Selectel VPC project. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). ## Attributes Reference -The following attributes are exported: - -* `prometheus_metrics_tokens` - Contains a list of the found prometheus metrics tokens. - -**prometheus_metrics_tokens** +* `prometheus_metrics_tokens` - List of tokens for Prometheus. -- `id` - ID of the token. -- `created_at` - Create datetime of the token. -- `updated_at` - Update datetime of the token. -* `project_id` - Project ID associated with the token. -- `name` - Name of the token. -- `value` - Token's value. + * `id` - Unique identifier of the token. + * `created_at` - Time when the token was created. + * `updated_at` - Time when the token was updated. + * `project_id` - Unique identifier of the associated Cloud Platform project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-databases/about/projects/). + * `name` - Token name. + * `value` - Token value. \ No newline at end of file diff --git a/website/docs/d/domains_domain_v1.html.markdown b/website/docs/d/domains_domain_v1.html.markdown index 7bd4c6b6..5d62857e 100644 --- a/website/docs/d/domains_domain_v1.html.markdown +++ b/website/docs/d/domains_domain_v1.html.markdown @@ -8,27 +8,24 @@ description: |- # selectel\_domains\_domain_v1 -Use this data source to get the ID of an available domain object within Selectel Domains API Service. +Provides an ID of a domain in DNS Hosting. For more information about domains in DNS Hosting, see the [official Selectel documentation](https://docs.selectel.ru/networks-services/dns/domains/). ## Example Usage ```hcl data "selectel_domains_domain_v1" "domain_1" { - name = "test-domain.xyz" + name = "example.com" } ``` ## Argument Reference -The following arguments are supported: - -* `name` - (Required) The name of the domain. +* `name` - (Required) Domain name. ## Attributes Reference -`id` is set to the ID of the found domain. In addition, the following attributes -are exported: - -* `name` - The name of the domain. +* `id` - Unique identifier of the domain. + +* `name` - Domain name. -* `user_id` - Identifier of the Selectel API user. +* `user_id` - Selectel account ID. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). diff --git a/website/docs/d/mks_admission_controllers_v1.html.markdown b/website/docs/d/mks_admission_controllers_v1.html.markdown index 58c68c35..8927a0bc 100644 --- a/website/docs/d/mks_admission_controllers_v1.html.markdown +++ b/website/docs/d/mks_admission_controllers_v1.html.markdown @@ -8,44 +8,30 @@ description: |- # selectel\_mks\_admission_controllers_v1 -Use this data source to get available admission-controllers within Selectel MKS API Service. +Provides a list of available admission controllers. For more information about admission controllers in Managed Kubernetes, see the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-kubernetes/clusters/admission-controllers/). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -data "selectel_mks_admission_controllers_v1" "ac" { - project_id = "${selectel_vpc_project_v2.project_1.id}" +data "selectel_mks_admission_controllers_v1" "admission_controllers_1" { + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - filter { - kube_version = "1.22.2" - } } ``` ## Argument Reference -The following arguments are supported - -* `project_id` - (Required) An associated Selectel VPC project. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region. +* `region` - (Required) Pool where the cluster is located, for example, `ru-3`. -* `filter` - (Optional) One or more values used to look up available admission controllers. +* `filter` - (Optional) Values to filter available admission controllers: -**filter** - -- `kube_version` - (Optional) Kubernetes version to look up the available admission controllers. + * `kube_version` - (Optional) Kubernetes version for which you get available admission controllers. ## Attributes Reference -The following attributes are exported: - -* `admission_controllers` - Contains a list of the found available admission controllers. - -**admission_controllers** +* `admission_controllers` - List of available admission controllers. -- `kube_version` - Kubernetes version. -- `names` - Names of the admission controllers available for the specified version. + * `kube_version` - Kubernetes version. + * `names` - Names of the admission controllers available for the specified Kubernetes version. \ No newline at end of file diff --git a/website/docs/d/mks_feature_gates_v1.html.markdown b/website/docs/d/mks_feature_gates_v1.html.markdown index 1ce14f37..c35eb4ba 100644 --- a/website/docs/d/mks_feature_gates_v1.html.markdown +++ b/website/docs/d/mks_feature_gates_v1.html.markdown @@ -8,44 +8,30 @@ description: |- # selectel\_mks\_feature_gates_v1 -Use this data source to get available feature-gates within Selectel MKS API Service. +Provides a list of available feature gates. For more information about feature gates in Managed Kubernetes, see the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-kubernetes/clusters/feature-gates/). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - data "selectel_mks_feature_gates_v1" "fg" { - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - filter { - kube_version = "1.22.2" - } } ``` ## Argument Reference -The following arguments are supported - -* `project_id` - (Required) An associated Selectel VPC project. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region. +* `region` - (Required) Pool where the cluster is located, for example, `ru-3`. -* `filter` - (Optional) One or more values used to look up available feature gates. +* `filter` - (Optional) Values to filter available feature gates: -**filter** - -- `kube_version` - (Optional) Kubernetes version to look up the available feature gates. + * `kube_version` - (Optional) Kubernetes version for which you get available feature gates. ## Attributes Reference -The following attributes are exported: - -* `feature_gates` - Contains a list of the found available feature gates. - -**feature_gates** +* `feature_gates` - List of available feature gates. -- `kube_version` - Kubernetes version. -- `names` - Names of the feature gates available for the specified version. + * `kube_version` - Kubernetes version. + * `names` - Names of the feature gates available for the specified version. \ No newline at end of file diff --git a/website/docs/d/mks_kube_versions_v1.html.markdown b/website/docs/d/mks_kube_versions_v1.html.markdown index e6d6046d..16fb2fce 100644 --- a/website/docs/d/mks_kube_versions_v1.html.markdown +++ b/website/docs/d/mks_kube_versions_v1.html.markdown @@ -8,16 +8,13 @@ Get all supported kube versions for a Selectel Managed Kubernetes cluster. # selectel\_mks\_kube_versions_v1 -Use this data source to get all supported kube versions for a Managed Kubernetes cluster. +Provides a list of supported Kubernetes versions for a Managed Kubernetes cluster. For more information about Managed Kubernetes, see the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-kubernetes/about/about-managed-kubernetes/). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - data "selectel_mks_kube_versions_v1" "versions" { - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" } @@ -36,18 +33,14 @@ output "versions" { ## Argument Reference -The following arguments are supported: +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. - -* `region` - (Required) A Selectel VPC region. +* `region` - (Required) Pool where the cluster is located, for example, `ru-3`. ## Attributes Reference -The following attributes are exported: - -* `latest_version` - The most recent version available. +* `latest_version` - The most recent version. -* `default_version` - The currently supported version that is suggested to be used by default. +* `default_version` - Kubernetes version used by default. -* `versions` - The list of all supported versions. +* `versions` - List of the supported versions. \ No newline at end of file diff --git a/website/docs/d/mks_kubeconfig_v1.html.markdown b/website/docs/d/mks_kubeconfig_v1.html.markdown index 8e3f12b3..1e44b254 100644 --- a/website/docs/d/mks_kubeconfig_v1.html.markdown +++ b/website/docs/d/mks_kubeconfig_v1.html.markdown @@ -8,34 +8,38 @@ description: |- # selectel\_mks\_kubeconfig_v1 -Use this data source to get kubeconfig and its fields for a Managed Kubernetes cluster. +Provides a kubeconfig file and its fields for a Managed Kubernetes cluster. For more information about Managed Kubernetes, see the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-kubernetes/). ## Example Usage +### Output kubeconfig + ```hcl -resource "selectel_mks_cluster_v1" "cluster_1" { - name = var.cluster_name - project_id = var.project_id - region = var.region - kube_version = var.kube_version - enable_autorepair = var.enable_autorepair - enable_patch_version_auto_upgrade = var.enable_patch_version_auto_upgrade - network_id = var.network_id - subnet_id = var.subnet_id - maintenance_window_start = var.maintenance_window_start +data "selectel_mks_kubeconfig_v1" "kubeconfig" { + cluster_id = selectel_mks_cluster_v1.cluster_1.id + project_id = selectel_mks_cluster_v1.cluster_1.project_id + region = selectel_mks_cluster_v1.cluster_1.region } +output "kubeconfig" { + value = data.selectel_mks_kubeconfig_v1.kubeconfig.raw_config +} +``` + +### Using a Kubernetes provider + +```hcl data "selectel_mks_kubeconfig_v1" "kubeconfig" { - cluster_id = selectel_mks_cluster_v1.cluster_1.id - project_id = var.project_id - region = var.region + cluster_id = selectel_mks_cluster_v1.cluster_1.id + project_id = selectel_mks_cluster_v1.cluster_1.project_id + region = selectel_mks_cluster_v1.cluster_1.region } provider "kubernetes" { - host = data.selectel_mks_kubeconfig_v1.kubeconfig.server - client_certificate = data.selectel_mks_kubeconfig_v1.kubeconfig.cluster_ca_cert - client_key = data.selectel_mks_kubeconfig_v1.kubeconfig.client_key - cluster_ca_certificate = data.selectel_mks_kubeconfig_v1.kubeconfig.client_cert + host = data.selectel_mks_kubeconfig_v1.kubeconfig.server + client_certificate = data.selectel_mks_kubeconfig_v1.kubeconfig.cluster_ca_cert + client_key = data.selectel_mks_kubeconfig_v1.kubeconfig.client_key + cluster_ca_certificate = data.selectel_mks_kubeconfig_v1.kubeconfig.client_cert } output "kubeconfig" { @@ -45,24 +49,20 @@ output "kubeconfig" { ## Argument Reference -The following arguments are supported: +* `cluster_id` - (Required) Unique identifier of the cluster. -* `cluster_id` - (Required) ID of the Managed Kubernetes cluster. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) Project ID where the cluster is placed. - -* `region` - (Required) Region where the cluster is placed. +* `region` - (Required) Pool where the cluster is located, for example, `ru-3`. In a pool, you can create two clusters for a project. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#managed-kubernetes). ## Attributes Reference -The following attributes are exported: - * `raw_config` - Raw content of a kubeconfig file. -* `server` - IP address and port for a kube-API server. +* `server` - IP address and port for a Kube API server. -* `cluster_ca_cert` - K8s cluster CA certificate. +* `cluster_ca_cert` - CA certificate of the cluster. * `client_key` - Client key for authorization. -* `client_cert` - Client cert for authorization. +* `client_cert` - Client certificate for authorization. \ No newline at end of file diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 05615f61..2a670d18 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -8,64 +8,44 @@ description: |- # Selectel provider -The Selectel provider is used to interact with the Selectel resources. The provider -needs the Selectel API key token to authorize its requests. +Use the Selectel Terraform provider to interact with [Selectel products](https://docs.selectel.ru/). -In most cases [OpenStack Terraform provider](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest) -will have to be used as well — to control resources available via native OpenStack API. - -Read our [Getting Started with Terraform at Selectel](https://kb.selectel.com/docs/selectel-cloud-platform/main-services/instructions/how_to_use_terraform/) -guide to learn more. +To interact with resources that are available via OpenStack API, you can also use [OpenStack Terraform provider](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest). ## Example Usage ```hcl -# Configure the Selectel Provider -provider "selectel" { - token = "SELECTEL_API_TOKEN_KEY" +terraform { + required_providers { + selectel = { + source = "selectel/selectel" + version = "~> 3.11.0" + } + } } -# Create a project +# Create a Cloud Platform project resource "selectel_vpc_project_v2" "project_1" { - # ... + ... } ``` -## Configuration Reference - -The following arguments are supported: - -* `token` - (Required) The Selectel API key token. If omitted, the `SEL_TOKEN` - environment variable is used. - -* `endpoint` - (Optional) The Selectel VPC endpoint. Needed only if this provider - is used for tests environment. If omitted, the provider will use the official - Selectel VPC endpoint automatically. - -* `project_id` - (Optional) The Selectel VPC project. Used only to import - resources that need an auth token in the project scope. If omitted, - the `SEL_PROJECT_ID` environment variable is used. - -* `region` - (Optional) The Selectel VPC region. Used only to import resources - associated with the specific region. If omitted, the `SEL_REGION` environment - variable is used. +## Authentication -## Additional Logging - -To enable debug logging, set the `TF_LOG` environment variable to `DEBUG`: +```hcl +# Configure the Selectel Provider -```shell -$ env TF_LOG=DEBUG terraform apply +provider "selectel" { + token = "" +} ``` -## Testing and Development +## Argument Reference -In order to run the Acceptance Tests for development you need to set -the `SEL_TOKEN` environment variable: +* `token` - (Required) Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). If skipped, use the `SEL_TOKEN` environment variable. -```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN TF_ACC=1 go test -v ./selectel/... -``` +* `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](https://my.selectel.ru/vpc/), 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](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). If skipped, use the `SEL_PROJECT_ID` environment variable. -Please create an issue describing a new feature or bug prior creating a pull -request. +* `region` - (Optional) Pool, for example, `ru-3`. Use only to import resources from the specific pool. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/). If skipped, use the `SEL_REGION` environment variable. diff --git a/website/docs/r/craas_registry_v1.html.markdown b/website/docs/r/craas_registry_v1.html.markdown index 90949a02..1e6766af 100644 --- a/website/docs/r/craas_registry_v1.html.markdown +++ b/website/docs/r/craas_registry_v1.html.markdown @@ -8,15 +8,12 @@ Manages a V1 registry resource within Selectel Container Registry Service. # selectel\_craas\_registry\_v1 -Manages a V1 registry resource within Selectel Container Registry Service. +Creates and manages a registry in Container Registry using public API v1. For more information about Container Registry, see the [official Selectel documentation](https://docs.selectel.ru/cloud/craas/). + ## Example usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { - name = "my-first-project" -} - resource "selectel_craas_registry_v1" "registry_1" { name = "my-first-registry" project_id = selectel_vpc_project_v2.project_1.id @@ -25,26 +22,34 @@ resource "selectel_craas_registry_v1" "registry_1" { ## Argument Reference -The following arguments are supported: - -* `name` - (Required) The name of the registry. - Changing this creates a new registry. +* `name` - (Required) Registry name. Changing this creates a new registry. The name can contain lowercase latin characters, digits, and hyphens. The name starts with a letter and ends with a letter or a digit. It cannot exceed 20 symbols. Learn more about [Registries in Container Registry](https://docs.selectel.ru/cloud/craas/registry/). -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new registry. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new registry. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). ## Attributes Reference -The following attributes are exported: - -* `status` - Shows the current status of the registry. +* `status` - Registry status. -* `endpoint` - Represents the endpoint of the container registry. Ex: `cr.selcloud.ru/my-registry` +* `endpoint` - Registry endpoint. For example, `cr.selcloud.ru/my-registry` ## Import -Registry can be imported using the `id`, e.g. +You can import a registry: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID terraform import selectel_craas_registry_v1.registry_1 939506d6-7621-4581-b673-eacf3db30f5b +terraform import selectel_craas_registry_v1.registry_1 ``` + +where `` is a unique identifier of the registry, for example, `939506d6-7621-4581-b673-eacf3db30f5b`. To get the registry ID, use [Selectel Cloud Management API](https://developers.selectel.ru/docs/selectel-cloud-platform/craas_api/). + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). \ No newline at end of file diff --git a/website/docs/r/craas_token_v1.html.markdown b/website/docs/r/craas_token_v1.html.markdown index 9344d7da..d0f24606 100644 --- a/website/docs/r/craas_token_v1.html.markdown +++ b/website/docs/r/craas_token_v1.html.markdown @@ -8,15 +8,11 @@ Manages a V1 token resource within Selectel Container Registry Service. # selectel\_craas\_token\_v1 -Manages a V1 token resource within Selectel Container Registry Service. +Creates and manages tokens in Container Registry using public API v1. For more information about Container Registry, see the [official Selectel documentation](https://docs.selectel.ru/cloud/craas/). ## Basic usage example ```hcl -resource "selectel_vpc_project_v2" "project_1" { - name = "my-first-project" -} - resource "selectel_craas_token_v1" "token_1" { project_id = selectel_vpc_project_v2.project_1.id } @@ -25,10 +21,6 @@ resource "selectel_craas_token_v1" "token_1" { ## Docker CLI login example ```hcl -resource "selectel_vpc_project_v2" "project_1" { - name = "my-first-project" -} - resource "selectel_craas_token_v1" "token_1" { project_id = selectel_vpc_project_v2.project_1.id } @@ -52,25 +44,12 @@ echo $REGISTRY_TOKEN | docker login cr.selcloud.ru --username $REGISTRY_USERNAME ## Argument Reference -The following arguments are supported: +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new token. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new token. - -* `token_ttl` - (Optional) Represents token expiration duration. - Accepts "1y" or "12h". Default is "1y". - Changing this creates a new token. +* `token_ttl` - (Optional) Token lifetime. Changing this creates a new token. Available values are `1y` for a year and `12h` for 12 hours. The default value is `1y`. ## Attributes Reference -The following attributes are exported: - -* `username` - Contains a username to access container registry. - Sensitive value. - -* `token` - Contains a token to access container registry. - Sensitive value. - -## Import +* `username` - (Sensitive) Username to access Container Registry. -Token resource import is not supported. +* `token` - (Sensitive) Token to access Container Registry. \ No newline at end of file diff --git a/website/docs/r/dbaas_mysql_database_v1.html.markdown b/website/docs/r/dbaas_mysql_database_v1.html.markdown index 46e41d7e..09117e6f 100644 --- a/website/docs/r/dbaas_mysql_database_v1.html.markdown +++ b/website/docs/r/dbaas_mysql_database_v1.html.markdown @@ -8,76 +8,53 @@ description: |- # selectel\_dbaas\_mysql\_database\_v1 -Manages a V1 MySQL database resource within Selectel Managed Databases Service. +Creates and manages a MySQL database using public API v1. Applicable to MySQL sync and MySQL semi-sync datastores, the type is determined by the [selectel_dbaas_mysql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_mysql_datastore_v1) resource. For more information about MySQL databases, see the official Selectel documentation for [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/) and [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/). ## Example usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_subnet_v2" "subnet" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" -} - -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "mysql" - version = "8" - } -} - -resource "selectel_dbaas_mysql_datastore_v1" "datastore_1" { - name = "datastore-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - subnet_id = "${selectel_vpc_subnet_v2.subnet.subnet_id}" - node_count = 3 - flavor { - vcpus = 4 - ram = 4096 - disk = 32 - } -} - resource "selectel_dbaas_mysql_database_v1" "database_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - datastore_id = "${selectel_dbaas_mysql_datastore_v1.datastore_1.id}" - name = "db" + datastore_id = selectel_dbaas_mysql_datastore_v1.datastore_1.id + name = "database_1" } ``` ## Argument Reference -The following arguments are supported: - -* `name` - (Required) A name of the database. - Changing this creates a new database. +* `name` - (Required) Database name. Changing this creates a new database. -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new database. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new database. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region of where the database is located. - Changing this creates a new database. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new database. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `datastore_id` - (Required) An associated datastore. - Changing this creates a new database. +* `datastore_id` - (Required) Unique identifier of the associated datastore. Changing this creates a new database. Retrieved from the [selectel_dbaas_mysql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_mysql_datastore_v1) resource. ## Attributes Reference -The following attributes are exported: - -* `status` - Shows the current status of the database. +* `status` - Database status. ## Import -Database can be imported using the `id`, e.g. +You can import a database: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_database_v1.database_1 b311ce58-2658-46b5-b733-7a0f418703f2 +terraform import selectel_dbaas_mysql_database_v1.database_1 ``` + +where `` is a unique identifier of the database, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the database ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ the cluster page ⟶ the **Databases** tab ⟶ copy the ID under the database name. + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_postgresql_database_v1.html.markdown b/website/docs/r/dbaas_postgresql_database_v1.html.markdown index fee1c486..158f02c6 100644 --- a/website/docs/r/dbaas_postgresql_database_v1.html.markdown +++ b/website/docs/r/dbaas_postgresql_database_v1.html.markdown @@ -8,97 +8,64 @@ description: |- # selectel\_dbaas\_postgresql\_database\_v1 -Manages a V1 PostgreSQL database resource within Selectel Managed Databases Service. +Creates and manages a PostgreSQL database using public API v1. Applicable to PostgreSQL, PostgreSQL for 1C, and PostgreSQL TimescaleDB databases. The type is determined by the [selectel_dbaas_postgresql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_postgresql_datastore_v1) resource. For more information about Managed Databases, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/), and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/). ## Example usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_subnet_v2" "subnet" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" -} - -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "postgresql" - version = "12" - } -} - -resource "selectel_dbaas_postgresql_datastore_v1" "datastore_1" { - name = "datastore-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - subnet_id = "${selectel_vpc_subnet_v2.subnet.subnet_id}" - node_count = 3 - flavor { - vcpus = 4 - ram = 4096 - disk = 32 - } - pooler { - mode = "transaction" - size = 50 - } -} - -resource "selectel_dbaas_user_v1" "user_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - datastore_id = "${selectel_dbaas_postgresql_datastore_v1.datastore_1.id}" - name = "user" - password = "secret" -} - resource "selectel_dbaas_postgresql_database_v1" "database_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - datastore_id = "${selectel_dbaas_postgresql_datastore_v1.datastore_1.id}" - owner_id = "${selectel_dbaas_user_v1.user_1.id}" - name = "db" - lc_ctype = "ru_RU.utf8" - lc_collate = "ru_RU.utf8" + datastore_id = selectel_dbaas_postgresql_datastore_v1.datastore_1.id + owner_id = selectel_dbaas_user_v1.user_1.id + name = "database_1" } ``` ## Argument Reference -The following arguments are supported: +* `name` - (Required) Database name. Changing this creates a new database. -* `name` - (Required) A name of the database. - Changing this creates a new database. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new database. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new database. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new database. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `region` - (Required) A Selectel VPC region of where the database is located. - Changing this creates a new database. +* `datastore_id` - (Required) Unique identifier of the associated datastore. Changing this creates a new database. Retrieved from the [selectel_dbaas_mysql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_mysql_datastore_v1) resource. -* `datastore_id` - (Required) An associated datastore. - Changing this creates a new database. +* `owner_id` - (Required) Unique identifier of the database owner. Retrieved from the [selectel_dbaas_user_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_user_v1) resource. -* `owner_id` - (Optional) Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore. +* `lc_collate` - (Optional) LC_COLLATE setting for the PostgreSQL datastore. Determined when you create a database and you cannot change it afterwards. The default value is `C`. + + To get a list of available values, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**⟶ the cluster page ⟶ the **Databases** tab ⟶ **Create** ⟶ the **LC_COLLATE** field. The list of appropriate values is in the drop-down list. -* `lc_collate` - (Optional) A lc_collate option for the PostreSQL datastore. +* `lc_ctype` - (Optional) LC_CTYPE setting for the PostgreSQL datastore. Determined when you create a database and you cannot change it afterwards. The default value is `C`. -* `lc_ctype` - (Optional) A lc_ctype option for the PostreSQL datastore. + To get a list of available values, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ the cluster page ⟶ the **Databases** tab ⟶ **Create** ⟶ the **LC_CTYPE** field. The list of appropriate values is in the drop-down list. ## Attributes Reference -The following attributes are exported: - -* `status` - Shows the current status of the database. +* `status` - Database status. ## Import -Database can be imported using the `id`, e.g. +You can import a database: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_database_v1.database_1 b311ce58-2658-46b5-b733-7a0f418703f2 +terraform import selectel_dbaas_postgresql_database_v1.database_1 ``` + +where `` is a unique identifier of the database, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the database ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ the cluster page ⟶ the **Databases** tab ⟶ copy the ID under the database name. + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md b/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md index 0ceddff5..d359f84d 100644 --- a/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md +++ b/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md @@ -8,102 +8,56 @@ description: |- # selectel\_dbaas\_postgresql\_logical\_replication\_slot\_v1 -Manages a V1 PostgreSQL logical replication slot resource within Selectel Managed Databases Service. Can be installed only for PostgreSQL datastores. +Creates and manages a logical replication slot for Managed Databases using public API v1. Applicable to PostgreSQL and PostgreSQL TimescaleDB datastores. For more information about replication slots in Managed Databases, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/replication-slots/) and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/replication-slots/). ## Example usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_subnet_v2" "subnet" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" -} - -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "postgresql" - version = "12" - } -} - -resource "selectel_dbaas_postgresql_datastore_v1" "datastore_1" { - name = "datastore-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - subnet_id = "${selectel_vpc_subnet_v2.subnet.subnet_id}" - node_count = 3 - flavor { - vcpus = 4 - ram = 4096 - disk = 32 - } - pooler { - mode = "transaction" - size = 50 - } -} - -resource "selectel_dbaas_user_v1" "user_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - datastore_id = "${selectel_dbaas_datastore_v1.datastore_1.id}" - name = "user" - password = "secret" -} - -resource "selectel_dbaas_postgresql_database_v1" "database_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - datastore_id = "${selectel_dbaas_datastore_v1.datastore_1.id}" - owner_id = "${selectel_dbaas_user_v1.user_1.id}" - name = "db" - lc_ctype = "ru_RU.utf8" - lc_collate = "ru_RU.utf8" -} - resource "selectel_dbaas_postgresql_logical_replication_slot_v1" "slot_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - datastore_id = "${selectel_dbaas_datastore_v1.datastore_1.id}" - database_id = "${selectel_dbaas_database_v1.database_1.id}" + datastore_id = selectel_dbaas_postgresql_datastore_v1.datastore_1.id + database_id = selectel_dbaas_postgresql_database_v1.database_1.id name = "test_slot" } ``` ## Argument Reference -The following arguments are supported: - -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new extension. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new replication slot. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region of where the database is located. - Changing this creates a new extension. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new replication slot. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `datastore_id` - (Required) An associated datastore. - Changing this creates a new slot. +* `datastore_id` - (Required) Unique identifier of the associated datastore. Changing this creates a new replication slot. Retrieved from the [selectel_dbaas_postgresql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_postgresql_datastore_v1) -* `database_id` - (Required) An associated database.tele - Changing this creates a new slot. +* `database_id` - (Required) Unique identifier of the associated database. Changing this creates a new replication slot. Not applicable to a Redis datastore. Retrieved from the [selectel_dbaas_postgresql_database_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_postgresql_database_v1) resource. -* `name` - (Required) A name of the slot. Can contain only lower case letters, numbers and the underscore char. - Changing this creates a new slot. +* `name` - (Required) Slot name. Can contain only lowercase letters, numbers, and an underscore. Changing this creates a new replication slot. ## Attributes Reference -The following attributes are exported: - -* `status` - Shows the current status of the extension. +* `status` - Status of the replication slot. ## Import -Extension can be imported using the `id`, e.g. +You can import a replication slot: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_postgresql_logical_replication_slot_v1.slot_1 b311ce58-2658-46b5-b733-7a0f418703f2 +terraform import selectel_dbaas_postgresql_logical_replication_slot_v1.slot_1 ``` + +where `` is a unique identifier of the replication slot, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the replication slot ID, use [Selectel Cloud Management API](https://developers.selectel.ru/docs/selectel-cloud-platform/dbaas_api/). + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_prometheus_metric_token_v1.html.markdown b/website/docs/r/dbaas_prometheus_metric_token_v1.html.markdown index 1896099c..56a9b7d7 100644 --- a/website/docs/r/dbaas_prometheus_metric_token_v1.html.markdown +++ b/website/docs/r/dbaas_prometheus_metric_token_v1.html.markdown @@ -8,41 +8,50 @@ description: |- # selectel\_dbaas\_prometheus_metric_token_v1 -Manages a V1 prometheus metrics tokens resource within Selectel Managed Databases Service. +Creates and manages tokens required to get access to the metrics in the Prometheus format using public API v1. For more information about export of Prometheus metrics, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/monitoring/#экспортировать-метрики-в-формате-prometheus), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/monitoring-1c/#экспортировать-метрики-в-формате-prometheus), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/monitoring/#экспортировать-метрики-в-формате-prometheus), [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/monitoring/#экспортировать-метрики-в-формате-prometheus), [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/monitoring/#экспортировать-метрики-в-формате-prometheus), and [Redis](https://docs.selectel.ru/cloud/managed-databases/redis/monitoring/#экспортировать-метрики-в-формате-prometheus). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_dbaas_prometheus_metric_token_v1" "token" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - name = "token" +resource "selectel_dbaas_prometheus_metric_token_v1" "token_1" { + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + name = "token" } ``` ## Argument Reference -The folowing arguments are supported - -* `project_id` - (Required) An associated Selectel VPC project. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new token. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new token. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `name` - (Required) A name of the token. +* `name` - (Required) Token name. Changing this creates a new token. ## Attributes Reference -The following attributes are exported: - -* `value` - value of the token. +* `value` (Sensitive) - Token value. ## Import -Prometheus metrics token can be imported using the `id`, e.g. +You can import a token: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_prometheus_metric_token_v1.token b311ce58-2658-46b5-b733-7a0f418703f2 +terraform import selectel_dbaas_prometheus_metric_token_v1.token_1 ``` + +where `` is a unique identifier of the token, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the token ID in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ the cluster page ⟶ **Monitoring** tab ⟶ **Metrics in the Prometheus format** section ⟶ **Manage tokens**. + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_user_v1.html.markdown b/website/docs/r/dbaas_user_v1.html.markdown index 1100fac3..13b4e854 100644 --- a/website/docs/r/dbaas_user_v1.html.markdown +++ b/website/docs/r/dbaas_user_v1.html.markdown @@ -8,50 +8,29 @@ description: |- # selectel\_dbaas\_user\_v1 -Manages a V1 user resource within Selectel Managed Databases Service. +Creates and manages a user in Managed Databases using public API v1. Not applicable to Redis. For more information about managing users in Managed Databases, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/manage-users/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/manage-users-1c/), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/manage-users/), [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/manage-users/), and [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/manage-users/). ## Example usage -```hcl -resource "selectel_vpc_project_v2" "project_1" { -} +### PostgreSQL, PostgreSQL for 1C, and PostgreSQL TimescaleDB -resource "selectel_vpc_subnet_v2" "subnet" { - project_id = "${selectel_vpc_project_v2.project_1.id}" +```hcl +resource "selectel_dbaas_user_v1" "user_1" { + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" + datastore_id = selectel_dbaas_postgresql_datastore_v1.datastore_1.id + name = "user" + password = "secret" } +``` -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "postgresql" - version = "12" - } -} - -resource "selectel_dbaas_datastore_v1" "datastore_1" { - name = "datastore-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - subnet_id = "${selectel_vpc_subnet_v2.subnet.subnet_id}" - node_count = 3 - flavor { - vcpus = 4 - ram = 4096 - disk = 32 - } - pooler { - mode = "transaction" - size = 50 - } -} +### MySQL semi-sync and MySQL sync +```hcl resource "selectel_dbaas_user_v1" "user_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - datastore_id = "${selectel_dbaas_datastore_v1.datastore_1.id}" + datastore_id = selectel_dbaas_mysql_datastore_v1.datastore_1.id name = "user" password = "secret" } @@ -59,32 +38,40 @@ resource "selectel_dbaas_user_v1" "user_1" { ## Argument Reference -The following arguments are supported: - -* `name` - (Required) A name of the user. - Changing this creates a new user. +* `name` - (Required, Sensitive) User name. Changing this creates a new user. -* `password` - (Required) A password for the user. +* `password` - (Required, Sensitive) User password. -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new user. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new user. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region of where the database is located. - Changing this creates a new user. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new user. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `datastore_id` - (Required) An associated datastore. - Changing this creates a new user. +* `datastore_id` - (Required) Unique identifier of the associated datastore. Changing this creates a new user. Retrieved from the [selectel_dbaas_postgresql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_postgresql_datastore_v1) or [selectel_dbaas_mysql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_mysql_datastore_v1) resource depending on the datastore type you use. ## Attributes Reference -The following attributes are exported: - -* `status` - Shows the current status of the user. +* `status` - User status. ## Import -User can be imported using the `id`, e.g. +You can import a user: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_user_v1.user_1 b311ce58-2658-46b5-b733-7a0f418703f2 +terraform import selectel_dbaas_user_v1.user_1 ``` + +where `` is a unique identifier of the user, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the user ID in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ the cluster page ⟶ the **Users** tab. The user ID is under the user name. + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/domains_domain_v1.html.markdown b/website/docs/r/domains_domain_v1.html.markdown index 7cd74806..f90303c1 100644 --- a/website/docs/r/domains_domain_v1.html.markdown +++ b/website/docs/r/domains_domain_v1.html.markdown @@ -8,35 +8,38 @@ description: |- # selectel\_domains\_domain\_v1 -Manages a V1 domain resource within Selectel Domains API Service. +Creates and manages a domain in DNS Hosting using public API v1. For more information about domains, see the [official Selectel documentation](https://docs.selectel.ru/networks-services/dns/domains/). ## Example usage ```hcl resource "selectel_domains_domain_v1" "domain_1" { - name = "test-domain.xyz" + name = "example.com" } ``` ## Argument Reference -The following arguments are supported: - -* `name` - (Required) The name of the domain. - Changing this creates a new domain name. +* `name` - (Required) Domain name. Changing this creates a new domain name. ## Attributes Reference -The following attributes are exported: - -* `name` - The name of the domain. +* `name` - Domain name. -* `user_id` - Identifier of the Selectel API user. +* `user_id` - Selectel account ID. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). ## Import -Domain can be imported using the `id`, e.g. +You can import a domain: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN terraform import selectel_domains_domain_v1.domain_1 45623 +terraform import selectel_domains_domain_v1.domain_1 ``` + +where `` is a unique identifier of the domain, for example, `45623`. To get the domain ID, in the [Control panel](https://my.selectel.ru/network/domains/), go to **Networks Services** ⟶ **DNS Hosting** ⟶ the domain page ⟶ copy the domain ID from the address bar. + +### Environment Variables + +For import, you must set the environment variable `SEL_TOKEN=`, + +where `` is a Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). \ No newline at end of file diff --git a/website/docs/r/domains_record_v1.html.markdown b/website/docs/r/domains_record_v1.html.markdown index 654d25bd..cf6b9d3c 100644 --- a/website/docs/r/domains_record_v1.html.markdown +++ b/website/docs/r/domains_record_v1.html.markdown @@ -8,189 +8,214 @@ description: |- # selectel\_domains\_record\_v1 -Manages a V1 record resource within Selectel Domains API Service. +Creates and manages a record in DNS Hosting using public API v1. For more information about records, see the [official Selectel documentation](https://docs.selectel.ru/networks-services/dns/records/add-record/). ## Example usage -```hcl -resource "selectel_domains_domain_v1" "domain_1" { - name = "testdomain.xyz" -} +### A Record -resource "selectel_domains_record_v1" "cname_record_1" { +```hcl +resource "selectel_domains_record_v1" "a_record_1" { domain_id = selectel_domains_domain_v1.domain_1.id - name = "cname.testdomain.xyz" - type = "CNAME" - content = "origin.com" - ttl = 60 + name = "a.example.com" + type = "A" + content = "127.0.0.1" + ttl = 60 } +``` -resource "selectel_domains_record_v1" "ns_record_1" { +### AAAA Record + +```hcl +resource "selectel_domains_record_v1" "aaaa_record_1" { domain_id = selectel_domains_domain_v1.domain_1.id - name = "testdomain.xyz" - type = "NS" - content = "ns5.selectel.org" - ttl = 86400 + name = "aaaa.example.com" + type = "AAAA" + content = "2400:cb00:2049:1::a29f:1804" + ttl = 60 } +``` +### TXT Record -resource "selectel_domains_record_v1" "a_record_1" { +```hcl +resource "selectel_domains_record_v1" "txt_record_1" { domain_id = selectel_domains_domain_v1.domain_1.id - name = "a.testdomain.xyz" - type = "A" - content = "127.0.0.1" - ttl = 60 + name = "txt.example.com" + type = "TXT" + content = "hello, world!" + ttl = 60 } +``` -resource "selectel_domains_record_v1" "aaaa_record_1" { +### CNAME Record + +```hcl +resource "selectel_domains_record_v1" "cname_record_1" { domain_id = selectel_domains_domain_v1.domain_1.id - name = "aaaa.testdomain.xyz" - type = "AAAA" - content = "2400:cb00:2049:1::a29f:1804" - ttl = 60 + name = "cname.example.com" + type = "CNAME" + content = "origin.com" + ttl = 60 } +``` -resource "selectel_domains_record_v1" "txt_record_1" { +### NS Record + +```hcl +resource "selectel_domains_record_v1" "ns_record_1" { domain_id = selectel_domains_domain_v1.domain_1.id - name = "txt.testdomain.xyz" - type = "TXT" - content = "hello, world!" - ttl = 60 + name = "example.com" + type = "NS" + content = "ns5.selectel.org" + ttl = 86400 } +``` +### MX Record + +```hcl resource "selectel_domains_record_v1" "mx_record_1" { domain_id = selectel_domains_domain_v1.domain_1.id - name = "mx.testdomain.xyz" - type = "MX" - content = "mail.example.org" - ttl = 60 - priority = 10 + name = "mx.example.com" + type = "MX" + content = "mail.example.org" + ttl = 60 + priority = 10 } +``` +### SRV Record + +```hcl resource "selectel_domains_record_v1" "srv_record_1" { domain_id = selectel_domains_domain_v1.domain_1.id - name = "srv.testdomain.xyz" - type = "SRV" - target = "backupbox.example.com" - ttl = 120 - priority = 10 - weight = 20 - port = 100 + name = "srv.example.com" + type = "SRV" + ttl = 120 + priority = 10 + weight = 20 + target = "backupbox.example.com" + port = 100 } +``` -resource "selectel_domains_record_v1" "caa_record_1" { - domain_id = selectel_domains_domain_v1.main_domain.id - name = format("caa.%s", selectel_domains_domain_v1.main_domain.name) - type = "CAA" - tag = "issue" - flag = 128 - value = "letsencrypt.com" - ttl = 60 -} +### SSHFP Record +```hcl resource "selectel_domains_record_v1" "sshfp_record_1" { - domain_id = selectel_domains_domain_v1.main_domain.id - name = format("%s", selectel_domains_domain_v1.main_domain.name) - type = "SSHFP" - algorithm = 1 + domain_id = selectel_domains_domain_v1.main_domain.id + name = format("%s", selectel_domains_domain_v1.main_domain.name) + type = "SSHFP" + ttl = 60 + algorithm = 1 fingerprint_type = 1 - fingerprint = "01AA" - ttl = 60 + fingerprint = "01AA" } +``` + +### ALIAS Record + +```hcl resource "selectel_domains_record_v1" "alias_record_1" { domain_id = selectel_domains_domain_v1.main_domain.id - name = format("subc.%s", selectel_domains_domain_v1.main_domain.name) - type = "ALIAS" - content = format("%s", selectel_domains_domain_v1.main_domain.name) - ttl = 60 + name = format("subc.%s", selectel_domains_domain_v1.main_domain.name) + type = "ALIAS" + content = format("%s", selectel_domains_domain_v1.main_domain.name) + ttl = 60 } ``` -## Argument Reference +### CAA Record -The following arguments are supported: +```hcl +resource "selectel_domains_record_v1" "caa_record_1" { + domain_id = selectel_domains_domain_v1.main_domain.id + name = format("caa.%s", selectel_domains_domain_v1.main_domain.name) + type = "CAA" + ttl = 60 + tag = "issue" + flag = 128 + value = "letsencrypt.com" +} +``` -* `domain_id` - (Required) Represents an identifier of the associated domain. - Changing this creates a new domain record. +## Argument Reference -* `name` - (Required) Represents a name of the domain record. +* `domain_id` - (Required) Unique identifier of the associated domain. Changing this creates a new domain record. Retrieved from the [selectel_domains_domain_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/domains_domain_v1) resource. -* `type` - (Required) Represents a type of the record. - Possible values: A, AAAA, TXT, CNAME, NS, SOA, MX, SRV. +* `name` - (Required) Name of the domain record. The name format depends on the record type, see the examples above. -* `ttl` - (Required) Represents a time-to-live for the record. - Must be the value between 60 and 604800. +* `type` - (Required) Type of the record. Available values are `A`, `AAAA`, `TXT`, `CNAME`, `NS`, `MX`, `SRV`, `SSHFP`, `ALIAS`, `CAA`. -* `content` - (Optional) Represents a content of the record. - Absent for SRV records. +* `content` - (Optional) Content of the record. Not applicable to SRV, SSHFP, CAA records. -* `email` - (Optional) Represents an email of the domain's admin. - For SOA records only. +* `ttl` - (Required) Time-to-live for the record in seconds. The available range is from 60 to 604800. -* `priority` - (Optional) Represents priority of the records preferences. - Lower value means more preferred. MX/SRV records only. +* `priority` - (Optional) Priority of the records preferences. Applicable only to MX and SRV records. Lower value means more preferred. -* `weight` - (Optional) Represents a relative weight for records with the same priority, - higher value means higher chance of getting picked. - For SRV records only. +* `weight` - (Optional) Weight for the records with the same priority. Higher value means more preferred. Applicable only to SRV records. -* `port` - (Optional) Represents TCP or UDP port on which the service is to be found. - For SRV records only. +* `target` - (Optional) Canonical name of the host providing the service. Applicable only to SRV records. -* `target` - (Optional) Represents a canonical hostname of the machine providing the service. - For SRV records only. +* `port` - (Optional) TCP or UDP port of the host of the service. Applicable only to SRV records. -* `tag` - (Optional) Represents the identifier of the property represented by the record. - For CAA records only. +* `algorithm` - (Optional) Algorithm of the public key. Applicable only to SSHFP records. Available values are `RSA`, `DSA`, `ECDSA`, `Ed25519`. -* `flag` - (Optional) Represents the critical flag, that has a specific meaning per RFC. - For CAA records only. +* `fingerprint_type` - (Optional) Algorithm used to hash the public key. Applicable only to SSHFP records. Available values are `SHA-1`, `SHA-256`. -* `value` - (Optional) Represents a value associated with the tag. - For CAA records only. +* `fingerprint` - (Optional) Hexadecimal representation of the hash result, as text. Applicable only to SSHFP records. -* `algorithm` - (Optional) Represents the algorithm of the public key. - For SSHFP records only. +* `tag` - (Optional) Identifier of the property represented by the record. Applicable only to CAA records. Available values are `issue`, `issuewild`, `iodef`, `auth`, `path`, `policy`. -* `fingerprint_type` - (Optional) Represents an algorithm used to hash the public key. - For SSHFP records only. +* `flag` - (Optional) Critical value that has a specific meaning per RFC. Applicable only to CAA records. The available range is from 0 to 128. -* `fingerprint` - (Optional) Represents a hexadecimal hash result, as text. - For SSHFP records only. +* `value` - (Optional) Value associated with the tag. Applicable only to CAA records. -## Attributes Reference +* `email` - (Optional) Email of the domain administrator. Applicable only to SOA records. -The following attributes are exported: +## Attributes Reference -* `content` - Represents a content of the record. +* `content` - Content of the record. Applicable only to A, AAAA, TXT, CNAME, NS, MX, ALIAS records. -* `email` - Represents an email of the domain's admin. +* `priority` - Priority of the records preferences. Applicable only to MX, SRV records. -* `priority` - Represents priority of the records preferences. +* `weight` - Weight for the records with the same priority. Applicable only to SRV records. -* `weight` - Represents a relative weight for records with the same priority, - higher value means higher chance of getting picked. +* `target` - Canonical name of the host providing the service. Applicable only to SRV records. -* `port` - Represents TCP or UDP port on which the service is to be found. +* `port` - TCP or UDP port of the host of the service. Applicable only to SRV records. -* `target` - Represents a canonical hostname of the machine providing the service. +* `algorithm` - Algorithm of the public key. Applicable only to SSHFP records. -* `tag` - Represents the identifier of the property represented by the record. +* `fingerprint_type` - Algorithm used to hash the public key. Applicable only to SSHFP records. -* `flag` - Represents the critical flag, that has a specific meaning per RFC. +* `fingerprint` - Hexadecimal representation of the hash result, as text. Applicable only to SSHFP records. -* `value` - Represents a value associated with the tag. +* `tag` - Identifier of the property represented by the record. Applicable only to CAA records. -* `algorithm` - Represents th algorithm of the public key. +* `flag` - Critical value that has a specific meaning per RFC. Applicable only to CAA records. -* `fingerprint_type` - Represents an algorithm used to hash the public key. +* `value` - Value associated with the tag. Applicable only to CAA records. -* `fingerprint` - Represents a hexadecimal hash result, as text. +* `email` - Email of the domain administrator. Applicable only to SOA records. ## Import -Domain records can be imported using a combined ID in the following format: ``/`` +You can import a domain record: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN terraform import selectel_domains_record_v1.record_1 45623/123 +terraform import selectel_domains_record_v1.record_1 / ``` + +where: + +* `` — Unique identifier of the domain, for example, `45623`. To get the domain ID, in the [Control panel](https://my.selectel.ru/network/domains/), go to **Networks Services** ⟶ **DNS Hosting** ⟶ the domain page ⟶ copy the domain ID from the address bar. + +* `` — Unique identifier of the record, for example, `123`. To get the record ID, use [DNS Hosting API](https://developers.selectel.ru/docs/cloud-services/dns_api/). + +### Environment Variables + +For import, you must set the environment variable `SEL_TOKEN=`, + +where `` is a Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). \ No newline at end of file diff --git a/website/docs/r/mks_nodegroup_v1.html.markdown b/website/docs/r/mks_nodegroup_v1.html.markdown index 3bbdb136..1ceb4a7c 100644 --- a/website/docs/r/mks_nodegroup_v1.html.markdown +++ b/website/docs/r/mks_nodegroup_v1.html.markdown @@ -8,25 +8,15 @@ description: |- # selectel\_mks\_nodegroup\_v1 -Manages a V1 nodegroup resource within Selectel Managed Kubernetes Service. +Creates and manages a Managed Kubernetes node group using public API v1. For more information about node groups, see the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-kubernetes/node-groups/). ## Example usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_mks_cluster_v1" "cluster_1" { - name = "cluster-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - kube_version = "1.16.8" -} - resource "selectel_mks_nodegroup_v1" "nodegroup_1" { - cluster_id = "${selectel_mks_cluster_v1.cluster_1.id}" - project_id = "${selectel_mks_cluster_v1.cluster_1.project_id}" - region = "${selectel_mks_cluster_v1.cluster_1.region}" + cluster_id = selectel_mks_cluster_v1.cluster_1.id + project_id = selectel_mks_cluster_v1.cluster_1.project_id + region = selectel_mks_cluster_v1.cluster_1.region availability_zone = "ru-3a" nodes_count = 3 cpus = 2 @@ -39,18 +29,18 @@ resource "selectel_mks_nodegroup_v1" "nodegroup_1" { "label-key2": "label-value2", } taints { - key = "test-key-0" - value = "test-value-0" + key = "test-key-0" + value = "test-value-0" effect = "NoSchedule" } taints { - key = "test-key-1" - value = "test-value-1" + key = "test-key-1" + value = "test-value-1" effect = "NoExecute" } taints { - key = "test-key-2" - value = "test-value-2" + key = "test-key-2" + value = "test-value-2" effect = "PreferNoSchedule" } } @@ -58,76 +48,70 @@ resource "selectel_mks_nodegroup_v1" "nodegroup_1" { ## Argument Reference -The following arguments are supported: +* `cluster_id` - (Required) Unique identifier of the associated Managed Kubernetes cluster. Changing this creates a new node group. You can create up to eight group nodes in a cluster. Retrieved from the [selectel_mks_cluster_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/mks_cluster_v1) resource. -* `cluster_id` - (Required) An associated MKS cluster. - Changing this creates a new nodegroup. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new node group. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new nodegroup. +* `region` - (Required) Pool where the cluster is located, for example, `ru-3`. Changing this creates a new node group. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#managed-kubernetes). -* `region` - (Required) A Selectel VPC region of where the nodegroup is located. - Changing this creates a new nodegroup. +* `availability_zone` (Required) Pool segment where all nodes of the node group are located. Changing this creates a new node group. Learn more about available pool segments in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#managed-kubernetes). -* `availability_zone` (Required) An OpenStack availability zone for all nodes in the nodegroup. - Changing this creates a new nodegroup. +* `nodes_count` (Required) Number of worker nodes in the node group. The maximum number of nodes in a node group is 15. Changing this resizes the node group if `enable_autoscale` is false. -* `nodes_count` (Required) Count of worker nodes in the nodegroup. - Changing this resizes the nodegroup according to the new nodes count. - As long as `enable_autoscale` is set to true, changing this will not affect the size of the nodegroup. +* `cpus` (Optional) Number of CPU cores for each node. Can be skipped only when `flavor_id` is set. Changing this creates a new node group. Learn more about [Configurations](https://docs.selectel.ru/cloud/managed-kubernetes/node-groups/configurations/). -* `keypair_name` (Optional) Name of the SSH key that will be added to all nodes. - Changing this creates a new nodegroup. +* `ram_mb` (Optional) Amount of RAM in MB for each node. Can be skipped only when `flavor_id` is set. Changing this creates a new node group. Learn more about [Configurations](https://docs.selectel.ru/cloud/managed-kubernetes/node-groups/configurations/). -* `affinity_policy` (Optional) An argument to tune nodes affinity policy. - Changing this creates a new nodegroup. +* `volume_gb` (Optional) Volume size in GB for each node. Can be skipped only when flavor_id is set and local_volume is `true`. Changing this creates a new node group. Learn more about [Configurations](https://docs.selectel.ru/cloud/managed-kubernetes/node-groups/configurations/). -* `cpus` (Optional) CPU count for each node. It can be omitted only in cases when `flavor_id` is set. - Changing this creates a new nodegroup. +* `volume_type` (Optional) Type of an OpenStack blockstorage volume for each node. Can be skipped only when `flavor_id` is set and `local_volume` is `true`. Changing this creates a new node group. Available volume types are `fast`, `basic`, and `universal`. The format is ``.``. Learn more about [Network volumes](https://docs.selectel.ru/cloud/servers/volumes/about-network-volumes/). -* `ram_mb` (Optional) RAM count in MB for each node. It can be omitted only in cases when `flavor_id` is set. - Changing this creates a new nodegroup. +* `local_volume` (Optional) Specifies if nodes use a local volume. Changing this creates a new node group. Boolean flag, the default value is false. -* `volume_gb` (Optional) Volume size in GB for each node. It can be omitted only in cases - when `flavor_id` is set and `local_volume` is true. - Changing this creates a new nodegroup. +* `flavor_id` (Optional) Unique identifier of an OpenStack flavor for all nodes in the node group. Changing this creates a new node group. Learn more about [Flavors](https://docs.selectel.ru/cloud/managed-kubernetes/node-groups/configurations/#создать-группу-нод-с-фиксированной-конфигурацией-облачного-сервера). -* `volume_type` (Optional) An OpenStack blockstorage volume type for each node. It can be omitted only in cases - when `flavor_id` is set and `local_volume` is true. - Changing this creates a new nodegroup. +* `labels` (Optional) List of Kubernetes labels applied to each node in the node group. -* `local_volume` (Optional) Represents if nodes will use local volume. - Accepts true or false. Defaults to false. - Changing this creates a new nodegroup. +* `taints` (Optional) List of Kubernetes taints applied to each node in the node group. Contains a key-value pair and an effect applied for the taint. Available effects are `NoSchedule`, `PreferNoSchedule`, and `NoExecute`. Learn more about [Taints](https://docs.selectel.ru/cloud/managed-kubernetes/node-groups/add-taints/). -* `flavor_id` (Optional) An OpenStack flavor identifier for all nodes in the nodegroup. It can be omitted in most cases. - Changing this creates a new nodegroup. +* `keypair_name` (Optional) Name of the SSH key added to all nodes. Changing this creates a new node group. -* `labels` (Optional) Represents a map containing a set of Kubernetes labels that will be applied - for each node in the group. The keys must be user-defined. +* `affinity_policy` (Optional) Specifies affinity policy of the nodes. Changing this creates a new node group. Available values are `soft-anti-affinity` and `soft-affinity`. The default value is `soft-anti-affinity`. For more information about affinity and anti-affinity, see the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity). -* `taints` (Optional) Represents a list of Kubernetes taints that will be applied for each node in the group. +* `enable_autoscale` (Optional) Enables or disables autoscaling of the node group. Boolean flag, the default value is false. `autoscale_min_nodes` and `autoscale_max_nodes` must be specified. Learn more about [Autoscaling](https://docs.selectel.ru/cloud/managed-kubernetes/node-groups/cluster-autoscaler/). -* `enable_autoscale` (Optional) Specifies if a nodegroup autoscaling option has to be turned on/off. - Accepts true or false. Default is false. - `autoscale_min_nodes` and `autoscale_max_nodes` must be specified. - -* `autoscale_min_nodes` (Optional) Represents a minimum possible number of worker nodes in the nodegroup. - -* `autoscale_max_nodes` (Optional) Represents a maximum possible number of worker nodes in the nodegroup. + * `autoscale_min_nodes` (Optional) Minimum number of worker nodes in the node group. + * `autoscale_max_nodes` (Optional) Maximum number of worker nodes in the node group. ## Attributes Reference -The following attributes are exported: - -* `nodes` - Contains a list of all nodes in the nodegroup. +* `nodes` - List of nodes in the node group. -* `nodegroup_type` - Represents type of nodegroup. It can take values `STANDARD`, `GPU`. +* `nodegroup_type` - Type of the node group. Available values are `STANDARD` and `GPU`. ## Import -Nodegroup can be imported using a combined ID using the following format: ``/`` +You can import a node group: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_mks_nodegroup_v1.nodegroup_1 b311ce58-2658-46b5-b733-7a0f418703f2/63ed5342-b22c-4c7a-9d41-c1fe4a142c13 +terraform import selectel_mks_nodegroup_v1.nodegroup_1 / ``` + +where: + +* `` — Unique identifier of the cluster, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the cluster ID, in the [Control panel](https://my.selectel.ru/vpc/mks/), go to **Cloud Platform** ⟶ **Kubernetes** ⟶ the cluster page ⟶ copy the ID at the top of the page under the cluster name, near the region and pool. +* `` — Unique identifier of the node, for example, `63ed5342-b22c-4c7a-9d41-c1fe4a142c13`. To get the cluster ID, in the [Control panel](https://my.selectel.ru/vpc/mks/), go to **Cloud Platform** ⟶ **Kubernetes**. Click the required cluster ⟶ the required node group. The node group ID is at the top of the page under the node group name, near the region and pool. + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/vpc_floatingip_v2.html.markdown b/website/docs/r/vpc_floatingip_v2.html.markdown index 884eaff1..205c3707 100644 --- a/website/docs/r/vpc_floatingip_v2.html.markdown +++ b/website/docs/r/vpc_floatingip_v2.html.markdown @@ -8,46 +8,53 @@ description: |- # selectel\_vpc\_floatingip_v2 -Manages a V2 floating IP resource within Selectel VPC. +Creates and manages a public IP address using public API v2. For more information about public IP addresses, see the [official Selectel documentation](https://docs.selectel.ru/cloud/servers/networks/about-networks/). ## Example Usage ```hcl resource "selectel_vpc_floatingip_v2" "floatingip_1" { - project_id = "887e5e35458d4ee38a6ae0543555dec5" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-1" } ``` ## Argument Reference -The following arguments are supported: +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new public IP address. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. Changing this - creates a new floating IP. - -* `region` - (Required) A region of where the floating IP resides. Changing this - creates a new floating IP. +* `region` - (Required) Pool where the public IP address is located, for example, `ru-3`. Changing this creates a new public IP address. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/). ## Attributes Reference -The following attributes are exported: +* `port_id` - Unique identifier of the associated OpenStack port. Learn more about the [openstack_networking_port_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_port_v2) resource in the official OpenStack documentation. + +* `floating_ip_address` - Public IP address. -* `port_id` - Contains id of the Networking service port. +* `fixed_ip_address` - Fixed private IP address of the OpenStack port, that is associated with the public IP address. Learn more about the [openstack_networking_port_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_port_v2) resource in the official OpenStack documentation. -* `floating_ip_address` - Contains floating IP address. +* `status` - Status of the public IP address. -* `fixed_ip_address` - Contains internal IP address of the Networking service port. +* `servers` - Cloud server that use the public IP address. -* `status` - Shows if the license is used or not. + * `id` - Unique identifier of the cloud server. -* `servers` - Shows information about servers that use this floating IP. Contains - `id`, `name` and `status` fields. + * `name` - Name of the cloud server. + + * `status` - Status of the cloud server. ## Import -Floating IPs can be imported using the `id`, e.g. +You can import a public IP address: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN terraform import selectel_vpc_floatingip_v2.floatingip_1 aa402146-d83e-4c8c-8b74-1f415d4b8253 +terraform import selectel_vpc_floatingip_v2.floatingip_1 ``` + +where `` is a unique identifier of the public IP address, for example, `0635d78f-57a7-1a23-bf9d-9e10`. To get the public IP address ID, in the [Control panel](https://my.selectel.ru/vpc/), go to **Cloud Platform** ⟶ **Network** ⟶ the **Public IP addresses** tab. The ID is under the public IP address. As an alternative, you can use [OpenStack CLI](https://docs.selectel.ru/cloud/servers/tools/openstack/) command `openstack floating ip list` and copy `ID` field. + +### Environment Variables + +For import, you must set the environment variable `SEL_TOKEN=`, + +where `` is a Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). diff --git a/website/docs/r/vpc_keypair_v2.html.markdown b/website/docs/r/vpc_keypair_v2.html.markdown index 720022b3..55d47e74 100644 --- a/website/docs/r/vpc_keypair_v2.html.markdown +++ b/website/docs/r/vpc_keypair_v2.html.markdown @@ -8,46 +8,46 @@ description: |- # selectel\_vpc\_keypair_v2 -Manages a V2 keypair resource within Selectel VPC. +Creates and manages a SSH key pair using public API v2. For more information about SSH key pairs, see the [official Selectel documentation](https://docs.selectel.ru/cloud/servers/manage/create-and-place-ssh-key/). + +Selectel products support Identity and Access Management (IAM). Only service users can use SSH key pairs. To create a service user, use the [selectel_vpc_user_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_user_v2) resource. For more information about service users, see the [official Selectel documentation](https://docs.selectel.ru/control-panel-actions/users-and-roles/user-types-and-roles/). ## Example Usage ```hcl -resource "selectel_vpc_user_v2" "user_1" { - password = "secret" -} - -resource "selectel_vpc_keypair_v2" "keypair_tf_acc_test_1" { - public_key = "${file("~/.ssh/id_rsa.pub")}" - user_id = "${selectel_vpc_user_v2.user_1.id}" +resource "selectel_vpc_keypair_v2" "keypair_1" { + name = "keypair" + public_key = file("~/.ssh/id_rsa.pub") + user_id = selectel_vpc_user_v2.user_1.id } ``` ## Argument Reference -The following arguments are supported: - -* `name` - (Required) Name of the keypair. Changing this creates a new keypair. - -* `public_key` - (Required) A pregenerated OpenSSH-formatted public key. - Changing this creates a new keypair. - -* `regions` - (Optional) List of region names where keypair is need to be - created. Keypair will be created in all available regions if omitted. Changing - this creates a new keypair. +* `name` - (Required) Name of the SSH key pair. Changing this creates a new key pair. -* `user_id` - (Required) An associated Selectel VPC user. Changing this - creates a new keypair. +* `public_key` - (Required) Pregenerated OpenSSH-formatted public key. Changing this creates a new key pair. Learn more [how to create SSH key pair](https://docs.selectel.ru/cloud/servers/manage/create-and-place-ssh-key/#создать-ssh-ключи). -## Attributes Reference +* `user_id` - (Required) Unique identifier of the associated service user. Changing this creates a new key pair. Retrieved from the [selectel_vpc_user_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_user_v2) resource. -There are no additional attributes for this resource. +* `regions` - (Optional) List of pools where the key pair is located, for example, `ru-3`. Changing this creates a new key pair. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/). ## Import -Keypairs can be imported by specifying `user_id` and `name` arguments, separated -by a forward slash: +You can import a SSH key pair: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN terraform import selectel_vpc_keypair_v2.keypair_1 / +terraform import selectel_vpc_keypair_v2.keypair_1 / ``` + +where: + +* `` — Unique identifier of the associated service user, for example, `abc1bb378ac84e1234b869b77aadd2ab`. To get the ID, in the top right corner of the [Control panel](https://my.selectel.ru/), go to the account menu ⟶ **Profile and Settings** ⟶ **User management** ⟶ the **Service users** tab ⟶ copy the ID of the required user. + +* `` — Name of the key pair, for example, `Key`. To get the name, in the top right corner of the [Control panel](https://my.selectel.ru/), go to the account menu ⟶ **Profile and Settings** ⟶ **User management** ⟶ the **Service users** tab ⟶ the user page. The SSH key pair name is in the **SSH keys** section. + +### Environment Variables + +For import, you must set the environment variable `SEL_TOKEN=`, + +where `` is a Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). diff --git a/website/docs/r/vpc_license_v2.html.markdown b/website/docs/r/vpc_license_v2.html.markdown index e5380f13..4abad3d7 100644 --- a/website/docs/r/vpc_license_v2.html.markdown +++ b/website/docs/r/vpc_license_v2.html.markdown @@ -8,13 +8,13 @@ description: |- # selectel\_vpc\_license_v2 -Manages a V2 license resource within Selectel VPC. +Manages a license for cloud servers using public API v2. ## Example Usage ```hcl resource "selectel_vpc_license_v2" "license_windows_2016_standard" { - project_id = "887e5e35458d4ee38a6ae0543555dec5" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-2" type = "license_windows_2012_standard" } @@ -22,35 +22,42 @@ resource "selectel_vpc_license_v2" "license_windows_2016_standard" { ## Argument Reference -The following arguments are supported: +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new license. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. Changing this - creates a new license. +* `region` - (Required) Pool where you can use the license, for example, `ru-3`. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/). -* `region` - (Required) A region of where the license resides. Changing this - creates a new license. - -* `type` - (Required) The type of license. Changing this creates a new license. +* `type` - (Required) Type of the license. Changing this creates a new license. Available values are `license_windows_2012_standard`, `license_windows_2016_standard`, `license_windows_2019_standard`. ## Attributes Reference -The following attributes are exported: +* `status` - License status. + +* `servers` - Cloud servers that use the license. -* `status` - Shows if the license is used or not. + * `id` - Unique identifier of the cloud server. -* `servers` - Shows information about servers that use this license. Contains - `id`, `name` and `status` fields. + * `name` - Name of the cloud server. -* `network_id` - Represents id of the associated network in the Networking service. + * `status` - Status of the cloud server. -* `subnet_id` - Represents id of the associated network in the Networking service. +* `network_id` - Unique identifier of the associated OpenStack network. Learn more about the [openstack_networking_network_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_network_v2) resource in the official OpenStack documentation. -* `port_id` - Represents id of the associated port in the Networking service. +* `subnet_id` - Unique identifier of the associated OpenStack subnet. Learn more about the [openstack_networking_subnet_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_subnet_v2) resource in the official OpenStack documentation. + +* `port_id` - Unique identifier of the associated OpenStack port. Learn more about the [openstack_networking_port_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_port_v2) resource in the official OpenStack documentation. ## Import -Licenses can be imported using the `id`, e.g. +You can import a license: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN terraform import selectel_vpc_license_v2.license_1 4123 +terraform import selectel_vpc_license_v2.license_1 ``` + +where `` is a unique identifier of the license, for example, `4123`. To get the license ID, use [Selectel Cloud Management API](https://developers.selectel.ru/docs/selectel-cloud-platform/main-services/selectel_cloud_management_api/). + +### Environment Variables + +For import, you must set the environment variable `SEL_TOKEN=`, + +where `` is a Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). diff --git a/website/docs/r/vpc_project_v2.html.markdown b/website/docs/r/vpc_project_v2.html.markdown index ae704c12..2c946bd3 100644 --- a/website/docs/r/vpc_project_v2.html.markdown +++ b/website/docs/r/vpc_project_v2.html.markdown @@ -8,97 +8,98 @@ description: |- # selectel\_vpc\_project_v2 -Manages a V2 project resource within Selectel VPC. +Creates and manages a Cloud Platform project using public API v2. For more information about Cloud Platform projects, see the [official Selectel documentation](https://docs.selectel.ru/cloud/servers/about/projects/). ## Example Usage +### Project with quotas + ```hcl -resource "selectel_vpc_project_v2" "kubernetes_cluster" { - name = "kubernetes_cluster" - custom_url = "kubernetes-cluster-123.selvpc.ru" - theme = { - color = "2753E9" - } +resource "selectel_vpc_project_v2" "project_1" { + name = "project1" quotas { resource_name = "compute_cores" resource_quotas { region = "ru-3" - zone = "ru-3a" - value = 12 + zone = "ru-3a" + value = 12 } } quotas { resource_name = "compute_ram" resource_quotas { region = "ru-3" - zone = "ru-3a" - value = 20480 + zone = "ru-3a" + value = 20480 } } quotas { resource_name = "volume_gigabytes_fast" resource_quotas { region = "ru-3" - zone = "ru-3a" - value = 100 + zone = "ru-3a" + value = 100 } } } ``` -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the project. - -* `custom_url` - (Optional) The custom url for the project. Needs to be the - 3rd-level domain for the `selvpc.ru`. Example: `terraform-project-001.selvpc.ru`. +### Project with external panel -* `theme` - (Optional) An additional theme settings for this project. The structure is - described below. +```hcl +resource "selectel_vpc_project_v2" "project_1" { + name = "project_1" + custom_url = "project-123.selvpc.ru" + theme = { + color = "2753E9" + } +} +``` +## Argument Reference -* `quotas` - (Optional) An array of desired quotas for this project. The structure is - described below. +* `name` - (Required) Project name. -The `theme` block supports: +* `quotas` - (Optional) Array of quotas for the project. Learn more about [Quotas](https://docs.selectel.ru/cloud/servers/about/quotas/). -* `color` - (Optional) A background color in hex format. + * `resource_name` - (Required) Resource name. To get the name of the resource, use [Selectel Cloud Quota Management API](https://developers.selectel.ru/docs/selectel-cloud-platform/main-services/cloud-quota-management/). -* `logo` - (Optional) An url of the project header logo. + * `resource_quotas` - (Required) Array of quotas for the resource. -The `quotas` block supports: + * `region` - (Optional) Pool where the resource is located, for example, `ru-3`. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/). -* `resource_name` - (Required) A name of the billing resource to set quotas for. + * `zone` - (Optional) Pool segment where the resource is located, for example, `ru-3a`. Learn more about available pool segments in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/). -* `resource_quotas` - (Required) An array of desired billing quotas for this particular - resource. The structure is described below. + * `value` - (Required) Quota value. The value cannot exceed the project limit. To get the project limit, in the [Control panel](https://my.selectel.ru/vpc/quotas/), go to **Cloud Platform** ⟶ **Quotas**. The project limit for the resource is in the **Quota** column. Learn more about [Project limits](https://docs.selectel.ru/cloud/servers/about/quotas/). -The `resource_quotas` block supports: +* `custom_url` - (Optional) URL of the project in the external panel. The available value is the third-level domain, for example, `123456.selvpc.ru` or `project.example.com`. Learn more [how to set up access to external panel](https://docs.selectel.ru/control-panel-actions/account/external-panel/). -* `region` - (Optional) A Selectel VPC region for the resource quota. +* `theme` - (Optional) Additional theme settings for the external panel. -* `zone` - (Optional) A Selectel VPC zone for the resource quota. + * `color` - (Optional) Fill color of the toolbar in hex format. -* `value` - (Required) A value of the resource quota. + * `logo` - (Optional) URL of the logo on the toolbar. ## Attributes Reference -The following attributes are exported: +* `url` - Project URL. Created automatically and you cannot change it. -* `url` - An url of the Selectel VP project. It is set by the Selectel and can't - be changed by the user. +* `enabled` - Project status. Possible values are `active` and `disabled`. -* `enabled` - Shows if project is active or it was disabled by the Selectel. - -* `all_quotas` - Contains all quotas. They can differ from the configurable `quota` - argument since the project will have all available resource quotas automatically applied. +* `all_quotas` - List of quotas. Can differ from the values that are set in the `quotas` block, if all available quotas for the project are automatically applied. ## Import -Projects can be imported using the `id`, e.g. +You can import a project: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN terraform import selectel_vpc_project_v2.project_1 0a343062504b4d06a0fac375e466db25 +terraform import selectel_vpc_project_v2.project_1 ``` + +where `` is a unique identifier of the Cloud Platform project, for example, `a07abc12310546f1b9291ab3013a7d75`. To get the ID, in the [Control panel](https://my.selectel.ru/vpc/), go to the **Cloud Platform** ⟶ project name ⟶ copy the ID of the required project. + +### Environment Variables + +For import, you must set the environment variable `SEL_TOKEN=`, + +where `` is a Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). diff --git a/website/docs/r/vpc_role_v2.html.markdown b/website/docs/r/vpc_role_v2.html.markdown index a1443e0a..6c113385 100644 --- a/website/docs/r/vpc_role_v2.html.markdown +++ b/website/docs/r/vpc_role_v2.html.markdown @@ -8,43 +8,41 @@ description: |- # selectel\_vpc\_role_v2 -Manages a V2 role resource within Selectel VPC. +Creates and manages a Project Administrator role for service users using public API v2. Selectel products support Identity and Access Management (IAM). For more information about roles, see the [official Selectel documentation](https://docs.selectel.ru/control-panel-actions/users-and-roles/user-types-and-roles/). + +The role is assigned to the service user information about whom is retrieved from the [selectel_vpc_user_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_user_v2) resource. ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_user_v2" "user_1" { - password = "secret" -} - -resource "selectel_vpc_role_v2" "role_tf_acc_test_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - user_id = "${selectel_vpc_user_v2.user_1.id}" +resource "selectel_vpc_role_v2" "role__1" { + project_id = selectel_vpc_project_v2.project_1.id + user_id = selectel_vpc_user_v2.user_1.id } ``` ## Argument Reference -The following arguments are supported: - -* `project_id` - (Required) An associated Selectel VPC project. Changing this - creates a new role. - -* `user_id` - (Required) An associated Selectel VPC user. Changing this - creates a new role. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new role. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -## Attributes Reference - -There are no additional attributes for this resource. +* `user_id` - (Required) Unique identifier of the associated service user. Changing this creates a new role. Retrieved from the [selectel_vpc_user_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_user_v2) resource. ## Import -Roles can be imported by specifying `project_id` and `user_id` arguments, -separated by a forward slash: +You can import a role: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN terraform import selectel_vpc_role_v2.role_1 / +terraform import selectel_vpc_role_v2.role_1 / ``` + +where: + +* `` — Unique identifier of the Cloud Platform project, for example, `a07abc12310546f1b9291ab3013a7d75`. To get the ID, in the [Control panel](https://my.selectel.ru/vpc/), go to the **Cloud Platform** ⟶ project name ⟶ copy the ID of the required project. + +* `` — Unique identifier of the associated service user, for example, `abc1bb378ac84e1234b869b77aadd2ab`. To get the ID, in the top right corner of the [Control panel](https://my.selectel.ru/), go to the account menu ⟶ **Profile and Settings** ⟶ **User management** ⟶ the **Service users** tab ⟶ copy the ID under the user name. + +### Environment Variables + +For import, you must set the environment variable `SEL_TOKEN=`, + +where `` is a Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). \ No newline at end of file diff --git a/website/docs/r/vpc_subnet_v2.html.markdown b/website/docs/r/vpc_subnet_v2.html.markdown index 177d08d4..cb4de15a 100644 --- a/website/docs/r/vpc_subnet_v2.html.markdown +++ b/website/docs/r/vpc_subnet_v2.html.markdown @@ -8,16 +8,13 @@ description: |- # selectel\_vpc\_subnet_v2 -Manages a V2 subnet resource within Selectel VPC. +Creates and manages a public subnet using public API v2. For more information about public subnets, see the [official Selectel documentation](https://docs.selectel.ru/cloud/servers/networks/about-networks/). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - resource "selectel_vpc_subnet_v2" "subnet_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" ip_version = "ipv4" prefix_length = 29 @@ -26,39 +23,44 @@ resource "selectel_vpc_subnet_v2" "subnet_1" { ## Argument Reference -The following arguments are supported: - -* `project_id` - (Required) An associated Selectel VPC project. Changing this - creates a new subnet. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new public subnet. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A region of where the subnet resides. Changing this - creates a new subnet. +* `region` - (Required) Pool where the public subnet is located, for example, `ru-3`. Changing this creates a new public subnet. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/). -* `prefix_length` - (Optional) A prefix length of the subnet. Defaults to 29. - Changing this creates a new subnet. +* `ip_version` - (Optional) Internet protocol version supported in the public subnet. The only available value is `ipv4`. -* `ip_version` - (Optional) A version of the IP protocol of the subnet. Defaults - to "ipv4". Changing this creates a new subnet. +* `prefix_length` - (Optional) Prefix length of the public subnet. The default value is `29`. Changing this creates a new public subnet. ## Attributes Reference -The following attributes are exported: +* `cidr` - CIDR of the public subnet. + +* `network_id` - Unique identifier of the associated OpenStack network. Learn more about the [openstack_networking_network_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_network_v2) resource in the official OpenStack documentation. + +* `subnet_id` - Unique identifier of the associated OpenStack subnet. Learn more about the [openstack_networking_subnet_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_subnet_v2) resource in the official OpenStack documentation. -* `cidr` - Shows subnet CIDR representation. +* `status` - Status of the public subnet. -* `network_id` - Shows associated OpenStack Networking service network ID. +* `servers` - List of the cloud servers that are located in the public subnet. -* `subnet_id` - Shows associated OpenStack Networking service subnet ID. + * `id` - Unique identifier of the cloud server. -* `status` - Shows if the subnet is used or not. + * `name` - Name of the cloud server. -* `servers` - Shows information about servers that use this subnet. Contains - `id`, `name` and `status` fields. + * `status` - Status of the cloud server. ## Import -Subnets can be imported using the `id`, e.g. +You can import a public subnet: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN terraform import selectel_vpc_subnet_v2.subnet_1 2060 +terraform import selectel_vpc_subnet_v2.subnet_1 ``` + +where `` is a unique identifier of the public subnet, for example, `2060`. To get the public subnet ID, use [Selectel Cloud Management API](https://developers.selectel.ru/docs/selectel-cloud-platform/main-services/selectel_cloud_management_api/). + +### Environment Variables + +For import, you must set the environment variable `SEL_TOKEN=`, + +where `` is a Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). diff --git a/website/docs/r/vpc_token_v2.html.markdown b/website/docs/r/vpc_token_v2.html.markdown index 5c983466..1e6b6e37 100644 --- a/website/docs/r/vpc_token_v2.html.markdown +++ b/website/docs/r/vpc_token_v2.html.markdown @@ -8,36 +8,18 @@ description: |- # selectel\_vpc\_token_v2 -Manages a V2 token resource within Selectel VPC. - -ID of this resource can be used within the OpenStack API Identity service as -the `X-Auth-Token` value. +Creates and manages a Cloud Platform Keystone token using public API v2. For more information about Cloud Platform Keystone tokens, see the [official Selectel documentation](https://developers.selectel.ru/docs/control-panel/authorization/#токен-для-облачной-платформы-selectel). ## Example Usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_token_v2" "token_tf_acc_test_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" +resource "selectel_vpc_token_v2" "token_1" { + project_id = selectel_vpc_project_v2.project_1.id } ``` ## Argument Reference -The following arguments are supported: - -* `project_id` - (Optional) An associated Selectel VPC project. Changing this - creates a new token. - -* `account_name` - (Optional) An associated Selectel VPC account. Changing this - creates a new token. - -## Attributes Reference - -There are no additional attributes for this resource. - -## Import +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new Cloud Platform Keystone token. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -Tokens can't be imported at this time. +* `account_name` - (Optional) Selectel account ID. Changing this creates a new Cloud Platform Keystone token. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). diff --git a/website/docs/r/vpc_user_v2.html.markdown b/website/docs/r/vpc_user_v2.html.markdown index 7e940896..77e77616 100644 --- a/website/docs/r/vpc_user_v2.html.markdown +++ b/website/docs/r/vpc_user_v2.html.markdown @@ -8,12 +8,18 @@ description: |- # selectel\_vpc\_user_v2 -Manages a V2 user resource within Selectel VPC. +Creates and manages a service user for Selectel products using public API v2. Selectel products support Identity and Access Management (IAM). For more information about service users, see the [official Selectel documentation](https://docs.selectel.ru/control-panel-actions/users-and-roles/user-types-and-roles/). + +When you create users, they do not have any roles. To grant a role, use the [selectel_vpc_role_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_role_v2) resource. + +~> **Note:** The user password is stored as raw data in a plain-text file. Learn more about [sensitive data in +state](https://developer.hashicorp.com/terraform/language/state/sensitive-data). ## Example Usage ```hcl resource "selectel_vpc_user_v2" "user_1" { + name = "username" password = "verysecret" enabled = true } @@ -21,21 +27,8 @@ resource "selectel_vpc_user_v2" "user_1" { ## Argument Reference -The following arguments are supported: - -* `name` - (Required) Name of the user. Changing this updates the name of the - existing user. - -* `password` - (Required) Password of the user. Changing this updates the - password of the existing user. - -* `enabled` - (Optional) Enabled state of the user. Changing this updates the - enabled state of the existing user. - -## Attributes Reference - -There are no additional attributes for this resource. +* `name` - (Required) Name of the service user. Changing this updates the name of the existing user. -## Import +* `password` - (Required, Sensitive) Password of the service user. Changing this updates the password of the existing user. -Users can't be imported at this time. +* `enabled` - (Optional) Specifies if you can create a Cloud Platform Keystone token for the user. Boolean flag, the default value is `true`. Learn more about [Cloud Platform Keystone tokens](https://developers.selectel.ru/docs/control-panel/authorization/#токен-для-облачной-платформы-selectel). From 61d17607223826b4e03e0b52f7d4586aceedd967 Mon Sep 17 00:00:00 2001 From: "iatchenko.d" Date: Wed, 16 Aug 2023 15:32:28 +0300 Subject: [PATCH 2/5] edits --- website/docs/r/mks_cluster_v1.html.markdown | 119 +++++++++++--------- 1 file changed, 66 insertions(+), 53 deletions(-) diff --git a/website/docs/r/mks_cluster_v1.html.markdown b/website/docs/r/mks_cluster_v1.html.markdown index 9db5edbc..318cb25b 100644 --- a/website/docs/r/mks_cluster_v1.html.markdown +++ b/website/docs/r/mks_cluster_v1.html.markdown @@ -8,92 +8,105 @@ description: |- # selectel\_mks\_cluster\_v1 -Manages a V1 cluster resource within Selectel Managed Kubernetes Service. +Creates and manages a Managed Kubernetes cluster using public API v1. For more information about Managed Kubernetes, see the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-kubernetes/). ## Example usage -```hcl -resource "selectel_vpc_project_v2" "project_1" { -} +### High availability cluster -resource "selectel_mks_cluster_v1" "cluster_1" { +```hcl +resource "selectel_mks_cluster_v1" "ha_cluster" { name = "cluster-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - kube_version = "1.16.8" + kube_version = data.selectel_mks_kube_versions_v1.versions.latest_version +} +``` + +### Basic cluster + +```hcl +resource "selectel_mks_cluster_v1" "basic_cluster" { + name = "cluster-1" + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + kube_version = data.selectel_mks_kube_versions_v1.versions.latest_version + zonal = true + enable_patch_version_auto_upgrade = false } ``` ## Argument Reference -The following arguments are supported: +* `name` - (Required) Cluster name. Changing this creates a new cluster. The cluster name is included into the names of the cluster entities: node groups, nodes, load balancers, networks, and volumes. -* `name` - (Required) The name of the cluster. - Changing this creates a new cluster. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new cluster. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new cluster. +* `region` - (Required) Pool where the cluster is located, for example, `ru-3`. Changing this creates a new cluster. In a pool, you can create two clusters for a project. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#managed-kubernetes). -* `region` - (Required) A Selectel VPC region of where the cluster is located. - Changing this creates a new cluster. +* `kube_version` - (Required) Kubernetes version of the cluster. Changing this upgrades the cluster version. You can retrieve information about the Kubernetes versions with the [selectel_mks_kube_versions_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/mks_kube_versions_v1) data source. + + To upgrade a patch version, the desired version should match the latest available patch version for the current minor release. + To upgrade a minor version, the desired version should match the next available minor release with the latest patch version. -* `kube_version` - (Required) The current Kubernetes version of the cluster. - Changing this upgrades the current version of the cluster. - To upgrade a patch version, the desired version should match the latest available patch version for - the current minor release. - To upgrade a minor version, the desired version should match the next available minor release with - the latest patch version. +* `zonal` - (Optional) Specifies a cluster type. Changing this creates a new cluster. + + Boolean flag: -* `enable_autorepair` - (Optional) Reflects if worker nodes are allowed to be reinstalled automatically. - Accepts true or false. Defaults to true. + * `false` (default) — for a high availability cluster with three master nodes located on different hosts in one pool segment. + * `true` — for a basic cluster with one master node. Set `enable_patch_version_auto_upgrade` to `false`. -* `enable_patch_version_auto_upgrade` - (Optional) Specifies if Kubernetes patch version of the cluster - is allowed to be upgraded automatically. - Accepts true or false. Defaults to true. - Should be explicitly set to false in case of zonal cluster. + Learn more about [Cluster types](https://docs.selectel.ru/cloud/managed-kubernetes/about/about-managed-kubernetes/#типы-кластера). -* `network_id` - (Optional) An associated OpenStack Networking service network ID. - Changing this creates a new cluster. +* `enable_autorepair` - (Optional) Enables or disables node auto-repairing (worker nodes are automatically restarted). Auto-repairing is not available if you have one worker node. After auto-repairing, all data on the boot volumes are deleted. Boolean flag, the default value is `true`. Learn more about [Nodes auto-repairing](https://docs.selectel.ru/cloud/managed-kubernetes/node-groups/reinstall-nodes/). -* `subnet_id` - (Optional) associated OpenStack Networking service subnet ID. - Changing this creates a new cluster. +* `enable_patch_version_auto_upgrade` - (Optional) Enables or disables auto-upgrading of the cluster to the latest available Kubernetes patch version during the maintenance window. Boolean flag, the default value is `true`. Must be set to false for basic clusters (if `zonal` is `true`). Learn more about [Patch versions auto-upgrading](https://docs.selectel.ru/cloud/managed-kubernetes/clusters/upgrade-version/). -* `maintenance_window_start` - (Optional) Represents UTC time in "hh:mm:ss" format of when the cluster - will start its maintenance tasks. - Changing this updates maintenance window start time. +* `network_id` - (Optional) Unique identifier of the associated OpenStack network. Changing this creates a new cluster. Learn more about the [openstack_networking_network_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_network_v2) resource in the official OpenStack documentation. -* `enable_pod_security_policy` - (Optional) Specifies if PodSecurityPolicy Kubernetes option has to be turned on/off. - Accepts true or false. Default is false. +* `subnet_id` - (Optional) Unique identifier of the associated OpenStack subnet. Changing this creates a new cluster. Learn more about the [openstack_networking_subnet_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_subnet_v2) resource in the official OpenStack documentation. -* `zonal` - (Optional) Specifies that only a single zonal master will be created. - It is needed if highly available control-plane is not required. - Accepts true or false. Defaults to false. - Argument "enable_patch_version_auto_upgrade" should be explicitly set to false in case of zonal cluster. - Changing this creates a new cluster. +* `maintenance_window_start` - (Optional) Time in UTC when maintenance in the cluster starts. The format is `hh:mm:ss`. Learn more about the [Maintenance window](https://docs.selectel.ru/cloud/managed-kubernetes/clusters/set-up-maintenance-window/). -* `feature_gates` - (Optional) Represents a set of feature gate names to be enabled in a Kubernetes cluster. +* `feature_gates` - (Optional) Enables or disables feature gates for the cluster. You can retrieve the list of available feature gates with the [selectel_mks_feature_gates_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/mks_feature_gates_v1) data source. Learn more about [Feature gates](https://docs.selectel.ru/cloud/managed-kubernetes/clusters/feature-gates/). -* `admission_controllers` - (Optional) Represents a set of admission controllers names to be enabled in a Kubernetes cluster. +* `admission_controllers` - (Optional) Enables or disables admission controllers for the cluster. You can retrieve the list of available admission controllers with the [selectel_mks_admission_controllers_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/mks_admission_controllers_v1) data source. Learn more about [Admission controllers](https://docs.selectel.ru/cloud/managed-kubernetes/clusters/admission-controllers/). -* `private_kube_api` - (Optional) Specifies if kube API should be available from the Internet or not. - When true kube API will be available only in clusters network. Default is false. - Changing this creates a new cluster. +* `private_kube_api` - (Optional) Specifies if Kube API is available from the Internet. Changing this creates a new cluster. -## Attributes Reference + Boolean flag: -The following attributes are exported: + * `false` (default) — Kube API is available from the Internet; + * `true` — Kube API is available only from the cluster network. -* `maintenance_window_end` - Shows UTC time in "hh:mm:ss" format of when the cluster - will end its maintenance tasks. +## Attributes Reference + +* `maintenance_window_end` - Time in UTC when maintenance in the cluster ends. The format is `hh:mm:ss`. Learn more about the [Maintenance window](https://docs.selectel.ru/cloud/managed-kubernetes/clusters/set-up-maintenance-window/). -* `kube_api_ip` - Shows the IP of the Kubernetes API. +* `kube_api_ip` - IP address of the Kube API. -* `status` - Shows the current status of the cluster. +* `status` - Cluster status. ## Import -Cluster can be imported using the `id`, e.g. +You can import a cluster: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_mks_cluster_v1.cluster_1 b311ce58-2658-46b5-b733-7a0f418703f2 +terraform import selectel_mks_cluster_v1.cluster_name ``` + +where `` is a unique identifier of the cluster, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the cluster ID, in the [Control panel](https://my.selectel.ru/vpc/mks/), go to **Cloud Platform** ⟶ **Kubernetes** ⟶ the cluster page ⟶ copy the ID at the top of the page under the cluster name, near the region and pool. + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file From 3adaabe0caf14eb32f28e4c6824b269d038890d9 Mon Sep 17 00:00:00 2001 From: "iatchenko.d" Date: Wed, 16 Aug 2023 15:37:46 +0300 Subject: [PATCH 3/5] edits --- .../r/dbaas_mysql_datastore_v1.html.markdown | 106 ++++++-------- ...baas_postgresql_datastore_v1.html.markdown | 134 +++++++++--------- .../r/dbaas_redis_datastore_v1.html.markdown | 108 ++++++-------- 3 files changed, 147 insertions(+), 201 deletions(-) diff --git a/website/docs/r/dbaas_mysql_datastore_v1.html.markdown b/website/docs/r/dbaas_mysql_datastore_v1.html.markdown index df2087bc..aead8214 100644 --- a/website/docs/r/dbaas_mysql_datastore_v1.html.markdown +++ b/website/docs/r/dbaas_mysql_datastore_v1.html.markdown @@ -8,105 +8,83 @@ description: |- # selectel\_dbaas\_mysql\_datastore\_v1 -Manages a V1 MySQL datastore resource within Selectel Managed Databases Service. +Creates and manages a MySQL datastore using public API v1. Applicable to MySQL sync and MySQL semi-sync datastores. For more information about Managed Databases, see the official Selectel documentation for [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/) and [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/). ## Example usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_subnet_v2" "subnet" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" -} - -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "mysql" - version = "8" - } -} - resource "selectel_dbaas_mysql_datastore_v1" "datastore_1" { - name = "datastore-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - subnet_id = "${selectel_vpc_subnet_v2.subnet.subnet_id}" - node_count = 3 + name = "datastore-1" + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + type_id = data.selectel_dbaas_datastore_type_v1.datastore_type_1.datastore_types[0].id + subnet_id = selectel_vpc_subnet_v2.subnet.subnet_id + node_count = 3 flavor { vcpus = 4 ram = 4096 disk = 32 } - config = { - innodb_checksum_algorithm = "strict_innodb" - auto_increment_offset = 2 - autocommit = false - } } ``` ## Argument Reference -The following arguments are supported: +* `name` - (Required) Datastore name. Changing this creates a new datastore. -* `name` - (Required) A name of the datastore. - Changing this creates a new datastore. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new datastore. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new datastore. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new datastore. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `region` - (Required) A Selectel VPC region of where the datastore is located. - Changing this creates a new datastore. +* `subnet_id` - (Required) Unique identifier of the associated OpenStack network. Changing this creates a new datastore. Learn more about the [openstack_networking_network_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_network_v2) resource in the official OpenStack documentation. + +* `type_id` - (Required) Unique identifier of the datastore type. Changing this creates a new datastore. Retrieved from the [selectel_dbaas_datastore_type_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_datastore_type_v1) data source. -* `subnet_id` - (Required) Associated OpenStack Networking service subnet ID. - Changing this creates a new datastore. +* `node_count` - (Required) Number of replicas in the datastore. Available values are `1` and `2`. Learn more about [Replication](https://docs.selectel.ru/cloud/managed-databases/about/about-managed-databases/#отказоустойчивость-и-репликация). -* `type_id` - (Required) The datastore type for the datastore. - Changing this creates a new datastore. +* `flavor_id` - (Optional) Unique identifier of the flavor for the datastore. Can be skipped when `flavor` is set. You can retrieve information about available flavors with the [selectel_dbaas_flavors_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_flavor_v1) data source. -* `node_count` - (Required) Number of nodes to create for the datastore. +* `flavor` - (Optional) Flavor configuration for the datastore. You can retrieve information about available flavors with the [selectel_dbaas_flavors_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_flavor_v1) data source. Learn more about available configurations for [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/configurations/) and [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/configurations/). -* `flavor_id` - (Optional) Flavor identifier for the datastore. It can be omitted in cases when `flavor` is set. + * `vcpus` - (Required) Number of vCPU cores. + * `ram` - (Required) Amount of RAM in MB. + * `disk` - (Required) Volume size in GB. -* `flavor` - (Optional) Flavor configuration for the datastore. It's a complex value. See description below. +* `firewall` - (Optional) List of IP-addresses with access to the datastore. -* `firewall` - (Optional) List of the ips to allow access from. +* `restore` - (Optional) Restores parameters for the datastore. Changing this creates a new datastore. -* `restore` - (Optional) Restore parameters for the datastore. It's a complex value. See description below. - Changing this creates a new datastore. + * `datastore_id` - (Optional) Unique identifier of the datastore from which you restore. To get the datastore ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. + * `target_time` - (Optional) Time within seven previous days when you have the datastore state to restore. -* `config` - (Optional) Configuration parameters for the datastore. +* `config` - (Optional) Configuration parameters for the datastore. You can retrieve information about available configuration parameters with the [selectel_dbaas_configuration_parameter_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_configuration_parameter_v1) data source. -* `backup_retention_days` - (Optional) Number of days to retain backups. +## Attributes Reference -**flavor** +* `status` - Datastore status. -- `vcpus` - (Required) CPU count for the flavor. -- `ram` - (Required) RAM count for the flavor. -- `disk` - (Required) Disk size for the flavor. +* `connections` - DNS addresses to connect to the datastore. -**restore** +## Import -- `datastore_id` - (Optional) - Datastore ID to restore from. -- `target_time` - (Optional) - Restore by the target time. +You can import a datastore: -## Attributes Reference +```shell +terraform import selectel_dbaas_mysql_datastore_v1.datastore_1 +``` -The following attributes are exported: +where `` is a unique identifier of the datastore, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the datastore ID in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. -* `status` - Shows the current status of the datastore. +### Environment Variables -* `connections` - Shows DNS connection strings for the datastore. +For import, you must set environment variables: -## Import +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` -Datastore can be imported using the `id`, e.g. +where: -```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_datastore_v1.datastore_1 b311ce58-2658-46b5-b733-7a0f418703f2 -``` +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_postgresql_datastore_v1.html.markdown b/website/docs/r/dbaas_postgresql_datastore_v1.html.markdown index c5e8f759..0ba01097 100644 --- a/website/docs/r/dbaas_postgresql_datastore_v1.html.markdown +++ b/website/docs/r/dbaas_postgresql_datastore_v1.html.markdown @@ -8,35 +8,20 @@ description: |- # selectel\_dbaas\_postgresql\_datastore\_v1 -Manages a V1 PostgreSQL datastore resource within Selectel Managed Databases Service. +Creates and manages a PostgreSQL datastore using public API v1. Applicable to PostgreSQL, PostgreSQL for 1C, and PostgreSQL TimescaleDB datastores. For more information about Managed Databases, see the official Selectel documentation for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/), and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/). ## Example usage -```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_subnet_v2" "subnet" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" -} - -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "postgresql" - version = "12" - } -} +### PostgreSQL and PostgreSQL TimescaleDB +```hcl resource "selectel_dbaas_postgresql_datastore_v1" "datastore_1" { - name = "datastore-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - subnet_id = "${selectel_vpc_subnet_v2.subnet.subnet_id}" - node_count = 3 + name = "datastore-1" + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + type_id = data.selectel_dbaas_datastore_type_v1.datastore_type_1.datastore_types[0].id + subnet_id = selectel_vpc_subnet_v2.subnet.subnet_id + node_count = 3 flavor { vcpus = 4 ram = 4096 @@ -46,80 +31,89 @@ resource "selectel_dbaas_postgresql_datastore_v1" "datastore_1" { mode = "transaction" size = 50 } - config = { - xmloption = "content" - work_mem = 512 - session_replication_role = "replica" - vacuum_cost_delay = 25 - transform_null_equals = false +} +``` + +### PostgreSQL for 1C + +```hcl +resource "selectel_dbaas_postgresql_datastore_v1" "datastore_1" { + name = "datastore-1" + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + type_id = data.selectel_dbaas_datastore_type_v1.datastore_type_1.datastore_types[0].id + subnet_id = selectel_vpc_subnet_v2.subnet.subnet_id + node_count = 3 + flavor { + vcpus = 4 + ram = 4096 + disk = 32 } } ``` ## Argument Reference -The following arguments are supported: +* `name` - (Required) Datastore name. Changing this creates a new datastore. -* `name` - (Required) A name of the datastore. - Changing this creates a new datastore. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new datastore. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new datastore. +* `region` - (Required) Pool where the datastore is located, for example, `ru-3`. Changing this creates a new datastore. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `region` - (Required) A Selectel VPC region of where the datastore is located. - Changing this creates a new datastore. +* `subnet_id` - (Required) Unique identifier of the associated OpenStack network. Changing this creates a new datastore. Learn more about the [openstack_networking_network_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_network_v2) resource in the official OpenStack documentation. + +* `type_id` - (Required) Unique identifier of the datastore type. Changing this creates a new datastore. Retrieved from the [selectel_dbaas_datastore_type_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_datastore_type_v1) data source. -* `subnet_id` - (Required) Associated OpenStack Networking service subnet ID. - Changing this creates a new datastore. +* `node_count` - (Required) Number of replicas in the datastore. The available range is from 1 to 6. Learn more about [Replication](https://docs.selectel.ru/cloud/managed-databases/about/about-managed-databases/#отказоустойчивость-и-репликация). -* `type_id` - (Required) The datastore type for the datastore. - Changing this creates a new datastore. +* `flavor_id` - (Optional) Unique identifier of the flavor for the datastore. Can be skipped when `flavor` is set. You can retrieve information about available flavors with the [selectel_dbaas_flavors_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_flavor_v1) data source. -* `node_count` - (Required) Number of nodes to create for the datastore. +* `flavor` - (Optional) Flavor configuration for the datastore. You can retrieve information about available flavors with the [selectel_dbaas_flavors_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_flavor_v1) data source. Learn more about available configurations for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/configurations/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/configurations-1c/), and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/configurations/). -* `flavor_id` - (Optional) Flavor identifier for the datastore. It can be omitted in cases when `flavor` is set. + * `vcpus` - (Required) Number of vCPU cores. + * `ram` - (Required) Amount of RAM in MB. + * `disk` - (Required) Volume size in GB. -* `flavor` - (Optional) Flavor configuration for the datastore. It's a complex value. See description below. +* `pooler` - (Optional) Configures a connection pooler for the datastore. Applicable to PostgreSQL and PostgreSQL TimescaleDB. -* `pooler` - (Optional) Pooler configuration for the datastore (only for PostgreSQL datastore). It's a complex value. See description below. + * `mode` - (Required) Pooling mode. Available values are `session`, `transaction`, and `statement`. The default value is `transaction.` Learn more about pooling modes for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/connection-pooler/#режимы-пулинга) and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/connection-pooler/#режимы-пулинга). + * `size` - (Required) Pool size. The available range is from 1 to 500. The default value is `30`. Learn more about pool size for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/connection-pooler/#размер-пула-pool_size) and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/connection-pooler/#размер-пула-pool_size). -* `firewall` - (Optional) List of the ips to allow access from. +* `firewall` - (Optional) List of IP-addresses with access to the datastore. -* `restore` - (Optional) Restore parameters for the datastore. It's a complex value. See description below. - Changing this creates a new datastore. +* `restore` - (Optional) Restores parameters for the datastore. Changing this creates a new datastore. -* `config` - (Optional) Configuration parameters for the datastore. + * `datastore_id` - (Optional) Unique identifier of the datastore from which you restore. To get the datastore ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. + * `target_time` - (Optional) Time within seven previous days when you have the datastore state to restore. -* `backup_retention_days` - (Optional) Number of days to retain backups. +* `config` - (Optional) Configuration parameters for the datastore. You can retrieve information about available configuration parameters with the [selectel_dbaas_configuration_parameter_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_configuration_parameter_v1) data source. -**flavor** - -- `vcpus` - (Required) CPU count for the flavor. -- `ram` - (Required) RAM count for the flavor. -- `disk` - (Required) Disk size for the flavor. +## Attributes Reference -**pooler** +* `status` - Datastore status. -- `mode` - (Required) Mode for the pooler. Valid values: ["session", "transaction", "statement"]. -- `size` - (Required) Size of the pooler. +* `connections` - DNS addresses to connect to the datastore. -**restore** +## Import -- `datastore_id` - (Optional) - Datastore ID to restore from. -- `target_time` - (Optional) - Restore by the target time. +You can import a datastore: -## Attributes Reference +```shell +terraform import selectel_dbaas_mysql_datastore_v1.datastore_1 +``` -The following attributes are exported: +where `` is a unique identifier of the datastore, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the datastore ID in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. -* `status` - Shows the current status of the datastore. +### Environment Variables -* `connections` - Shows DNS connection strings for the datastore. +For import, you must set environment variables: -## Import +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` -Datastore can be imported using the `id`, e.g. +where: -```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_datastore_v1.datastore_1 b311ce58-2658-46b5-b733-7a0f418703f2 -``` +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_redis_datastore_v1.html.markdown b/website/docs/r/dbaas_redis_datastore_v1.html.markdown index 9231599d..7b76a763 100644 --- a/website/docs/r/dbaas_redis_datastore_v1.html.markdown +++ b/website/docs/r/dbaas_redis_datastore_v1.html.markdown @@ -8,102 +8,76 @@ description: |- # selectel\_dbaas\_redis\_datastore\_v1 -Manages a V1 Redis datastore resource within Selectel Managed Databases Service. +Creates and manages a Redis datastore using public API v1. For more information about Managed Databases, see the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-databases/redis/). ## Example usage ```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_subnet_v2" "subnet" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" -} - -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "redis" - version = "6" - } -} - -data "selectel_dbaas_flavor_v1" "flavor" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - datastore_type_id = data.selectel_dbaas_datastore_type_v1.dt_redis.datastore_types[0].id - } -} - resource "selectel_dbaas_redis_datastore_v1" "datastore_1" { - name = "datastore-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - subnet_id = "${selectel_vpc_subnet_v2.subnet.subnet_id}" - node_count = 3 - flavor_id = data.selectel_dbaas_flavor_v1.flavor.flavors[0].id - config = { - maxmemory-policy = "allkeys-lru" - } + name = "datastore-1" + project_id = selectel_vpc_project_v2.project_1.id + region = "ru-3" + type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id + subnet_id = selectel_vpc_subnet_v2.subnet.subnet_id + node_count = 3 + flavor_id = data.selectel_dbaas_flavor_v1.flavor.flavors[0].id redis_password = "secret" } ``` ## Argument Reference -The following arguments are supported: - -* `name` - (Required) A name of the datastore. - Changing this creates a new datastore. +* `name` - (Required) Datastore name. Changing this creates a new datastore. -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new datastore. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new datastore. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region of where the datastore is located. - Changing this creates a new datastore. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new datastore. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/control-panel-actions/availability-matrix/#облачные-базы-данных). -* `subnet_id` - (Required) Associated OpenStack Networking service subnet ID. - Changing this creates a new datastore. +* `subnet_id` - (Required) Unique identifier of the associated OpenStack network. Changing this creates a new datastore. Learn more about the [openstack_networking_network_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_network_v2) resource in the official OpenStack documentation. -* `type_id` - (Required) The datastore type for the datastore. - Changing this creates a new datastore. +* `type_id` - (Required) Unique identifier of the datastore type. Changing this creates a new datastore. Retrieved from the [selectel_dbaas_datastore_type_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_datastore_type_v1) data source. -* `node_count` - (Required) Number of nodes to create for the datastore. +* `node_count` - (Required) Number of replicas in the datastore. Available values are `1` and `2`. Learn more about [Replication](https://docs.selectel.ru/cloud/managed-databases/about/about-managed-databases/#отказоустойчивость-и-репликация). -* `flavor_id` - (Required) Flavor identifier for the datastore. +* `flavor_id` - (Required) Unique identifier of the flavor for the datastore. Retrieved from the [selectel_dbaas_flavors_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_flavor_v1) data source. -* `firewall` - (Optional) List of the ips to allow access from. +* `firewall` - (Optional) List of IP-addresses with access to the datastore -* `restore` - (Optional) Restore parameters for the datastore. It's a complex value. See description below. - Changing this creates a new datastore. +* `restore` - (Optional) Restores parameters for the datastore. Changing this creates a new datastore. -* `config` - (Optional) Configuration parameters for the datastore. + * `datastore_id` - (Optional) Unique identifier of the datastore from which you restore. To get the datastore ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. + * `target_time` - (Optional) Time within seven previous days when you have the datastore state to restore. -* `backup_retention_days` - (Optional) Number of days to retain backups. +* `config` - (Optional) Configuration parameters for the datastore. You can retrieve information about available configuration parameters with the [selectel_dbaas_configuration_parameter_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_configuration_parameter_v1) data source. -* `redis_password` - (Required) Password for the Redis datastore - -**restore** - -- `datastore_id` - (Optional) - Datastore ID to restore from. -- `target_time` - (Optional) - Restore by the target time. +* `redis_password` - (Required, Sensitive) Datastore password. ## Attributes Reference -The following attributes are exported: - -* `status` - Shows the current status of the datastore. +* `status` - Datastore status. -* `connections` - Shows DNS connection strings for the datastore. +* `connections` - DNS addresses to connect to the datastore. ## Import -Datastore can be imported using the `id`, e.g. +You can import a datastore: ```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_datastore_v1.datastore_1 b311ce58-2658-46b5-b733-7a0f418703f2 +terraform import selectel_dbaas_redis_datastore_v1.datastore_1 ``` + +where `` is a unique identifier of the datastore, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the datastore ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. + +### Environment Variables + +For import, you must set environment variables: + +* `SEL_TOKEN=` +* `SEL_PROJECT_ID=` +* `SEL_REGION=` + +where: + +* `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). +* `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). +* `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file From c6395377046e2e365b8c4fda00ccd838f0d551d4 Mon Sep 17 00:00:00 2001 From: "iatchenko.d" Date: Fri, 18 Aug 2023 15:16:17 +0300 Subject: [PATCH 4/5] edits --- ...dbaas_available_extension_v1.html.markdown | 5 +- ...s_configuration_parameter_v1.html.markdown | 13 ++- .../d/dbaas_datastore_type_v1.html.markdown | 5 +- website/docs/d/dbaas_flavor_v1.html.markdown | 11 +- ...s_prometheus_metric_token_v1.html.markdown | 7 +- .../docs/d/domains_domain_v1.html.markdown | 2 +- ...mks_admission_controllers_v1.html.markdown | 3 +- .../docs/d/mks_feature_gates_v1.html.markdown | 3 +- .../docs/d/mks_kube_versions_v1.html.markdown | 2 +- .../docs/d/mks_kubeconfig_v1.html.markdown | 2 +- website/docs/index.html.markdown | 2 +- .../docs/r/craas_registry_v1.html.markdown | 7 +- website/docs/r/craas_token_v1.html.markdown | 2 +- website/docs/r/dbaas_grant_v1.html.markdown | 100 ++++-------------- .../r/dbaas_mysql_database_v1.html.markdown | 8 +- .../r/dbaas_mysql_datastore_v1.html.markdown | 9 +- ...dbaas_postgresql_database_v1.html.markdown | 6 +- ...baas_postgresql_datastore_v1.html.markdown | 10 +- ...gical_replication_slot_v1.html.markdown.md | 6 +- ...s_prometheus_metric_token_v1.html.markdown | 6 +- .../r/dbaas_redis_datastore_v1.html.markdown | 7 +- website/docs/r/dbaas_user_v1.html.markdown | 6 +- .../docs/r/domains_domain_v1.html.markdown | 2 +- .../docs/r/domains_record_v1.html.markdown | 2 +- website/docs/r/mks_cluster_v1.html.markdown | 9 +- website/docs/r/mks_nodegroup_v1.html.markdown | 7 +- .../docs/r/vpc_floatingip_v2.html.markdown | 2 +- website/docs/r/vpc_keypair_v2.html.markdown | 2 +- website/docs/r/vpc_license_v2.html.markdown | 2 +- website/docs/r/vpc_project_v2.html.markdown | 2 +- website/docs/r/vpc_role_v2.html.markdown | 2 +- website/docs/r/vpc_subnet_v2.html.markdown | 2 +- website/docs/r/vpc_token_v2.html.markdown | 2 +- website/docs/r/vpc_user_v2.html.markdown | 2 +- 34 files changed, 144 insertions(+), 114 deletions(-) diff --git a/website/docs/d/dbaas_available_extension_v1.html.markdown b/website/docs/d/dbaas_available_extension_v1.html.markdown index 4702987e..592a072d 100644 --- a/website/docs/d/dbaas_available_extension_v1.html.markdown +++ b/website/docs/d/dbaas_available_extension_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_available_extension_v1" sidebar_current: "docs-selectel-datasource-dbaas-available-extension-v1" description: |- - Get information on Selectel DBaaS available extensions. + Provides a list of extensions available for Selectel Managed Databases. --- # selectel\_dbaas\_available_extension_v1 @@ -34,6 +34,9 @@ data "selectel_dbaas_available_extension_v1" "available_extension_1" { * `available_extensions` - List of the available extensions: * `id` - Unique identifier of the extension. + * `name` - Extension name. + * `datastore_type_ids` - List of datastore types that support the extension. + * `dependency_ids` - List of extensions that depend on this extension. \ No newline at end of file diff --git a/website/docs/d/dbaas_configuration_parameter_v1.html.markdown b/website/docs/d/dbaas_configuration_parameter_v1.html.markdown index 762f2c17..48f56fb0 100644 --- a/website/docs/d/dbaas_configuration_parameter_v1.html.markdown +++ b/website/docs/d/dbaas_configuration_parameter_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_configuration_parameter_v1" sidebar_current: "docs-selectel-datasource-dbaas-configuration-parameter-v1" description: |- - Get information on Selectel DBaaS configuration parameters. + Provides a list of configuration parameters available for Selectel Managed Databases. --- # selectel\_dbaas\_configuration_parameter_v1 @@ -28,6 +28,7 @@ data "selectel_dbaas_configuration_parameter_v1" "configuration_parameter_1" { * `filter` - (Optional) Values to filter available extensions. * `datastore_type_id` - (Optional) Unique identifier of the datastore type for which you get configuration parameters. You can retrieve information about available datastore types with the [selectel_dbaas_datastore_type_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_datastore_type_v1) data source. + * `name` - (Optional) Name of the configuration parameter to search. ## Attributes Reference @@ -35,13 +36,23 @@ data "selectel_dbaas_configuration_parameter_v1" "configuration_parameter_1" { * `configuration_parameters` - List of available configuration parameters. * `id` - Unique identifier of the configuration parameter. + * `datastore_type_id` - Unique identifier of the datastore type for which the configuration parameter is available. + * `name` - Name of the configuration parameter. + * `type` - Type of the configuration parameter. + * `unit` - Unit of the configuration parameter. Might be empty. + * `min` - Minimum value of the configuration parameter. Might be empty. + * `max` - Maximum value of the configuration parameter. Might be empty. + * `default_value` - Default value of the configuration parameter. Might be empty. + * `choices` - Available choices for the configuration parameter. Some parameters have list of available options. + * `is_restart_required` - Shows if the database needs a restart to apply changes. + * `is_changeable` - Shows if the parameter can be changed. \ No newline at end of file diff --git a/website/docs/d/dbaas_datastore_type_v1.html.markdown b/website/docs/d/dbaas_datastore_type_v1.html.markdown index dd5372ea..a9f9f562 100644 --- a/website/docs/d/dbaas_datastore_type_v1.html.markdown +++ b/website/docs/d/dbaas_datastore_type_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_datastore_type_v1" sidebar_current: "docs-selectel-datasource-dbaas-datastore-type-v1" description: |- - Get information on Selectel DBaaS datastore types. + Provides a list of available datastore types in Selectel Managed Databases. --- # selectel\_dbaas\_datastore_type_v1 @@ -97,6 +97,7 @@ data "selectel_dbaas_datastore_type_v1" "dt" { * `filter` - (Optional) Values to filter available datastore types: * `engine` - (Optional) Engine of the datastore type to search. Available values are `postgresql` (for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/)), `mysql` (for [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/)), `mysql_native` (for [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/)), and `redis`(for [Redis](https://docs.selectel.ru/cloud/managed-databases/redis/)). + * `version` - (Optional) Version of the datastore type to search. For PostgreSQL for 1C, the versions are in the format `-1C`. For PostgreSQL TimescaleDB, the versions are in the format `-TimescaleDB`. Learn more about available versions for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/configurations/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/configurations-1c/), [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/configurations/), [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/configurations/), [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/configurations/), and [Redis](https://docs.selectel.ru/cloud/managed-databases/redis/configurations/). ## Attributes Reference @@ -104,5 +105,7 @@ data "selectel_dbaas_datastore_type_v1" "dt" { * `datastore_types` - List of available datastore types. * `id` - ID of the datastore type. + * `engine` - Engine of the datastore type. + * `version` - Version of the datastore type. \ No newline at end of file diff --git a/website/docs/d/dbaas_flavor_v1.html.markdown b/website/docs/d/dbaas_flavor_v1.html.markdown index c50a1334..27fbf72e 100644 --- a/website/docs/d/dbaas_flavor_v1.html.markdown +++ b/website/docs/d/dbaas_flavor_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_flavor_v1" sidebar_current: "docs-selectel-datasource-dbaas-flavor-v1" description: |- - Get information on Selectel DBaaS flavors. + Provides a list of flavors available in Selectel Managed Databases. --- # selectel\_dbaas\_flavors_v1 @@ -28,8 +28,11 @@ data "selectel_dbaas_flavor_v1" "flavor" { * `filter` - (Optional) Values to filter available flavors: * `vcpus` - (Optional) Number of vCPU cores. + * `ram` - (Optional) Amount of RAM in MB. + * `disk` - (Optional) Volume size in GB. + * `datastore_type_id` - (Optional) Unique identifier of the datastore type. ## Attributes Reference @@ -37,9 +40,15 @@ data "selectel_dbaas_flavor_v1" "flavor" { * `flavors` - List of available flavors. * `id` - Unique identifier of the flavor. + * `name` - Flavor name. + * `description` - Flavor description. + * `vcpus` - Number of vCPU cores. + * `ram` - Amount of RAM in MB. + * `disk` - Volume size in GB. + * `datastore_type_ids` - List of datastore types that support this flavor. \ No newline at end of file diff --git a/website/docs/d/dbaas_prometheus_metric_token_v1.html.markdown b/website/docs/d/dbaas_prometheus_metric_token_v1.html.markdown index 01803b50..1ee75160 100644 --- a/website/docs/d/dbaas_prometheus_metric_token_v1.html.markdown +++ b/website/docs/d/dbaas_prometheus_metric_token_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_prometheus_metric_token_v1" sidebar_current: "docs-selectel-datasource-dbaas-prometheus-metric-token-v1" description: |- - Get information on Selectel DBaaS prometheus metrics tokens. + Provides a list of tokens for Prometheus available in Selectel Managed Databases. --- # selectel\_dbaas\_prometheus_metric_token_v1 @@ -30,8 +30,13 @@ data "selectel_dbaas_prometheus_metric_token_v1" "token_1" { * `prometheus_metrics_tokens` - List of tokens for Prometheus. * `id` - Unique identifier of the token. + * `created_at` - Time when the token was created. + * `updated_at` - Time when the token was updated. + * `project_id` - Unique identifier of the associated Cloud Platform project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-databases/about/projects/). + * `name` - Token name. + * `value` - Token value. \ No newline at end of file diff --git a/website/docs/d/domains_domain_v1.html.markdown b/website/docs/d/domains_domain_v1.html.markdown index 5d62857e..edcba2bf 100644 --- a/website/docs/d/domains_domain_v1.html.markdown +++ b/website/docs/d/domains_domain_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_domains_domain_v1" sidebar_current: "docs-selectel-datasource-domains-domain-v1" description: |- - Get information on Selectel Domains domain. + Provides an ID of a domain in Selectel DNS Hosting. --- # selectel\_domains\_domain_v1 diff --git a/website/docs/d/mks_admission_controllers_v1.html.markdown b/website/docs/d/mks_admission_controllers_v1.html.markdown index 8927a0bc..824ba04c 100644 --- a/website/docs/d/mks_admission_controllers_v1.html.markdown +++ b/website/docs/d/mks_admission_controllers_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_mks_admission_controllers_v1" sidebar_current: "docs-selectel-datasource-mks-admission-controllers-v1" description: |- - Get information on Selectel MKS available admission controllers. + Provides a list of admission controllers available in Selectel Managed Kubernetes. --- # selectel\_mks\_admission_controllers_v1 @@ -34,4 +34,5 @@ data "selectel_mks_admission_controllers_v1" "admission_controllers_1" { * `admission_controllers` - List of available admission controllers. * `kube_version` - Kubernetes version. + * `names` - Names of the admission controllers available for the specified Kubernetes version. \ No newline at end of file diff --git a/website/docs/d/mks_feature_gates_v1.html.markdown b/website/docs/d/mks_feature_gates_v1.html.markdown index c35eb4ba..b67f5781 100644 --- a/website/docs/d/mks_feature_gates_v1.html.markdown +++ b/website/docs/d/mks_feature_gates_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_mks_feature_gates_v1" sidebar_current: "docs-selectel-datasource-mks-feature-gates-v1" description: |- - Get information on Selectel MKS available feature gates. + Provides a list of feature gates available in Selectel Managed Kubernetes. --- # selectel\_mks\_feature_gates_v1 @@ -34,4 +34,5 @@ data "selectel_mks_feature_gates_v1" "fg" { * `feature_gates` - List of available feature gates. * `kube_version` - Kubernetes version. + * `names` - Names of the feature gates available for the specified version. \ No newline at end of file diff --git a/website/docs/d/mks_kube_versions_v1.html.markdown b/website/docs/d/mks_kube_versions_v1.html.markdown index 16fb2fce..7af891f2 100644 --- a/website/docs/d/mks_kube_versions_v1.html.markdown +++ b/website/docs/d/mks_kube_versions_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_mks_kube_versions_v1" sidebar_current: "docs-selectel-datasource-mks-kube-versions-v1" description: |- -Get all supported kube versions for a Selectel Managed Kubernetes cluster. + Provides a list of Kubernetes versions supported in a Selectel Managed Kubernetes cluster. --- # selectel\_mks\_kube_versions_v1 diff --git a/website/docs/d/mks_kubeconfig_v1.html.markdown b/website/docs/d/mks_kubeconfig_v1.html.markdown index 1e44b254..58042683 100644 --- a/website/docs/d/mks_kubeconfig_v1.html.markdown +++ b/website/docs/d/mks_kubeconfig_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_mks_kubeconfig_v1" sidebar_current: "docs-selectel-datasource-mks-kubeconfig-v1" description: |- - Get kubeconfig for a Selectel Managed Kubernetes cluster. + Provides a kubeconfig file and its fields for a Selectel Managed Kubernetes cluster. --- # selectel\_mks\_kubeconfig_v1 diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 2a670d18..f5f4a47d 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Provider: Selectel" sidebar_current: "docs-selectel-index" description: |- - The Selectel provider is used to interact with the Selectel resources. The provider needs the Selectel API key token to authorize its requests. + Use the Selectel provider to interact with Selectel products. --- # Selectel provider diff --git a/website/docs/r/craas_registry_v1.html.markdown b/website/docs/r/craas_registry_v1.html.markdown index 1e6766af..4fb21cd0 100644 --- a/website/docs/r/craas_registry_v1.html.markdown +++ b/website/docs/r/craas_registry_v1.html.markdown @@ -3,13 +3,12 @@ layout: "selectel" page_title: "Selectel: selectel_craas_registry_v1" sidebar_current: "docs-selectel-resource-craas-registry-v1" description: |- -Manages a V1 registry resource within Selectel Container Registry Service. + Creates and manages a registry in Selectel Container Registry using public API v1. --- # selectel\_craas\_registry\_v1 -Creates and manages a registry in Container Registry using public API v1. For more information about Container Registry, see the [official Selectel documentation](https://docs.selectel.ru/cloud/craas/). - +Creates and manages a registry in Container Registry using public API v1. For more information about Container Registry, see the [official Selectel documentation](https://docs.selectel.ru/cloud/craas/). ## Example usage @@ -47,9 +46,11 @@ where `` is a unique identifier of the registry, for example, `9395 For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). \ No newline at end of file diff --git a/website/docs/r/craas_token_v1.html.markdown b/website/docs/r/craas_token_v1.html.markdown index d0f24606..083d4427 100644 --- a/website/docs/r/craas_token_v1.html.markdown +++ b/website/docs/r/craas_token_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_craas_token_v1" sidebar_current: "docs-selectel-resource-craas-token-v1" description: |- -Manages a V1 token resource within Selectel Container Registry Service. + Creates and manages tokens in Selectel Container Registry using public API v1. --- # selectel\_craas\_token\_v1 diff --git a/website/docs/r/dbaas_grant_v1.html.markdown b/website/docs/r/dbaas_grant_v1.html.markdown index af05efd7..678fc2a3 100644 --- a/website/docs/r/dbaas_grant_v1.html.markdown +++ b/website/docs/r/dbaas_grant_v1.html.markdown @@ -3,107 +3,51 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_grant_v1" sidebar_current: "docs-selectel-resource-dbaas-grant-v1" description: |- - Manages a V1 grant resource within Selectel Managed Databases Service. + Grants privileges to the users in Selectel Managed Databases using public API v1. --- # selectel\_dbaas\_grant\_v1 -Manages a V1 grant resource within Selectel Managed Databases Service. +Grants privileges to the users in Managed Databases using public API v1. Not applicable to Redis. Learn more about Managed Databases in the [official Selectel documentation](https://docs.selectel.ru/cloud/managed-databases/). ## Example usage -```hcl -resource "selectel_vpc_project_v2" "project_1" { -} - -resource "selectel_vpc_subnet_v2" "subnet" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" -} - -data "selectel_dbaas_datastore_type_v1" "dt" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - filter { - engine = "postgresql" - version = "12" - } -} - -resource "selectel_dbaas_datastore_v1" "datastore_1" { - name = "datastore-1" - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - type_id = data.selectel_dbaas_datastore_type_v1.dt.datastore_types[0].id - subnet_id = "${selectel_vpc_subnet_v2.subnet.subnet_id}" - node_count = 3 - flavor { - vcpus = 4 - ram = 4096 - disk = 32 - } - pooler { - mode = "transaction" - size = 50 - } -} +### PostgreSQL, PostgreSQL for 1C, and PostgreSQL TimescaleDB -resource "selectel_dbaas_user_v1" "user_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" +```hcl +resource "selectel_dbaas_grant_v1" "grant_1" { + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - datastore_id = "${selectel_dbaas_datastore_v1.datastore_1.id}" - name = "user" - password = "secret" + datastore_id = selectel_dbaas_postgresql_datastore_v1.datastore_1.id + database_id = selectel_dbaas_postgresql_database_v1.database_1.id + user_id = selectel_dbaas_user_v1.user_1.id } +``` -resource "selectel_dbaas_database_v1" "database_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" - region = "ru-3" - datastore_id = "${selectel_dbaas_datastore_v1.datastore_1.id}" - owner_id = "${selectel_dbaas_user_v1.user_1.id}" - name = "db" - lc_ctype = "ru_RU.utf8" - lc_collate = "ru_RU.utf8" -} +### MySQL semi-sync and MySQL sync +```hcl resource "selectel_dbaas_grant_v1" "grant_1" { - project_id = "${selectel_vpc_project_v2.project_1.id}" + project_id = selectel_vpc_project_v2.project_1.id region = "ru-3" - datastore_id = "${selectel_dbaas_datastore_v1.datastore_1.id}" - database_id = "${selectel_dbaas_database_v1.database_1.id}" - user_id = "${selectel_dbaas_user_v1.user_1.id}" + datastore_id = selectel_dbaas_mysql_datastore_v1.datastore_1.id + database_id = selectel_dbaas_mysql_database_v1.database_1.id + user_id = selectel_dbaas_user_v1.user_1.id } ``` ## Argument Reference -The following arguments are supported: - -* `project_id` - (Required) An associated Selectel VPC project. - Changing this creates a new grant. +* `project_id` - (Required) Unique identifier of the associated Cloud Platform project. Changing this creates a new privilege for the user. Retrieved from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/servers/about/projects/). -* `region` - (Required) A Selectel VPC region of where the database is located. - Changing this creates a new grant. +* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new privilege for the user. -* `datastore_id` - (Required) An associated datastore. - Changing this creates a new grant. +* `datastore_id` - (Required) Unique identifier of the associated datastore. Changing this creates a new privilege for the user. Retrieved from the [selectel_dbaas_postgresql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_postgresql_datastore_v1) or [selectel_dbaas_mysql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_mysql_datastore_v1) resource depending on the datastore type you use. -* `database_id` - (Required) An associated database. - Changing this creates a new grant. +* `database_id` - (Required) Unique identifier of the associated database. Changing this creates a new privilege for the user. Retrieved from the [selectel_dbaas_postgresql_database_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_postgresql_database_v1) or [selectel_dbaas_mysql_database_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_mysql_database_v1) resource depending on the datastore type you use. -* `user_id` - (Required) An associated user. - Changing this creates a new grant. +* `user_id` - (Required) Unique identifier of the associated user. Changing this creates a new privilege for the user. Retrieved from the [selectel_dbaas_user_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_user_v1) resource. ## Attributes Reference -The following attributes are exported: - -* `status` - Shows the current status of the grant. - -## Import - -Grant can be imported using the `id`, e.g. - -```shell -$ env SEL_TOKEN=SELECTEL_API_TOKEN SEL_PROJECT_ID=SELECTEL_VPC_PROJECT_ID SEL_REGION=SELECTEL_VPC_REGION terraform import selectel_dbaas_grant_v1.grant_1 b311ce58-2658-46b5-b733-7a0f418703f2 -``` +* `status` - Status of the user privilege. \ No newline at end of file diff --git a/website/docs/r/dbaas_mysql_database_v1.html.markdown b/website/docs/r/dbaas_mysql_database_v1.html.markdown index 09117e6f..6a85ff7f 100644 --- a/website/docs/r/dbaas_mysql_database_v1.html.markdown +++ b/website/docs/r/dbaas_mysql_database_v1.html.markdown @@ -3,12 +3,12 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_mysql_database_v1" sidebar_current: "docs-selectel-resource-dbaas-mysql-database-v1" description: |- - Manages a V1 MySQL database resource within Selectel Managed Databases Service. + Creates and manages a MySQL database in Selectel Managed Databases using public API v1. --- # selectel\_dbaas\_mysql\_database\_v1 -Creates and manages a MySQL database using public API v1. Applicable to MySQL sync and MySQL semi-sync datastores, the type is determined by the [selectel_dbaas_mysql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_mysql_datastore_v1) resource. For more information about MySQL databases, see the official Selectel documentation for [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/) and [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/). +Creates and manages a MySQL database using public API v1. Applicable to MySQL sync and MySQL semi-sync datastores, the type is determined by the [selectel_dbaas_mysql_datastore_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/dbaas_mysql_datastore_v1) resource. For more information about MySQL databases, see the official Selectel documentation for [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/) and [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/). ## Example usage @@ -50,11 +50,15 @@ where `` is a unique identifier of the database, for example, `b311 For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_mysql_datastore_v1.html.markdown b/website/docs/r/dbaas_mysql_datastore_v1.html.markdown index aead8214..94b270cc 100644 --- a/website/docs/r/dbaas_mysql_datastore_v1.html.markdown +++ b/website/docs/r/dbaas_mysql_datastore_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_mysql_datastore_v1" sidebar_current: "docs-selectel-resource-dbaas-mysql-datastore-v1" description: |- - Manages a V1 MySQL datastore resource within Selectel Managed Databases Service. + Creates and manages a MySQL datastore in Selectel Managed Databases using public API v1. --- # selectel\_dbaas\_mysql\_datastore\_v1 @@ -47,7 +47,9 @@ resource "selectel_dbaas_mysql_datastore_v1" "datastore_1" { * `flavor` - (Optional) Flavor configuration for the datastore. You can retrieve information about available flavors with the [selectel_dbaas_flavors_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_flavor_v1) data source. Learn more about available configurations for [MySQL sync](https://docs.selectel.ru/cloud/managed-databases/mysql-sync/configurations/) and [MySQL semi-sync](https://docs.selectel.ru/cloud/managed-databases/mysql-semi-sync/configurations/). * `vcpus` - (Required) Number of vCPU cores. + * `ram` - (Required) Amount of RAM in MB. + * `disk` - (Required) Volume size in GB. * `firewall` - (Optional) List of IP-addresses with access to the datastore. @@ -55,6 +57,7 @@ resource "selectel_dbaas_mysql_datastore_v1" "datastore_1" { * `restore` - (Optional) Restores parameters for the datastore. Changing this creates a new datastore. * `datastore_id` - (Optional) Unique identifier of the datastore from which you restore. To get the datastore ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. + * `target_time` - (Optional) Time within seven previous days when you have the datastore state to restore. * `config` - (Optional) Configuration parameters for the datastore. You can retrieve information about available configuration parameters with the [selectel_dbaas_configuration_parameter_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_configuration_parameter_v1) data source. @@ -80,11 +83,15 @@ where `` is a unique identifier of the datastore, for example, `b3 For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_postgresql_database_v1.html.markdown b/website/docs/r/dbaas_postgresql_database_v1.html.markdown index 158f02c6..8a9873a6 100644 --- a/website/docs/r/dbaas_postgresql_database_v1.html.markdown +++ b/website/docs/r/dbaas_postgresql_database_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_postgresql_database_v1" sidebar_current: "docs-selectel-resource-dbaas-postgresql-database-v1" description: |- - Manages a V1 PostgreSQL database resource within Selectel Managed Databases Service. + Creates and manages a PostgreSQL database in Selectel Managed Databases using public API v1. --- # selectel\_dbaas\_postgresql\_database\_v1 @@ -61,11 +61,15 @@ where `` is a unique identifier of the database, for example, `b311 For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_postgresql_datastore_v1.html.markdown b/website/docs/r/dbaas_postgresql_datastore_v1.html.markdown index 0ba01097..6e9e8472 100644 --- a/website/docs/r/dbaas_postgresql_datastore_v1.html.markdown +++ b/website/docs/r/dbaas_postgresql_datastore_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_postgresql_datastore_v1" sidebar_current: "docs-selectel-resource-dbaas-postgresql-datastore-v1" description: |- - Manages a V1 PostgreSQL datastore resource within Selectel Managed Databases Service. + Creates and manages a PostgreSQL datastore in Selectel Managed Databases using public API v1. --- # selectel\_dbaas\_postgresql\_datastore\_v1 @@ -71,12 +71,15 @@ resource "selectel_dbaas_postgresql_datastore_v1" "datastore_1" { * `flavor` - (Optional) Flavor configuration for the datastore. You can retrieve information about available flavors with the [selectel_dbaas_flavors_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_flavor_v1) data source. Learn more about available configurations for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/configurations/), [PostgreSQL for 1C](https://docs.selectel.ru/cloud/managed-databases/postgresql-for-1c/configurations-1c/), and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/configurations/). * `vcpus` - (Required) Number of vCPU cores. + * `ram` - (Required) Amount of RAM in MB. + * `disk` - (Required) Volume size in GB. * `pooler` - (Optional) Configures a connection pooler for the datastore. Applicable to PostgreSQL and PostgreSQL TimescaleDB. * `mode` - (Required) Pooling mode. Available values are `session`, `transaction`, and `statement`. The default value is `transaction.` Learn more about pooling modes for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/connection-pooler/#режимы-пулинга) and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/connection-pooler/#режимы-пулинга). + * `size` - (Required) Pool size. The available range is from 1 to 500. The default value is `30`. Learn more about pool size for [PostgreSQL](https://docs.selectel.ru/cloud/managed-databases/postgresql/connection-pooler/#размер-пула-pool_size) and [PostgreSQL TimescaleDB](https://docs.selectel.ru/cloud/managed-databases/timescaledb/connection-pooler/#размер-пула-pool_size). * `firewall` - (Optional) List of IP-addresses with access to the datastore. @@ -84,6 +87,7 @@ resource "selectel_dbaas_postgresql_datastore_v1" "datastore_1" { * `restore` - (Optional) Restores parameters for the datastore. Changing this creates a new datastore. * `datastore_id` - (Optional) Unique identifier of the datastore from which you restore. To get the datastore ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. + * `target_time` - (Optional) Time within seven previous days when you have the datastore state to restore. * `config` - (Optional) Configuration parameters for the datastore. You can retrieve information about available configuration parameters with the [selectel_dbaas_configuration_parameter_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_configuration_parameter_v1) data source. @@ -109,11 +113,15 @@ where `` is a unique identifier of the datastore, for example, `b3 For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md b/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md index d359f84d..2c536222 100644 --- a/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md +++ b/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_postgresql_logical_replication_slot_v1" sidebar_current: "docs-selectel-resource-dbaas-postgresql-logical-replication-slot-v1" description: |- - Manages a V1 PostgreSQL logical replication slot resource within Selectel Managed Databases Service. + Creates and manages a logical replication slot in Selectel Managed Databases using public API v1. --- # selectel\_dbaas\_postgresql\_logical\_replication\_slot\_v1 @@ -53,11 +53,15 @@ where `` is a unique identifier of the replication slot, fo For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_prometheus_metric_token_v1.html.markdown b/website/docs/r/dbaas_prometheus_metric_token_v1.html.markdown index 56a9b7d7..46551479 100644 --- a/website/docs/r/dbaas_prometheus_metric_token_v1.html.markdown +++ b/website/docs/r/dbaas_prometheus_metric_token_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_prometheus_metric_token_v1" sidebar_current: "docs-selectel-resource-dbaas-prometheus-metric-token-v1" description: |- - Manages a V1 prometheus metrics tokens resource within Selectel Managed Databases Service. + Creates and manages tokens in Selectel Managed Databases required to get access to the metrics in the Prometheus format using public API v1. --- # selectel\_dbaas\_prometheus_metric_token_v1 @@ -47,11 +47,15 @@ where `` is a unique identifier of the token, for example, `b311ce58-2 For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_redis_datastore_v1.html.markdown b/website/docs/r/dbaas_redis_datastore_v1.html.markdown index 7b76a763..66eeea7d 100644 --- a/website/docs/r/dbaas_redis_datastore_v1.html.markdown +++ b/website/docs/r/dbaas_redis_datastore_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_redis_datastore_v1" sidebar_current: "docs-selectel-resource-dbaas-redis-datastore-v1" description: |- - Manages a V1 Redis datastore resource within Selectel Managed Databases Service. + Creates and manages a Redis datastore in Selectel Managed Databases using public API v1. --- # selectel\_dbaas\_redis\_datastore\_v1 @@ -46,6 +46,7 @@ resource "selectel_dbaas_redis_datastore_v1" "datastore_1" { * `restore` - (Optional) Restores parameters for the datastore. Changing this creates a new datastore. * `datastore_id` - (Optional) Unique identifier of the datastore from which you restore. To get the datastore ID, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases** ⟶ copy the ID under the cluster name. + * `target_time` - (Optional) Time within seven previous days when you have the datastore state to restore. * `config` - (Optional) Configuration parameters for the datastore. You can retrieve information about available configuration parameters with the [selectel_dbaas_configuration_parameter_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/dbaas_configuration_parameter_v1) data source. @@ -73,11 +74,15 @@ where `` is a unique identifier of the datastore, for example, `b3 For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/dbaas_user_v1.html.markdown b/website/docs/r/dbaas_user_v1.html.markdown index 13b4e854..a18b4e3d 100644 --- a/website/docs/r/dbaas_user_v1.html.markdown +++ b/website/docs/r/dbaas_user_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_dbaas_user_v1" sidebar_current: "docs-selectel-resource-dbaas-user-v1" description: |- - Manages a V1 user resource within Selectel Managed Databases Service. + Creates and manages a user in Selectel Managed Databases using public API v1. --- # selectel\_dbaas\_user\_v1 @@ -67,11 +67,15 @@ where `` is a unique identifier of the user, for example, `b311ce58-265 For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/domains_domain_v1.html.markdown b/website/docs/r/domains_domain_v1.html.markdown index f90303c1..d9c174e4 100644 --- a/website/docs/r/domains_domain_v1.html.markdown +++ b/website/docs/r/domains_domain_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_domains_domain_v1" sidebar_current: "docs-selectel-resource-domains-domain-v1" description: |- - Manages a V1 domain resource within Selectel Domains API Service. + Creates and manages a domain in Selectel DNS Hosting using public API v1. --- # selectel\_domains\_domain\_v1 diff --git a/website/docs/r/domains_record_v1.html.markdown b/website/docs/r/domains_record_v1.html.markdown index cf6b9d3c..d68b9c0a 100644 --- a/website/docs/r/domains_record_v1.html.markdown +++ b/website/docs/r/domains_record_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_domains_record_v1" sidebar_current: "docs-selectel-resource-domains-record-v1" description: |- - Manages a V1 record resource within Selectel Domains API Service. + Creates and manages a record in Selectel DNS Hosting using public API v1. --- # selectel\_domains\_record\_v1 diff --git a/website/docs/r/mks_cluster_v1.html.markdown b/website/docs/r/mks_cluster_v1.html.markdown index 318cb25b..8a9d1330 100644 --- a/website/docs/r/mks_cluster_v1.html.markdown +++ b/website/docs/r/mks_cluster_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_mks_cluster_v1" sidebar_current: "docs-selectel-resource-mks-cluster-v1" description: |- - Manages a V1 cluster resource within Selectel Managed Kubernetes Service. + Creates and manages a cluster in Selectel Managed Kubernetes using public API v1. --- # selectel\_mks\_cluster\_v1 @@ -47,6 +47,7 @@ resource "selectel_mks_cluster_v1" "basic_cluster" { * `kube_version` - (Required) Kubernetes version of the cluster. Changing this upgrades the cluster version. You can retrieve information about the Kubernetes versions with the [selectel_mks_kube_versions_v1](https://registry.terraform.io/providers/selectel/selectel/latest/docs/data-sources/mks_kube_versions_v1) data source. To upgrade a patch version, the desired version should match the latest available patch version for the current minor release. + To upgrade a minor version, the desired version should match the next available minor release with the latest patch version. * `zonal` - (Optional) Specifies a cluster type. Changing this creates a new cluster. @@ -54,6 +55,7 @@ resource "selectel_mks_cluster_v1" "basic_cluster" { Boolean flag: * `false` (default) — for a high availability cluster with three master nodes located on different hosts in one pool segment. + * `true` — for a basic cluster with one master node. Set `enable_patch_version_auto_upgrade` to `false`. Learn more about [Cluster types](https://docs.selectel.ru/cloud/managed-kubernetes/about/about-managed-kubernetes/#типы-кластера). @@ -77,6 +79,7 @@ resource "selectel_mks_cluster_v1" "basic_cluster" { Boolean flag: * `false` (default) — Kube API is available from the Internet; + * `true` — Kube API is available only from the cluster network. ## Attributes Reference @@ -102,11 +105,15 @@ where `` is a unique identifier of the cluster, for example, `b311ce For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/mks_nodegroup_v1.html.markdown b/website/docs/r/mks_nodegroup_v1.html.markdown index 1ceb4a7c..46552080 100644 --- a/website/docs/r/mks_nodegroup_v1.html.markdown +++ b/website/docs/r/mks_nodegroup_v1.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_mks_nodegroup_v1" sidebar_current: "docs-selectel-resource-mks-nodegroup-v1" description: |- - Manages a V1 nodegroup resource within Selectel Managed Kubernetes Service. + Creates and manages a node group in Selectel Managed Kubernetes using public API v1. --- # selectel\_mks\_nodegroup\_v1 @@ -100,6 +100,7 @@ terraform import selectel_mks_nodegroup_v1.nodegroup_1 /` — Unique identifier of the cluster, for example, `b311ce58-2658-46b5-b733-7a0f418703f2`. To get the cluster ID, in the [Control panel](https://my.selectel.ru/vpc/mks/), go to **Cloud Platform** ⟶ **Kubernetes** ⟶ the cluster page ⟶ copy the ID at the top of the page under the cluster name, near the region and pool. + * `` — Unique identifier of the node, for example, `63ed5342-b22c-4c7a-9d41-c1fe4a142c13`. To get the cluster ID, in the [Control panel](https://my.selectel.ru/vpc/mks/), go to **Cloud Platform** ⟶ **Kubernetes**. Click the required cluster ⟶ the required node group. The node group ID is at the top of the page under the node group name, near the region and pool. ### Environment Variables @@ -107,11 +108,15 @@ where: For import, you must set environment variables: * `SEL_TOKEN=` + * `SEL_PROJECT_ID=` + * `SEL_REGION=` where: * `` — Selectel token. To get the token, in the top right corner of the [Control panel](https://my.selectel.ru/profile/apikeys), go to the account menu ⟶ **Profile and Settings** ⟶ **API keys** ⟶ copy the token. Learn more about [Selectel token](https://developers.selectel.ru/docs/control-panel/authorization/#получить-токен-selectel). + * `` — Unique identifier of the associated Cloud Platform project. To get the project ID, in the [Control panel](https://my.selectel.ru/vpc/), go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about [Cloud Platform projects](https://docs.selectel.ru/cloud/managed-kubernetes/about/projects/). + * `` — Pool where the cluster is located, for example, `ru-3`. To get information about the pool, in the [Control panel](https://my.selectel.ru/vpc/dbaas/), go to **Cloud Platform** ⟶ **Managed Databases**. The pool is in the **Pool** column. \ No newline at end of file diff --git a/website/docs/r/vpc_floatingip_v2.html.markdown b/website/docs/r/vpc_floatingip_v2.html.markdown index 205c3707..23f88e30 100644 --- a/website/docs/r/vpc_floatingip_v2.html.markdown +++ b/website/docs/r/vpc_floatingip_v2.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_vpc_floatingip_v2" sidebar_current: "docs-selectel-resource-vpc-floatingip-v2" description: |- - Manages a V2 floating IP resource within Selectel VPC. + Creates and manages a public IP address for Selectel products using public API v2. --- # selectel\_vpc\_floatingip_v2 diff --git a/website/docs/r/vpc_keypair_v2.html.markdown b/website/docs/r/vpc_keypair_v2.html.markdown index 55d47e74..4dfbf91f 100644 --- a/website/docs/r/vpc_keypair_v2.html.markdown +++ b/website/docs/r/vpc_keypair_v2.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_vpc_keypair_v2" sidebar_current: "docs-selectel-resource-vpc-keypair-v2" description: |- - Manages a V2 keypair resource within Selectel VPC. + Creates and manages a SSH key pair for Selectel products using public API v2. --- # selectel\_vpc\_keypair_v2 diff --git a/website/docs/r/vpc_license_v2.html.markdown b/website/docs/r/vpc_license_v2.html.markdown index 4abad3d7..97b80aa2 100644 --- a/website/docs/r/vpc_license_v2.html.markdown +++ b/website/docs/r/vpc_license_v2.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_vpc_license_v2" sidebar_current: "docs-selectel-resource-vpc-license-v2" description: |- - Manages a V2 license resource within Selectel VPC. + Manages a license for Selectel cloud servers using public API v2. --- # selectel\_vpc\_license_v2 diff --git a/website/docs/r/vpc_project_v2.html.markdown b/website/docs/r/vpc_project_v2.html.markdown index 2c946bd3..45e7490e 100644 --- a/website/docs/r/vpc_project_v2.html.markdown +++ b/website/docs/r/vpc_project_v2.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_vpc_project_v2" sidebar_current: "docs-selectel-resource-vpc-project-v2" description: |- - Manages a V2 project resource within Selectel VPC. + Creates and manages a Selectel Cloud Platform project using public API v2. --- # selectel\_vpc\_project_v2 diff --git a/website/docs/r/vpc_role_v2.html.markdown b/website/docs/r/vpc_role_v2.html.markdown index 6c113385..36b58f25 100644 --- a/website/docs/r/vpc_role_v2.html.markdown +++ b/website/docs/r/vpc_role_v2.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_vpc_role_v2" sidebar_current: "docs-selectel-resource-vpc-role-v2" description: |- - Manages a V2 role resource within Selectel VPC. + Creates and manages a Project Administrator role for Selectel service users using public API v2. --- # selectel\_vpc\_role_v2 diff --git a/website/docs/r/vpc_subnet_v2.html.markdown b/website/docs/r/vpc_subnet_v2.html.markdown index cb4de15a..7d4ce0db 100644 --- a/website/docs/r/vpc_subnet_v2.html.markdown +++ b/website/docs/r/vpc_subnet_v2.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_vpc_subnet_v2" sidebar_current: "docs-selectel-resource-vpc-subnet-v2" description: |- - Manages a V2 subnet resource within Selectel VPC. + Creates and manages a public subnet for Selectel products using public API v2. --- # selectel\_vpc\_subnet_v2 diff --git a/website/docs/r/vpc_token_v2.html.markdown b/website/docs/r/vpc_token_v2.html.markdown index 1e6b6e37..c7c9a2a5 100644 --- a/website/docs/r/vpc_token_v2.html.markdown +++ b/website/docs/r/vpc_token_v2.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_vpc_token_v2" sidebar_current: "docs-selectel-resource-vpc-token-v2" description: |- - Manages a V2 token resource within Selectel VPC. + Creates and manages a Selectel Cloud Platform Keystone token using public API v2. --- # selectel\_vpc\_token_v2 diff --git a/website/docs/r/vpc_user_v2.html.markdown b/website/docs/r/vpc_user_v2.html.markdown index 77e77616..f92de3bc 100644 --- a/website/docs/r/vpc_user_v2.html.markdown +++ b/website/docs/r/vpc_user_v2.html.markdown @@ -3,7 +3,7 @@ layout: "selectel" page_title: "Selectel: selectel_vpc_user_v2" sidebar_current: "docs-selectel-resource-vpc-user-v2" description: |- - Manages a V2 user resource within Selectel VPC. + Creates and manages a service user for Selectel products using public API v2. --- # selectel\_vpc\_user_v2 From b1d08c78f6a2f7e631ea3d0c200a61b83ad2000a Mon Sep 17 00:00:00 2001 From: "iatchenko.d" Date: Fri, 18 Aug 2023 15:16:37 +0300 Subject: [PATCH 5/5] edits --- ...=> dbaas_postgresql_logical_replication_slot_v1.html.markdown} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename website/docs/r/{dbaas_postgresql_logical_replication_slot_v1.html.markdown.md => dbaas_postgresql_logical_replication_slot_v1.html.markdown} (100%) diff --git a/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md b/website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown similarity index 100% rename from website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown.md rename to website/docs/r/dbaas_postgresql_logical_replication_slot_v1.html.markdown