Skip to content

Default tags/labels on provider level #1549

Description

@gabbler97

Problem description

Currently, the STACKIT Terraform provider does not support a mechanism similar to the AWS provider’s default_tags feature (as described here: https://www.hashicorp.com/en/blog/default-tags-in-the-terraform-aws-provider).

This makes it difficult to centrally enforce mandatory labels (such as cost allocation, ownership, or security-related tags) across all resources managed via Terraform.

As a result:

Teams must manually define required labels on every resource
There is a risk that required labels are accidentally omitted
Governance, cost tracking, and security compliance become harder to enforce consistently

Proposed solution

Introduce a provider-level configuration option similar to AWS default_tags, allowing users to define a set of default labels/tags that are automatically applied to all resources created via the STACKIT Terraform provider.

This would:

Automatically apply mandatory labels to all resources
Reduce repetitive configuration across modules and teams
Improve consistency for governance, billing, and security tracking
Prevent accidental omission of required labels
Example Terraform configuration

provider "stackit" {
  default_labels = {
    environment = "production"
    owner       = "platform-team"
    cost_center = "cc-1234"
    managed_by  = "terraform"
  }
}

resource "stackit_server" "example" {
  name = "example-instance"

  # No need to manually set labels here
  # labels will be automatically inherited from provider defaults
}

This feature would significantly improve governance, security posture, and operational consistency across teams using the STACKIT Terraform provider. It would also align STACKIT with industry-standard behavior already available in providers like AWS.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions