terraform-provider-stackitp.../stackit/internal/services/sqlserverflexalpha/testdata/resource-max.tf
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

52 lines
1.3 KiB
HCL

variable "project_id" {}
variable "name" {}
variable "acl1" {}
variable "flavor_cpu" {}
variable "flavor_ram" {}
variable "storage_class" {}
variable "storage_size" {}
variable "options_retention_days" {}
variable "backup_schedule" {}
variable "username" {}
variable "role" {}
variable "server_version" {}
variable "region" {}
resource "stackit_sqlserverflex_instance" "instance" {
project_id = var.project_id
name = var.name
acl = [var.acl1]
flavor = {
cpu = var.flavor_cpu
ram = var.flavor_ram
}
storage = {
class = var.storage_class
size = var.storage_size
}
version = var.server_version
options = {
retention_days = var.options_retention_days
}
backup_schedule = var.backup_schedule
region = var.region
}
resource "stackit_sqlserverflex_user" "user" {
project_id = stackit_sqlserverflex_instance.instance.project_id
instance_id = stackit_sqlserverflex_instance.instance.instance_id
username = var.username
roles = [var.role]
}
data "stackit_sqlserverflex_instance" "instance" {
project_id = var.project_id
instance_id = stackit_sqlserverflex_instance.instance.instance_id
}
data "stackit_sqlserverflex_user" "user" {
project_id = var.project_id
instance_id = stackit_sqlserverflex_instance.instance.instance_id
user_id = stackit_sqlserverflex_user.user.user_id
}