Rename DSA credentials to credential (#76)
* Rename in LogMe * Rename in other DSA * Rename examples * Rename folder names * Rename in error messages
This commit is contained in:
parent
bd286d3c2d
commit
fee47a6400
59 changed files with 561 additions and 544 deletions
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_logme_credentials Data Source - stackit"
|
||||
page_title: "stackit_logme_credential Data Source - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
LogMe credentials data source schema.
|
||||
LogMe credential data source schema.
|
||||
---
|
||||
|
||||
# stackit_logme_credentials (Data Source)
|
||||
# stackit_logme_credential (Data Source)
|
||||
|
||||
LogMe credentials data source schema.
|
||||
LogMe credential data source schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
data "stackit_logme_credentials" "example" {
|
||||
data "stackit_logme_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
credentials_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_mariadb_credentials Data Source - stackit"
|
||||
page_title: "stackit_mariadb_credential Data Source - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
MariaDB credentials data source schema.
|
||||
MariaDB credential data source schema.
|
||||
---
|
||||
|
||||
# stackit_mariadb_credentials (Data Source)
|
||||
# stackit_mariadb_credential (Data Source)
|
||||
|
||||
MariaDB credentials data source schema.
|
||||
MariaDB credential data source schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
data "stackit_mariadb_credentials" "example" {
|
||||
data "stackit_mariadb_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
credentials_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
|
@ -3,12 +3,12 @@
|
|||
page_title: "stackit_objectstorage_bucket Data Source - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
ObjectStorage credentials data source schema.
|
||||
ObjectStorage credential data source schema.
|
||||
---
|
||||
|
||||
# stackit_objectstorage_bucket (Data Source)
|
||||
|
||||
ObjectStorage credentials data source schema.
|
||||
ObjectStorage credential data source schema.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_opensearch_credentials Data Source - stackit"
|
||||
page_title: "stackit_opensearch_credential Data Source - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
OpenSearch credentials data source schema.
|
||||
OpenSearch credential data source schema.
|
||||
---
|
||||
|
||||
# stackit_opensearch_credentials (Data Source)
|
||||
# stackit_opensearch_credential (Data Source)
|
||||
|
||||
OpenSearch credentials data source schema.
|
||||
OpenSearch credential data source schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
data "stackit_opensearch_credentials" "example" {
|
||||
data "stackit_opensearch_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
credentials_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_postgresql_credentials Data Source - stackit"
|
||||
page_title: "stackit_postgresql_credential Data Source - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
PostgreSQL credentials data source schema.
|
||||
PostgreSQL credential data source schema.
|
||||
---
|
||||
|
||||
# stackit_postgresql_credentials (Data Source)
|
||||
# stackit_postgresql_credential (Data Source)
|
||||
|
||||
PostgreSQL credentials data source schema.
|
||||
PostgreSQL credential data source schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
data "stackit_postgresql_credentials" "example" {
|
||||
data "stackit_postgresql_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
credentials_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_rabbitmq_credentials Data Source - stackit"
|
||||
page_title: "stackit_rabbitmq_credential Data Source - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
RabbitMQ credentials data source schema.
|
||||
RabbitMQ credential data source schema.
|
||||
---
|
||||
|
||||
# stackit_rabbitmq_credentials (Data Source)
|
||||
# stackit_rabbitmq_credential (Data Source)
|
||||
|
||||
RabbitMQ credentials data source schema.
|
||||
RabbitMQ credential data source schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
data "stackit_rabbitmq_credentials" "example" {
|
||||
data "stackit_rabbitmq_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
credentials_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_redis_credentials Data Source - stackit"
|
||||
page_title: "stackit_redis_credential Data Source - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
Redis credentials data source schema.
|
||||
Redis credential data source schema.
|
||||
---
|
||||
|
||||
# stackit_redis_credentials (Data Source)
|
||||
# stackit_redis_credential (Data Source)
|
||||
|
||||
Redis credentials data source schema.
|
||||
Redis credential data source schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
data "stackit_redis_credentials" "example" {
|
||||
data "stackit_redis_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
credentials_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
|
@ -41,13 +41,13 @@ To authenticate, you will need a [service account](https://docs.stackit.cloud/st
|
|||
|
||||
When setting up authentication, the provider will always try to use the key flow first and search for credentials in several locations, following a specific order:
|
||||
|
||||
1. Explicit configuration, e.g. by seting the fiel `stackit_service_account_key_path` in the provider block (see example below)
|
||||
1. Explicit configuration, e.g. by seting the field `stackit_service_account_key_path` in the provider block (see example below)
|
||||
2. Environment variable, e.g. by setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH`
|
||||
3. Credentials file
|
||||
|
||||
The SDK will check the credentials file located in the path defined by the `STACKIT_CREDENTIALS_PATH` env var, if specified,
|
||||
or in `$HOME/.stackit/credentials.json` as a fallback.
|
||||
The credentials should be set using the same name as the environmnet variables. Example:
|
||||
The credentials should be set using the same name as the environment variables. Example:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
@ -64,32 +64,42 @@ To configure it, follow this steps:
|
|||
|
||||
The following instructions assume that you have created a service account and assigned it the necessary permissions, e.g. project.owner.
|
||||
|
||||
1. In the Portal, go to `Service Account -> Service Account Keys` and create a key.
|
||||
- You can create your own RSA key-pair or have the Portal generate one for you.
|
||||
2. Save the content of the service account key and the corresponding private key by copying them or saving them in a file. The expected format of the service account key is the following:
|
||||
```json
|
||||
{
|
||||
"id": "uuid",
|
||||
"publicKey": "public key",
|
||||
"createdAt": "2023-08-24T14:15:22Z",
|
||||
"validUntil": "2023-08-24T14:15:22Z",
|
||||
"keyType": "USER_MANAGED",
|
||||
"keyOrigin": "USER_PROVIDED",
|
||||
"keyAlgorithm": "RSA_2048",
|
||||
"active": true,
|
||||
"credentials": {
|
||||
"kid": "string",
|
||||
"iss": "my-sa@sa.stackit.cloud",
|
||||
"sub": "uuid",
|
||||
"aud": "string",
|
||||
(optional) "privateKey": "private key when generated by the SA service"
|
||||
}
|
||||
}
|
||||
```
|
||||
1. In the Portal, go to the `Service Accounts` tab, choose a `Service Account` and go to `Service Account Keys` to create a key.
|
||||
|
||||
- You can create your own RSA key-pair or have the Portal generate one for you.
|
||||
|
||||
**Disclaimer:** as of now, creation of a service account key in the Portal is only available in DEV and QA environments. You can use this flow in these environments by setting the fields `token_custom_endpoint` and `jwks_custom_endpoint` to the corresponding endpoints in the provider block.
|
||||
|
||||
2. Save the content of the service account key and the corresponding private key by copying them or saving them in a file.
|
||||
|
||||
**Hint:** If you have generated the RSA key-pair using the Portal, you can save the private key in a PEM encoded file by downloading the service account key as a PEM file and using `openssl storeutl -keys <path/to/sa_key_pem_file> > private.key` to extract the private key from the service account key.
|
||||
|
||||
The expected format of the service account key is a **json** with the following structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "uuid",
|
||||
"publicKey": "public key",
|
||||
"createdAt": "2023-08-24T14:15:22Z",
|
||||
"validUntil": "2023-08-24T14:15:22Z",
|
||||
"keyType": "USER_MANAGED",
|
||||
"keyOrigin": "USER_PROVIDED",
|
||||
"keyAlgorithm": "RSA_2048",
|
||||
"active": true,
|
||||
"credentials": {
|
||||
"kid": "string",
|
||||
"iss": "my-sa@sa.stackit.cloud",
|
||||
"sub": "uuid",
|
||||
"aud": "string",
|
||||
(optional) "privateKey": "private key when generated by the SA service"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Configure the service account key and private key for authentication in the SDK:
|
||||
- setting the fiels in the provider block: `service_account_key` or `service_account_key_path`, `private_key` or `private_key_path`
|
||||
- setting environment variables: `STACKIT_SERVICE_ACCOUNT_KEY_PATH` and `STACKIT_PRIVATE_KEY_PATH`
|
||||
- setting them in the credentials file (see above)
|
||||
- setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH` and `STACKIT_PRIVATE_KEY_PATH` in the credentials file (see above)
|
||||
|
||||
### Token flow
|
||||
|
||||
|
|
|
|||
41
docs/resources/logme_credential.md
Normal file
41
docs/resources/logme_credential.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_logme_credential Resource - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
LogMe credential resource schema.
|
||||
---
|
||||
|
||||
# stackit_logme_credential (Resource)
|
||||
|
||||
LogMe credential resource schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "stackit_logme_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `instance_id` (String) ID of the LogMe instance.
|
||||
- `project_id` (String) STACKIT Project ID to which the instance is associated.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `credentials_id` (String) The credentials ID.
|
||||
- `host` (String)
|
||||
- `hosts` (List of String)
|
||||
- `http_api_uri` (String)
|
||||
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`instance_id`,`credentials_id`".
|
||||
- `name` (String)
|
||||
- `password` (String, Sensitive)
|
||||
- `port` (Number)
|
||||
- `uri` (String)
|
||||
- `username` (String)
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_logme_credentials Resource - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
LogMe credentials resource schema.
|
||||
---
|
||||
|
||||
# stackit_logme_credentials (Resource)
|
||||
|
||||
LogMe credentials resource schema.
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `instance_id` (String) ID of the LogMe instance.
|
||||
- `project_id` (String) STACKIT Project ID to which the instance is associated.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `credentials_id` (String) The credentials ID.
|
||||
- `host` (String)
|
||||
- `hosts` (List of String)
|
||||
- `http_api_uri` (String)
|
||||
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`instance_id`,`credentials_id`".
|
||||
- `name` (String)
|
||||
- `password` (String, Sensitive)
|
||||
- `port` (Number)
|
||||
- `uri` (String)
|
||||
- `username` (String)
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_mariadb_credentials Resource - stackit"
|
||||
page_title: "stackit_mariadb_credential Resource - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
MariaDB credentials resource schema.
|
||||
MariaDB credential resource schema.
|
||||
---
|
||||
|
||||
# stackit_mariadb_credentials (Resource)
|
||||
# stackit_mariadb_credential (Resource)
|
||||
|
||||
MariaDB credentials resource schema.
|
||||
MariaDB credential resource schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "stackit_mariadb_credentials" "example" {
|
||||
resource "stackit_mariadb_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
}
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_opensearch_credentials Resource - stackit"
|
||||
page_title: "stackit_opensearch_credential Resource - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
OpenSearch credentials resource schema.
|
||||
OpenSearch credential resource schema.
|
||||
---
|
||||
|
||||
# stackit_opensearch_credentials (Resource)
|
||||
# stackit_opensearch_credential (Resource)
|
||||
|
||||
OpenSearch credentials resource schema.
|
||||
OpenSearch credential resource schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "stackit_opensearch_credentials" "example" {
|
||||
resource "stackit_opensearch_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
}
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_postgresql_credentials Resource - stackit"
|
||||
page_title: "stackit_postgresql_credential Resource - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
PostgreSQL credentials resource schema.
|
||||
PostgreSQL credential resource schema.
|
||||
---
|
||||
|
||||
# stackit_postgresql_credentials (Resource)
|
||||
# stackit_postgresql_credential (Resource)
|
||||
|
||||
PostgreSQL credentials resource schema.
|
||||
PostgreSQL credential resource schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "stackit_postgresql_credentials" "example" {
|
||||
resource "stackit_postgresql_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
}
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_rabbitmq_credentials Resource - stackit"
|
||||
page_title: "stackit_rabbitmq_credential Resource - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
RabbitMQ credentials resource schema.
|
||||
RabbitMQ credential resource schema.
|
||||
---
|
||||
|
||||
# stackit_rabbitmq_credentials (Resource)
|
||||
# stackit_rabbitmq_credential (Resource)
|
||||
|
||||
RabbitMQ credentials resource schema.
|
||||
RabbitMQ credential resource schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "stackit_rabbitmq_credentials" "example" {
|
||||
resource "stackit_rabbitmq_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
}
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "stackit_redis_credentials Resource - stackit"
|
||||
page_title: "stackit_redis_credential Resource - stackit"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
Redis credentials resource schema.
|
||||
Redis credential resource schema.
|
||||
---
|
||||
|
||||
# stackit_redis_credentials (Resource)
|
||||
# stackit_redis_credential (Resource)
|
||||
|
||||
Redis credentials resource schema.
|
||||
Redis credential resource schema.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "stackit_redis_credentials" "example" {
|
||||
resource "stackit_redis_credential" "example" {
|
||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue