terraform-provider-stackitp.../docs/resources/sqlserverflexalpha_instance.md
Marcel_Henselin 4549ba63e5
All checks were successful
Publish / Check GoReleaser config (push) Successful in 6s
Publish / Publish provider (push) Successful in 6m59s
fix: refactor sqlserver to handle encryption correctly (#31)
## 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: #31
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
2026-02-04 07:30:00 +00:00

3.1 KiB

page_title subcategory description
stackitprivatepreview_sqlserverflexalpha_instance Resource - stackitprivatepreview

stackitprivatepreview_sqlserverflexalpha_instance (Resource)

Example Usage

resource "stackitprivatepreview_sqlserverflexalpha_instance" "example" {
  project_id      = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  name            = "example-instance"
  acl             = ["XXX.XXX.XXX.X/XX", "XX.XXX.XX.X/XX"]
  backup_schedule = "00 00 * * *"
  flavor = {
    cpu = 4
    ram = 16
  }
  storage = {
    class = "class"
    size  = 5
  }
  version = 2022
}

# Only use the import statement, if you want to import an existing sqlserverflex instance
import {
  to = stackitprivatepreview_sqlserverflexalpha_instance.import-example
  id = "${var.project_id},${var.region},${var.sql_instance_id}"
}

Schema

Required

  • backup_schedule (String) The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.
  • flavor_id (String) The id of the instance flavor.
  • name (String) The name of the instance.
  • network (Attributes) the network configuration of the instance. (see below for nested schema)
  • retention_days (Number) The days for how long the backup files should be stored before cleaned up. 30 to 365
  • storage (Attributes) The object containing information about the storage size and class. (see below for nested schema)
  • version (String) The sqlserver version used for the instance.

Optional

  • encryption (Attributes) this defines which key to use for storage encryption (see below for nested schema)
  • instance_id (String) The ID of the instance.
  • project_id (String) The STACKIT project ID.
  • region (String) The region which should be addressed

Read-Only

  • edition (String) Edition of the MSSQL server instance
  • id (String) The ID of the instance.
  • is_deletable (Boolean) Whether the instance can be deleted or not.
  • replicas (Number) How many replicas the instance should have.
  • status (String)

Nested Schema for network

Required:

  • acl (List of String) List of IPV4 cidr.

Optional:

  • access_scope (String) The network access scope of the instance

⚠️ Note: This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.

Read-Only:

  • instance_address (String)
  • router_address (String)

Nested Schema for storage

Required:

  • class (String) The storage class for the storage.
  • size (Number) The storage size in Gigabytes.

Nested Schema for encryption

Required:

  • kek_key_id (String) The key identifier
  • kek_key_ring_id (String) The keyring identifier
  • kek_key_version (String) The key version
  • service_account (String)