Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.91 KB

File metadata and controls

50 lines (38 loc) · 1.91 KB
page_title subcategory description
stackit_authorization_project_role_assignment Resource - stackit
Project Role Assignment resource schema. ~> This resource is part of the iam experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.

stackit_authorization_project_role_assignment (Resource)

Project Role Assignment resource schema.

~> This resource is part of the iam experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.

Example Usage

resource "stackit_resourcemanager_project" "example" {
  name        = "example_project"
  owner_email = "foo.bar@stackit.cloud"
  # in this case a folder or a org-id
  parent_container_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

resource "stackit_authorization_project_role_assignment" "pra" {
  resource_id = stackit_resourcemanager_project.example.folder_id
  role        = "reader"
  subject     = "foo.bar@stackit.cloud"
}

# Only use the import statement, if you want to import an existing project role assignment
import {
  to = stackit_authorization_project_role_assignment.import-example
  id = "${var.project_id},${var.project_role_assignment_role},${var.project_role_assignment_subject}"
}

Schema

Required

  • resource_id (String) Project Resource to assign the role to.
  • role (String) Role to be assigned. Available roles can be queried using stackit-cli: stackit curl https://authorization.api.stackit.cloud/v2/permissions
  • subject (String) Identifier of user, service account or client. Usually email address or name in case of clients. All letters must be lowercased.

Read-Only

  • id (String) Terraform's internal resource identifier. It is structured as "resource_id,role,subject".