feat: Onboard affinity groups resource and data source (#652)

* onboard affinity_groups resource and data source
- add tests and descriptions
- fix: server doesn't use affinity_group value for payload

* Update descriptions
This commit is contained in:
Marcel Jacek 2025-01-30 11:07:32 +01:00 committed by GitHub
parent 3642260cc4
commit b5ce160d13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 846 additions and 0 deletions

View file

@ -0,0 +1,35 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_affinity_group Data Source - stackit"
subcategory: ""
description: |-
Affinity Group schema. Must have a region specified in the provider configuration.
---
# stackit_affinity_group (Data Source)
Affinity Group schema. Must have a `region` specified in the provider configuration.
## Example Usage
```terraform
data "stackit_affinity_group" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
affinity_group_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `affinity_group_id` (String) The affinity group ID.
- `project_id` (String) STACKIT Project ID to which the affinity group is associated.
### Read-Only
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`affinity_group_id`".
- `members` (List of String) Affinity Group schema. Must have a `region` specified in the provider configuration.
- `name` (String) The name of the affinity group.
- `policy` (String) The policy of the affinity group.