Skip to content

Data Source: awsIamAccountAlias

The IAM Account Alias data source allows access to the account alias for the effective account in which Terraform is working.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsIamAccountAliasCurrent =
  new aws.dataAwsIamAccountAlias.DataAwsIamAccountAlias(this, "current", {});
new cdktf.TerraformOutput(this, "account_id", {
  value: dataAwsIamAccountAliasCurrent.accountAlias,
});

Argument Reference

There are no arguments available for this data source.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • accountAlias - Alias associated with the AWS account.
  • id - Alias associated with the AWS account.