terraform-provider-stackitp.../docs/resources/resourcemanager_project.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

3 KiB

page_title subcategory description
stackit_resourcemanager_project Resource - stackit Resource Manager project resource schema. To use this resource, it is required that you set the service account email in the provider configuration. -> In case you're getting started with an empty STACKIT organization and want to use this resource to create projects in it, check out this guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/stackit_org_service_account for how to create a service account which you can use for authentication in the STACKIT Terraform provider.

stackit_resourcemanager_project (Resource)

Resource Manager project resource schema. To use this resource, it is required that you set the service account email in the provider configuration.

-> In case you're getting started with an empty STACKIT organization and want to use this resource to create projects in it, check out this guide for how to create a service account which you can use for authentication in the STACKIT Terraform provider.

Example Usage

resource "stackit_resourcemanager_project" "example" {
  parent_container_id = "example-parent-container-abc123"
  name                = "example-container"
  labels = {
    "Label 1" = "foo"
    // "networkArea" = stackit_network_area.foo.network_area_id
  }
  owner_email = "john.doe@stackit.cloud"
}

# Only use the import statement, if you want to import an existing resourcemanager project
# Note: There will be a conflict which needs to be resolved manually.
# Must set a configuration value for the owner_email attribute as the provider has marked it as required.
import {
  to = stackit_resourcemanager_project.import-example
  id = var.container_id
}

Schema

Required

  • name (String) Project name.
  • owner_email (String) Email address of the owner of the project. This value is only considered during creation. Changing it afterwards will have no effect.
  • parent_container_id (String) Parent resource identifier. Both container ID (user-friendly) and UUID are supported

Optional

  • labels (Map of String) Labels are key-value string pairs which can be attached to a resource container. A label key must match the regex [A-ZÄÜÖa-zäüöß0-9_-]{1,64}. A label value must match the regex ^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}. To add a project to a STACKIT Network Area, setting the label networkArea=<networkAreaID> is required.

Read-Only

  • container_id (String) Project container ID. Globally unique, user-friendly identifier.
  • id (String) Terraform's internal resource ID. It is structured as "container_id".
  • project_id (String) Project UUID identifier. This is the ID that can be used in most of the other resources to identify the project.