tharsis_managed_identity_alias
Defines and manages a managed identity alias.
Example Usage​
resource "tharsis_managed_identity_alias" "this" {
name = "my-identity-alias"
group_id = tharsis_group.nested.id
alias_source_id = tharsis_managed_identity.aws.id
}
Behavior​
- An alias is a separate resource with its own name. It uses the source managed identity's data and access rules without duplicating them.
- Aliases allow a managed identity to be shared with a parent or sibling group.
- Aliases cannot be updated. They reflect changes made to the source identity.
- An alias cannot be created in a namespace that already reaches the source identity through inheritance.
Permissions​
Creating an alias requires the owner role in both the source group and the alias group.
Schema​
Required​
name(String) The name of the managed identity alias.
Optional​
alias_source_id(String) The ID or TRN of the managed identity being aliased.alias_source_path(String, Deprecated) Full path of the managed identity being aliased.group_id(String) The ID or TRN of the group where alias will be created.group_path(String, Deprecated) Full path of the group where alias will be created.
Read-Only​
id(String) String identifier of the managed identity alias.last_updated(String) Timestamp when this managed identity alias was most recently updated by Terraform.resource_path(String, Deprecated) The path of the parent group plus the name of the managed identity alias.
Import​
Import is supported using the following syntax:
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
# An alias is a managed identity on the Tharsis side, so its TRN is
# "trn:managed_identity:" followed by the path of the group that holds the alias
# and the alias name.
import {
to = tharsis_managed_identity_alias.this
id = "trn:managed_identity:my-group/my-sub-group/my-identity-alias"
}
# The alias's ID also works as the id, shown by the "id" attribute or in the
# Tharsis UI.