Alpha (#4)
* chore: initial push to be able to work together * chore: add missing wait folder * chore: add missing folders * chore: cleanup alpha branch * feat: mssql alpha instance (#2) * fix: remove unused attribute types and functions from backup models * fix: update API client references to use sqlserverflexalpha package * fix: update package references to use sqlserverflexalpha and modify user data source model * fix: add sqlserverflexalpha user data source to provider * fix: add sqlserverflexalpha user resource and update related functionality * chore: add stackit_sqlserverflexalpha_user resource and instance_id variable * fix: refactor sqlserverflexalpha user resource and enhance schema with status and default_database --------- Co-authored-by: Andre Harms <andre.harms@stackit.cloud> Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud> * feat: add sqlserver instance * chore: fixing tests * chore: update docs --------- Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud> Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
This commit is contained in:
parent
45073a716b
commit
2733834fc9
351 changed files with 62744 additions and 3 deletions
53
stackit/internal/services/sqlserverflexalpha/testdata/resource-max.tf
vendored
Normal file
53
stackit/internal/services/sqlserverflexalpha/testdata/resource-max.tf
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Copyright (c) STACKIT
|
||||
|
||||
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
|
||||
}
|
||||
35
stackit/internal/services/sqlserverflexalpha/testdata/resource-min.tf
vendored
Normal file
35
stackit/internal/services/sqlserverflexalpha/testdata/resource-min.tf
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Copyright (c) STACKIT
|
||||
|
||||
variable "project_id" {}
|
||||
variable "name" {}
|
||||
variable "flavor_cpu" {}
|
||||
variable "flavor_ram" {}
|
||||
variable "username" {}
|
||||
variable "role" {}
|
||||
|
||||
resource "stackit_sqlserverflex_instance" "instance" {
|
||||
project_id = var.project_id
|
||||
name = var.name
|
||||
flavor = {
|
||||
cpu = var.flavor_cpu
|
||||
ram = var.flavor_ram
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue