import * as core from "@terrascript/core"; export interface AccountArgs extends core.ResourceArgs { /** * (Optional) If true, a deletion event will close the account. Otherwise, it will only remove from the * organization. This is not supported for GovCloud accounts. */ closeOnDeletion?: boolean | core.BooleanOut; /** * (Optional) Whether to also create a GovCloud account. The GovCloud account is tied to the main (comm * ercial) account this resource creates. If `true`, the GovCloud account ID is available in the `govcl * oud_id` attribute. The only way to manage the GovCloud account with Terraform is to subsequently imp * ort the account using this resource. */ createGovcloud?: boolean | core.BooleanOut; /** * (Required) Email address of the owner to assign to the new member account. This email address must n * ot already be associated with another AWS account. */ email: string | core.StringOut; /** * (Optional) If set to `ALLOW`, the new account enables IAM users and roles to access account billing * information if they have the required permissions. If set to `DENY`, then only the root user (and no * roles) of the new account can access account billing information. If this is unset, the AWS API wil * l default this to `ALLOW`. If the resource is created and this option is changed, it will try to rec * reate the account. */ iamUserAccessToBilling?: string | core.StringOut; /** * (Required) Friendly name for the member account. */ name: string | core.StringOut; /** * (Optional) Parent Organizational Unit ID or Root ID for the account. Defaults to the Organization de * fault Root ID. A configuration must be present for this argument to perform drift detection. */ parentId?: string | core.StringOut; /** * (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member * account. This role trusts the root account, allowing users in the root account to assume the role, a * s permitted by the root account administrator. The role has administrator permissions in the new mem * ber account. The Organizations API provides no method for reading this information after account cre * ation, so Terraform cannot perform drift detection on its value and will always show a difference fo * r a configured value after import unless [`ignore_changes`](https://www.terraform.io/docs/configurat * ion/meta-arguments/lifecycle.html#ignore_changes) is used. */ roleName?: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; } export class Account extends core.Resource { /** * The ARN for this account. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) If true, a deletion event will close the account. Otherwise, it will only remove from the * organization. This is not supported for GovCloud accounts. */ @core.attr(Boolean) public closeOnDeletion?: boolean | core.BooleanOut; /** * (Optional) Whether to also create a GovCloud account. The GovCloud account is tied to the main (comm * ercial) account this resource creates. If `true`, the GovCloud account ID is available in the `govcl * oud_id` attribute. The only way to manage the GovCloud account with Terraform is to subsequently imp * ort the account using this resource. */ @core.attr(Boolean) public createGovcloud?: boolean | core.BooleanOut; /** * (Required) Email address of the owner to assign to the new member account. This email address must n * ot already be associated with another AWS account. */ @core.attr(String) public email!: string | core.StringOut; /** * ID for a GovCloud account created with the account. */ @core.attr(String, { computed: true }) public govcloudId!: string | core.StringOut; /** * (Optional) If set to `ALLOW`, the new account enables IAM users and roles to access account billing * information if they have the required permissions. If set to `DENY`, then only the root user (and no * roles) of the new account can access account billing information. If this is unset, the AWS API wil * l default this to `ALLOW`. If the resource is created and this option is changed, it will try to rec * reate the account. */ @core.attr(String) public iamUserAccessToBilling?: string | core.StringOut; /** * The AWS account id */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; @core.attr(String, { computed: true }) public joinedMethod!: string | core.StringOut; @core.attr(String, { computed: true }) public joinedTimestamp!: string | core.StringOut; /** * (Required) Friendly name for the member account. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) Parent Organizational Unit ID or Root ID for the account. Defaults to the Organization de * fault Root ID. A configuration must be present for this argument to perform drift detection. */ @core.attr(String, { computed: true }) public parentId?: string | core.StringOut; /** * (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member * account. This role trusts the root account, allowing users in the root account to assume the role, a * s permitted by the root account administrator. The role has administrator permissions in the new mem * ber account. The Organizations API provides no method for reading this information after account cre * ation, so Terraform cannot perform drift detection on its value and will always show a difference fo * r a configured value after import unless [`ignore_changes`](https://www.terraform.io/docs/configurat * ion/meta-arguments/lifecycle.html#ignore_changes) is used. */ @core.attr(String) public roleName?: string | core.StringOut; @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; constructor(name: string, args?: AccountArgs) { super(name, "aws_organizations_account", args); } public override getNamespace(): string { return "aws_organizations"; } }