feat: add stackit service account creation to tf provider (#708)

* feat: implement service account resource/datasource
This commit is contained in:
Mauritz Uphoff 2025-03-19 16:51:56 +01:00 committed by GitHub
parent 6dc6f4129c
commit 23e9a25b4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 978 additions and 8 deletions

View file

@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_service_account Data Source - stackit"
subcategory: ""
description: |-
Service account data source schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_service_account (Data Source)
Service account data source schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage
```terraform
data "stackit_service_account" "sa" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
email = "sa01-8565oq1@sa.stackit.cloud"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `email` (String) Email of the service account.
- `project_id` (String) STACKIT project ID to which the service account is associated.
### Read-Only
- `id` (String) Terraform's internal resource ID, structured as "`project_id`,`email`".
- `name` (String) Name of the service account.

View file

@ -176,6 +176,7 @@ Note: AWS specific checks must be skipped as they do not work on STACKIT. For de
- `secretsmanager_custom_endpoint` (String) Custom endpoint for the Secrets Manager service
- `server_backup_custom_endpoint` (String) Custom endpoint for the Server Backup service
- `server_update_custom_endpoint` (String) Custom endpoint for the Server Update service
- `service_account_custom_endpoint` (String) Custom endpoint for the Service Account service
- `service_account_email` (String, Deprecated) Service account email. It can also be set using the environment variable STACKIT_SERVICE_ACCOUNT_EMAIL. It is required if you want to use the resource manager project resource.
- `service_account_key` (String) Service account key used for authentication. If set, the key flow will be used to authenticate all operations.
- `service_account_key_path` (String) Path for the service account key used for authentication. If set, the key flow will be used to authenticate all operations.

View file

@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_service_account Resource - stackit"
subcategory: ""
description: |-
Service account resource schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_service_account (Resource)
Service account resource schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage
```terraform
resource "stackit_service_account" "sa" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "sa01"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Name of the service account.
- `project_id` (String) STACKIT project ID to which the service account is associated.
### Read-Only
- `email` (String) Email of the service account.
- `id` (String) Terraform's internal resource ID, structured as "`project_id`,`email`".