# T Cloud Public importer

Versio.io can import and historize all resources of a T Cloud Public domain (formerly Open Telekom Cloud).

The importer reads the resource inventory of the Resource Management Service (RMS, also called Config). RMS lists the resources of all cloud services, projects and regions of a domain in one API. Every resource type becomes its own entity in Versio.io, e.g. `ecs-cloudservers-t-cloud` or `vpc-security-groups-t-cloud`.

## Configuration

You can find the configuration option in Versio.io at `Environment settings > OneImporter > Configurations > T Cloud Public`.

Here you can edit all existing configurations, create new configurations or delete existing configurations. To add a new configuration, enter a `Name` for your importer and an `Entity suffix` (default: `-t-cloud`) to clearly identify your T Cloud entities.  
Note that the `Entity suffix` is fixed and cannot be changed afterwards.

Click `Add` to proceed to the configuration.

The following configuration options are available:

| Field | Description | Advice |
| --- | --- | --- |
| **Name** | Meaningful name | Add the words "T Cloud" to identify the importer when viewing the logs |
| **Active** | Option to activate and deactivate the configuration. Data is only imported if the configuration is activated. |  |
| **IAM URL** | URL of the T Cloud Identity and Access Management (IAM) service | Default: `https://iam.eu-de.otc.t-systems.com` |
| **RMS URL** | URL of the Resource Management Service (optional) | Leave empty to use the endpoint from the IAM service catalog |
| **Domain name** | Name of your T Cloud domain (tenant) | Shown in the T Cloud console under `My Credentials` |
| **Credential** | Username and password of an IAM user | See paragraph below |
| **Regions** | Regions to import (optional) | Leave empty to import all regions. Global resources are always imported. |
| **Resource types** | Resource types to import in the format `provider.type` (optional) | Leave empty to import all resource types |
| **Executing OneImporter** | Select a Versio.io OneImporter to import the data based on the importer configuration. | Requires an installed OneImporter: [Installation instructions](<https://docs.versio.io/setup-one-importer/index.md>) |
| **Schedule time (cron format)** | Determine the frequency of imports in CRON format | Learn more about CRON format: [https://en.wikipedia.org/wiki/Cron](<https://en.wikipedia.org/wiki/Cron>) |

*Table: T Cloud Public configuration parameters*

## T Cloud IAM user

The importer authenticates with a domain-scoped IAM token. Create a dedicated IAM user for Versio.io:

1. Open the T Cloud console and go to `Identity and Access Management > Users`.
2. Create a user with programmatic access.
3. Add the user to a group with read-only permissions for RMS. The user requires the permission `rms:resources:list`.
4. Store username and password as a credential in Versio.io at `Environment settings > Credentials`.

## Imported entities

| Entity | Description |
| --- | --- |
| `domain-t-cloud` | The T Cloud domain |
| `region-t-cloud` | Regions that contain resources |
| `project-t-cloud` | IAM projects of the domain |
| `<provider>-<type>-t-cloud` | One entity per RMS resource type, e.g. `ecs-cloudservers-t-cloud`, `vpc-vpcs-t-cloud` |

*Table: T Cloud Public entities*

Every resource is related to its project. Projects are related to their regions, regions to the domain.

## Reference

- [T Cloud Public Resource Management Service API](<https://docs.otc.t-systems.com/resource-management-service/api-ref/>)
- [T Cloud Public Identity and Access Management API](<https://docs.otc.t-systems.com/identity-access-management/api-ref/>)
- [T Cloud Public console](<https://console.otc.t-systems.com>)
