Resource
aws.organizations.Account
Contains information about an Amazon Web Services account that is a member of an organization.
This resource is protected from destruction by default. To destroy it, explicitly set prevent_destroy = false.
Example
aws.organizations.Account {
# Run this resource from the organization's management account.
account_name = 'carina-example-member'
# Replace with a real email address that is not used by another AWS account.
email = 'carina-example@example.com'
iam_user_access_to_billing = aws.organizations.Account.IamUserAccessToBilling.deny
role_name = 'carina-example-organization-role'
tags = {
Environment = 'example'
}
}
Argument Reference
account_name
- Type:
String (pattern: /^[\u0020-\u007E]+$/ (Full), len: 1..=50) - Required: Yes
The friendly name of the member account.
email
- Type:
OrganizationsAccountEmail (identity constraints: len: 6..=64, member constraints: pattern: /^[^\x09-\x0D \u{00A0}\u{1680}\u{2000}-\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{FEFF}@]+@[^\x09-\x0D \u{00A0}\u{1680}\u{2000}-\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{FEFF}@]+\.[^\x09-\x0D \u{00A0}\u{1680}\u{2000}-\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{FEFF}@]+$/ (Full), len: 6..=64, custom validator) - Required: Yes
The email address of the owner to assign to the new member account. This email address must not already be associated with another Amazon Web Services account. You must use a valid email address to complete account creation. The rules for a valid email address: The address must be a minimum of 6 and a maximum of 64 characters long. All characters must be 7-bit ASCII characters. There must be one and only one @ symbol, which separates the local name from the domain name. The local name can't contain any of the following characters: whitespace, " ' ( ) < > [ ] : ; , \ | % & The local name can't begin with a dot (.) The domain name can consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.) The domain name can't begin or end with a hyphen (-) or dot (.) The domain name must contain at least one dot You can't access the root user of the account or remove an account that was created with an invalid email address.
iam_user_access_to_billing
- Type: IamUserAccessToBilling
- Required: No
If set to ALLOW, the new account enables IAM users to access account billing information if they have the required permissions. If set to DENY, only the root user of the new account can access account billing information. For more information, see About IAM access to the Billing and Cost Management console in the Amazon Web Services Billing and Cost Management User Guide. If you don't specify this parameter, the value defaults to ALLOW, and IAM users and roles with the required permissions can access billing information for the new account.
role_name
- Type:
IamRoleName (identity constraints: pattern: /^[A-Za-z0-9_+=,.@-]+\z/ (Full), len: 1..=64, member constraints: pattern: /^[A-Za-z0-9_+=,.@\-]{1,64}$/ (Full), len: 0..=64) - Required: No
The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the management account, allowing users in the management account to assume the role, as permitted by the management account administrator. The role has administrator permissions in the new member account. If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole. For more information about how to use this role to access the member account, see the following links: Creating the OrganizationAccountAccessRole in an invited member account in the Organizations User Guide Steps 2 and 3 in IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles in the IAM User Guide The regex pattern that is used to validate this parameter. The pattern can include uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-
tags
- Type: Map<
String (pattern: /^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$/ (Full), len: 1..=128),String (pattern: /^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$/ (Full), len: 0..=256)> - Required: No
The tags for the resource.
Enum Values
iam_user_access_to_billing (IamUserAccessToBilling)
| Value | DSL Identifier |
|---|---|
ALLOW |
aws.organizations.Account.IamUserAccessToBilling.allow |
DENY |
aws.organizations.Account.IamUserAccessToBilling.deny |
Shorthand formats: allow or IamUserAccessToBilling.allow
joined_method (JoinedMethod)
| Value | DSL Identifier |
|---|---|
CREATED |
aws.organizations.Account.JoinedMethod.created |
INVITED |
aws.organizations.Account.JoinedMethod.invited |
Shorthand formats: created or JoinedMethod.created
status (Status)
| Value | DSL Identifier |
|---|---|
ACTIVE |
aws.organizations.Account.Status.active |
PENDING_CLOSURE |
aws.organizations.Account.Status.pending_closure |
SUSPENDED |
aws.organizations.Account.Status.suspended |
Shorthand formats: active or Status.active
Additional Input Constraints
| Attribute | Applies on | Additional constraint |
|---|---|---|
account_name |
Create and update | String (pattern: /^[ -;=?-~]+\z/ (Full)) |
Attribute Reference
arn
- Type:
OrganizationsAccountArn (identity constraints: pattern: /^arn:(?:aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):organizations::[0-9]{12}:account/o-[a-z0-9]{10,32}/[0-9]{12}\z/ (Full), member constraints: pattern: /^arn:(?:aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):organizations::[0-9]{12}:account\/o-[a-z0-9]{10,32}\/[0-9]{12}$/ (Full)); Partition widened from the Smithy model to all partitions supported by this provider. - Read-only
The Amazon Resource Name (ARN) of the account. For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the Amazon Web Services Service Authorization Reference.
id
- Type:
AwsAccountId (identity constraints: pattern: /^[0-9]{12}$/ (Full), len: 12..=12, member constraints: pattern: /^[0-9]{12}$/ (Full), len: 0..=12) - Read-only
The unique identifier (ID) of the account. The regex pattern for an account ID string requires exactly 12 digits.
joined_method
- Type: JoinedMethod
- Read-only
The method by which the account joined the organization.
joined_timestamp
- Type:
String - Read-only
The date the account became a part of the organization.
status
- Type: Status
- Read-only
The status of the account in the organization. The Status parameter in the Account object will be retired on September 9, 2026. Although both the account State and account Status parameters are currently available in the Organizations APIs (DescribeAccount, ListAccounts, ListAccountsForParent), we recommend that you update your scripts or other code to use the State parameter instead of Status before September 9, 2026.