@gdsgroup/aws-account

A module for provisioning AWS accounts within an organisation


Keywords
pulumi, aws
License
MIT
Install
npm install @gdsgroup/aws-account@0.2.5

Documentation

AWS Account

A module for provisioning AWS accounts within an organisation

Requirements

Name Version
Pulumi >= 3.8.0, < 4.0.0

Providers

Name Version
aws >= 3.51.0, < 4.0.0

Inputs

Name Description Type Default Required
name The alias of the AWS account. Also used as the common name for resources created as part of this module string n/a yes
iamAccountId The Id of the AWS account where user's IAM user accounts reside string n/a yes
isGameliftAccount Whether or not to initialise Amazon Gamelift IAM resources boolean false no
orgAccountProvider The provider to provision the organizations.Account resource with. See: Manage Org Accounts Provider n/a yes
rootAccountEmail The email address to associate with the root account string n/a yes
tags Tags to apply to th resources map[key: string]: string n/a no

Outputs

Name Description
accountId The Id of the newly created member AWS account
accountRootEmail The email address of the root account

Module\Component Usage

Provider Configuration

Organisation member accounts have a special admin role named OrganizationAccountAccessRole. See: Member Account Admin

Once the organisation member account has been created, Pulumi should provision all other resources defined in this module by assuming OrganizationAccountAccessRole within the newly created member account.

import { Provider } from '@pulumi/aws';
import { AwsAccount } from '../account';

const accountProvider = new Provider('account-provider', {
  region: 'eu-west-2',
});

const testAccount = new AwsAccount('test', {
  name: 'test',
  iamAccountId: '012345678910',
  orgAccountProvider: accountProvider,
});

new AwsAccount('gameliftAccount', {
  name: 'gameliftAccount',
  iamAccountId: '012345678910',
  orgAccountProvider: accountProvider,
  isGameliftAccount: true,
});

// Outputs
export const testAccountId = testAccount.accountId;
export const testAccountRootEmail = testAccount.accountRootEmail;