Skip to content

azurermFederatedIdentityCredential

Manages a Federated Identity Credential.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example",
  }
);
const azurermUserAssignedIdentityExample =
  new azurerm.userAssignedIdentity.UserAssignedIdentity(this, "example_1", {
    location: azurermResourceGroupExample.location,
    name: "example",
    resource_group_name: azurermResourceGroupExample.name,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermUserAssignedIdentityExample.overrideLogicalId("example");
const azurermFederatedIdentityCredentialExample =
  new azurerm.federatedIdentityCredential.FederatedIdentityCredential(
    this,
    "example_2",
    {
      audience: ["foo"],
      issuer: "https://foo",
      name: "example",
      parent_id: azurermUserAssignedIdentityExample.id,
      resource_group_name: azurermResourceGroupExample.name,
      subject: "foo",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermFederatedIdentityCredentialExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) Specifies the name of this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created.

  • resourceGroupName - (Required) Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created.

  • audience - (Required) Specifies the audience for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created.

  • issuer - (Required) Specifies the issuer of this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created.

  • parentId - (Required) Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created.

  • subject - (Required) Specifies the subject for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Federated Identity Credential.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating this Federated Identity Credential.
  • delete - (Defaults to 30 minutes) Used when deleting this Federated Identity Credential.
  • read - (Defaults to 5 minutes) Used when retrieving this Federated Identity Credential.
  • update - (Defaults to 30 minutes) Used when updating this Federated Identity Credential.

Import

An existing Federated Identity Credential can be imported into Terraform using the resourceId, e.g.

terraform import azurerm_federated_identity_credential.example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{parentIdentityName}/federatedIdentityCredentials/{resourceName}