Carina

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

The friendly name of the member account.

email

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

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

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

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

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

The unique identifier (ID) of the account. The regex pattern for an account ID string requires exactly 12 digits.

joined_method

The method by which the account joined the organization.

joined_timestamp

The date the account became a part of the organization.

status

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.