terraform-provider-stackitp.../stackit/internal/services/iaas/affinitygroup/const.go
Marcel Jacek b5ce160d13
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
2025-01-30 11:07:32 +01:00

41 lines
1.3 KiB
Go

package affinitygroup
const exampleUsageWithServer = `
### Usage with server` + "\n" +
"```terraform" + `
resource "stackit_affinity_group" "affinity-group" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-key-pair"
policy = "soft-affinity"
}
resource "stackit_server" "example-server" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-server"
boot_volume = {
size = 64
source_type = "image"
source_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
affinity_group = stackit_affinity_group.affinity-group.affinity_group_id
availability_zone = "eu01-1"
machine_type = "g1.1"
}
` + "\n```"
const policies = `
### Policies
* ` + "`hard-affinity`" + `- All servers launched in this group will be hosted on the same compute node.
* ` + "`hard-anti-affinity`" + `- All servers launched in this group will be
hosted on different compute nodes.
* ` + "`soft-affinity`" + `- All servers launched in this group will be hosted
on the same compute node if possible, but if not possible they still will be scheduled instead of failure.
* ` + "`soft-anti-affinity`" + `- All servers launched in this group will be hosted on different compute nodes if possible,
but if not possible they still will be scheduled instead of failure.
`