terraform-provider-stackitp.../docs/resources/server_service_account_attach.md
Alexander Dahmen 721e10a02f
chore(examples): Add import examples for all resources (#939)
* chore(examples): Add import examples for all resources

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Add guide: How to import resources

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

---------

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
2025-08-08 14:03:27 +02:00

1.4 KiB

page_title subcategory description
stackit_server_service_account_attach Resource - stackit Service account attachment resource schema. Attaches a service account to a server. Must have a region specified in the provider configuration.

stackit_server_service_account_attach (Resource)

Service account attachment resource schema. Attaches a service account to a server. Must have a region specified in the provider configuration.

Example Usage

resource "stackit_server_service_account_attach" "attached_service_account" {
  project_id            = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  server_id             = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  service_account_email = "service-account@stackit.cloud"
}

# Only use the import statement, if you want to import an existing server service account attachment
import {
  to = stackit_server_service_account_attach.import-example
  id = "${var.project_id},${var.server_id},${var.service_account_email}"
}

Schema

Required

  • project_id (String) STACKIT project ID to which the service account attachment is associated.
  • server_id (String) The server ID.
  • service_account_email (String) The service account email.

Read-Only

  • id (String) Terraform's internal resource ID. It is structured as "project_id,server_id,service_account_email".