Skip to content

Commit

Permalink
Update documentation for resources
Browse files Browse the repository at this point in the history
  • Loading branch information
sel-bukharov committed Nov 21, 2024
1 parent 165e81f commit a8af1fe
Show file tree
Hide file tree
Showing 23 changed files with 499 additions and 474 deletions.
60 changes: 46 additions & 14 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resource "selectel_vpc_project_v2" "project_1" {
}
```

## Authentication (4.0.0 and later)
## Authentication (6.0.0 and later)

```hcl
# Configure the Selectel provider
Expand All @@ -39,26 +39,58 @@ provider "selectel" {
domain_name = "123456"
username = "user"
password = "password"
auth_region = "pool"
auth_url = "https://cloud.api.selcloud.ru/identity/v3/"
}
```

## Argument Reference (4.0.0 and later)
## Argument Reference (6.0.0 and later)

* `domain_name` - (Required) Selectel account ID. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). For import, use the value in the `OS_DOMAIN_NAME` environment variable. Learn more about [Registration](https://docs.selectel.ru/en/control-panel-actions/account/registration/).
- `domain_name` - (Required) Selectel account ID. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). For import, use the value in the `OS_DOMAIN_NAME` environment variable. Learn more about [Registration](https://docs.selectel.ru/en/control-panel-actions/account/registration/).

* `username` - (Required) Name of the service user. To get the name, in the [Control panel](https://my.selectel.ru/iam/users_management/users?type=service), go to **Identity & Access Management****User management** ⟶ the **Service users** tab ⟶ copy the name of the required user. For import, use the value in the `OS_USERNAME` environment variable. Learn more about [Service users](https://docs.selectel.ru/en/control-panel-actions/users-and-roles/user-types-and-roles/) and [how to create service user](https://docs.selectel.ru/en/control-panel-actions/users-and-roles/add-user/#add-service-user).
- `username` - (Required) Name of the service user. To get the name, in the [Control panel](https://my.selectel.ru/iam/users_management/users?type=service), go to **Identity & Access Management****User management** ⟶ the **Service users** tab ⟶ copy the name of the required user. For import, use the value in the `OS_USERNAME` environment variable. Learn more about [Service users](https://docs.selectel.ru/en/control-panel-actions/users-and-roles/user-types-and-roles/) and [how to create service user](https://docs.selectel.ru/en/control-panel-actions/users-and-roles/add-user/#add-service-user).

* `password` - (Required, Sensitive) Password of the service user. For import, use the value in the `OS_PASSWORD` environment variable.
- `password` - (Required, Sensitive) Password of the service user. For import, use the value in the `OS_PASSWORD` environment variable.

* `user_domain_name` - (Optional) Selectel account ID. Use only for users that were created and assigned a role in a different account. Applicable only to public cloud. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). For import, use the value in the `OS_USER_DOMAIN_NAME` environment variable.
- `auth_url`- (Required) Keystone Identity authentication URL for authentication via user credentials. For import, use the value in the `OS_AUTH_URL` environment variable.

* `auth_url`- (Optional) Keystone Identity authentication URL for authentication via user credentials. If skipped, the provider uses the default endpoint `https://cloud.api.selcloud.ru/identity/v3/`. For import, use the value in the `OS_AUTH_URL` environment variable.
- `auth_region` - (Required) Pool where the endpoint for Keystone API and Resell API is located. For import, use the value in the `OS_REGION_NAME` environment variable. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/en/control-panel-actions/availability-matrix/).

* `auth_region` - (Optional) Pool where the endpoint for Keystone API and Resell API is located, for example, `ru-3`. If skipped, the provider uses the default pool `ru-1`. Does not affect the region parameter in the resources, but it is preferable to use one pool in a manifest. For import, use the value in the `OS_REGION_NAME` environment variable. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/en/control-panel-actions/availability-matrix/).
- `user_domain_name` - (Optional) Selectel account ID. Use only for users that were created and assigned a role in a different account. Applicable only to public cloud. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). For import, use the value in the `OS_USER_DOMAIN_NAME` environment variable.

* `project_id` - (Optional) Unique identifier of the project. Use only to import resources that are associated with the specific project. To get the ID, in the [Control panel](https://my.selectel.ru/), go to the product section in the navigation menu ⟶ project name ⟶ copy the ID of the required project. As an alternative, you can retrieve project ID from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. If skipped, use the `SEL_PROJECT_ID` environment variable. Learn more about [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/).
- `project_id` - (Optional) Unique identifier of the project. Use only to import resources that are associated with the specific project. To get the ID, in the [Control panel](https://my.selectel.ru/), go to the product section in the navigation menu ⟶ project name ⟶ copy the ID of the required project. As an alternative, you can retrieve project ID from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. If skipped, use the `INFRA_PROJECT_ID` environment variable. Learn more about [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/).

* `region` - (Optional) Pool, for example, `ru-3`. Use only to import resources from the specific pool. If skipped, use the `SEL_REGION` environment variable. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/en/control-panel-actions/availability-matrix/).
- `region` - (Optional) Pool, for example, `ru-3`. Use only to import resources from the specific pool. If skipped, use the `INFRA_REGION` environment variable. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/en/control-panel-actions/availability-matrix/).

## Authentication (4.0.0 up to 5.4.0)

```hcl
# Configure the Selectel provider
provider "selectel" {
domain_name = "123456"
username = "user"
password = "password"
}
```

## Argument Reference (4.0.0 up to 5.4.0)

- `domain_name` - (Required) Selectel account ID. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). For import, use the value in the `OS_DOMAIN_NAME` environment variable. Learn more about [Registration](https://docs.selectel.ru/en/control-panel-actions/account/registration/).

- `username` - (Required) Name of the service user. To get the name, in the [Control panel](https://my.selectel.ru/iam/users_management/users?type=service), go to **Identity & Access Management****User management** ⟶ the **Service users** tab ⟶ copy the name of the required user. For import, use the value in the `OS_USERNAME` environment variable. Learn more about [Service users](https://docs.selectel.ru/en/control-panel-actions/users-and-roles/user-types-and-roles/) and [how to create service user](https://docs.selectel.ru/en/control-panel-actions/users-and-roles/add-user/#add-service-user).

- `password` - (Required, Sensitive) Password of the service user. For import, use the value in the `OS_PASSWORD` environment variable.

- `user_domain_name` - (Optional) Selectel account ID. Use only for users that were created and assigned a role in a different account. Applicable only to public cloud. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). For import, use the value in the `OS_USER_DOMAIN_NAME` environment variable.

- `auth_url`- (Optional) Keystone Identity authentication URL for authentication via user credentials. If skipped, the provider uses the default endpoint `https://cloud.api.selcloud.ru/identity/v3/`. For import, use the value in the `OS_AUTH_URL` environment variable.

- `auth_region` - (Optional) Pool where the endpoint for Keystone API and Resell API is located, for example, `ru-3`. If skipped, the provider uses the default pool `ru-1`. Does not affect the region parameter in the resources, but it is preferable to use one pool in a manifest. For import, use the value in the `OS_REGION_NAME` environment variable. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/en/control-panel-actions/availability-matrix/).

- `project_id` - (Optional) Unique identifier of the project. Use only to import resources that are associated with the specific project. To get the ID, in the [Control panel](https://my.selectel.ru/), go to the product section in the navigation menu ⟶ project name ⟶ copy the ID of the required project. As an alternative, you can retrieve project ID from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. If skipped, use the `SEL_PROJECT_ID` environment variable. Learn more about [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/).

- `region` - (Optional) Pool, for example, `ru-3`. Use only to import resources from the specific pool. If skipped, use the `SEL_REGION` environment variable. Learn more about available pools in the [Availability matrix](https://docs.selectel.ru/en/control-panel-actions/availability-matrix/).

## Authentication (up to 3.11.0)

Expand All @@ -72,10 +104,10 @@ provider "selectel" {

## Argument Reference (up to 3.11.0)

* `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/).
- `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/).

* `endpoint` - (Optional) Selectel API endpoint. Use only for test environments. If skipped, the provider automatically uses the official Selectel endpoint.
- `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 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/), go to the product section in the navigation menu ⟶ project name ⟶ copy the ID of the required project. As an alternative, you can retrieve project ID from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/). If skipped, use the `SEL_PROJECT_ID` environment variable.
- `project_id` - (Optional) Unique identifier of the project. Use only to import resources that are associated with the specific project. To get the ID, in the [Control panel](https://my.selectel.ru/), go to the product section in the navigation menu ⟶ project name ⟶ copy the ID of the required project. As an alternative, you can retrieve project ID from the [selectel_vpc_project_v2](https://registry.terraform.io/providers/selectel/selectel/latest/docs/resources/vpc_project_v2) resource. Learn more about [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/). If skipped, use the `SEL_PROJECT_ID` environment variable.

* `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/en/control-panel-actions/availability-matrix/). If skipped, use the `SEL_REGION` environment variable.
- `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/en/control-panel-actions/availability-matrix/). If skipped, use the `SEL_REGION` environment variable.
22 changes: 11 additions & 11 deletions website/docs/r/craas_registry_v1.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: |-
Creates and manages a registry in Selectel Container Registry using public API v1.
---

# selectel\_craas\_registry\_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/en/cloud/craas/).

Expand All @@ -21,15 +21,15 @@ resource "selectel_craas_registry_v1" "registry_1" {

## Argument Reference

* `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/en/cloud/craas/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/en/cloud/craas/registry/).

* `project_id` - (Required) Unique identifier of the associated 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 [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/).
- `project_id` - (Required) Unique identifier of the associated 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 [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/).

## Attributes Reference

* `status` - Registry status.
- `status` - Registry status.

* `endpoint` - Registry endpoint. For example, `cr.selcloud.ru/my-registry`
- `endpoint` - Registry endpoint. For example, `cr.selcloud.ru/my-registry`

## Import

Expand All @@ -39,18 +39,18 @@ You can import a registry:
export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=<username>
export OS_PASSWORD=<password>
export SEL_PROJECT_ID=<selectel_project_id>
export INFRA_PROJECT_ID=<selectel_project_id>
terraform import selectel_craas_registry_v1.registry_1 <registry_id>
```

where:

* `<account_id>` — Selectel account ID. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). Learn more about [Registration](https://docs.selectel.ru/en/control-panel-actions/account/registration/).
- `<account_id>` — Selectel account ID. The account ID is in the top right corner of the [Control panel](https://my.selectel.ru/). Learn more about [Registration](https://docs.selectel.ru/en/control-panel-actions/account/registration/).

* `<username>` — Name of the service user. To get the name, in the [Control panel](https://my.selectel.ru/iam/users_management/users?type=service), go to **Identity & Access Management****User management** ⟶ the **Service users** tab ⟶ copy the name of the required user. Learn more about [Service users](https://docs.selectel.ru/en/control-panel-actions/users-and-roles/user-types-and-roles/).
- `<username>` — Name of the service user. To get the name, in the [Control panel](https://my.selectel.ru/iam/users_management/users?type=service), go to **Identity & Access Management****User management** ⟶ the **Service users** tab ⟶ copy the name of the required user. Learn more about [Service users](https://docs.selectel.ru/en/control-panel-actions/users-and-roles/user-types-and-roles/).

* `<password>` — Password of the service user.
- `<password>` — Password of the service user.

* `<selectel_project_id>` — Unique identifier of the associated project. To get the ID, in the [Control panel](https://my.selectel.ru/vpc/craas), go to **Cloud Platform** ⟶ project name ⟶ copy the ID of the required project. Learn more about [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/).
- `<selectel_project_id>` — Unique identifier of the associated project. To get the ID, in the [Control panel](https://my.selectel.ru/vpc/craas), go to **Cloud Platform** ⟶ project name ⟶ copy the ID of the required project. Learn more about [Projects](https://docs.selectel.ru/en/control-panel-actions/projects/about-projects/).

* `<registry_id>` — 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/).
- `<registry_id>` — 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/).
Loading

0 comments on commit a8af1fe

Please sign in to comment.