Organization class

Provides a resource to create an organization.

> WARNING: When migrating from a featureSet of CONSOLIDATED_BILLING to ALL, the Organization account owner will received an email stating the following: "You started the process to enable all features for your AWS organization. As part of that process, all member accounts that joined your organization by invitation must approve the change. You don’t need approval from member accounts that you directly created from within your AWS organization." After all member accounts have accepted the invitation, the Organization account owner must then finalize the changes via the AWS Console. Until these steps are performed, the provider will perpetually show a difference, and the DescribeOrganization API will continue to show the FeatureSet as CONSOLIDATED_BILLING. See the AWS Organizations documentation for more information.

> WARNING: Warning from the AWS Docs: "We recommend that you enable integration between AWS Organizations and the specified AWS service by using the console or commands that are provided by the specified service. Doing so ensures that the service is aware that it can create the resources that are required for the integration. How the service creates those resources in the organization's accounts depends on that service. For more information, see the documentation for the other AWS service."

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const org = new aws.organizations.Organization("org", {
    awsServiceAccessPrincipals: [
        "cloudtrail.amazonaws.com",
        "config.amazonaws.com",
    ],
    featureSet: "ALL",
});
import pulumi
import pulumi_aws as aws

org = aws.organizations.Organization("org",
    aws_service_access_principals=[
        "cloudtrail.amazonaws.com",
        "config.amazonaws.com",
    ],
    feature_set="ALL")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var org = new Aws.Organizations.Organization("org", new()
    {
        AwsServiceAccessPrincipals = new[]
        {
            "cloudtrail.amazonaws.com",
            "config.amazonaws.com",
        },
        FeatureSet = "ALL",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := organizations.NewOrganization(ctx, "org", &organizations.OrganizationArgs{
			AwsServiceAccessPrincipals: pulumi.StringArray{
				pulumi.String("cloudtrail.amazonaws.com"),
				pulumi.String("config.amazonaws.com"),
			},
			FeatureSet: pulumi.String("ALL"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_organizations_organization" "org" {
  aws_service_access_principals = ["cloudtrail.amazonaws.com", "config.amazonaws.com"]
  feature_set                   = "ALL"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.organizations.Organization;
import com.pulumi.aws.organizations.OrganizationArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var org = new Organization("org", OrganizationArgs.builder()
            .awsServiceAccessPrincipals(
                "cloudtrail.amazonaws.com",
                "config.amazonaws.com")
            .featureSet("ALL")
            .build());

    }
}
resources:
  org:
    type: aws:organizations:Organization
    properties:
      awsServiceAccessPrincipals:
        - cloudtrail.amazonaws.com
        - config.amazonaws.com
      featureSet: ALL

Import

Identity Schema

Required

  • id (String) ID of the AWS Organizations organization.

Optional

  • accountId (String) AWS Account where this resource is managed.

Using pulumi import, import the AWS organization using the id. For example:

$ pulumi import aws:organizations/organization:Organization example o-1234567

Constructors

Organization(String name, {OrganizationArgs? args, CustomResourceOptions? options})
Creates a new Organization. name The Pulumi resource name. args Arguments used to configure this Organization. The set of arguments for Organization. options Resource options controlling this resource's behavior.
Organization.reference(String urn)
Creates a typed reference to an existing Organization resource.

Properties

accounts ↔ Output<List<OrganizationAccount>>
List of organization accounts including the master account. For a list excluding the master account, see the nonMasterAccounts attribute. All elements have these attributes:
latefinal
arn ↔ Output<String>
ARN of the root.
latefinal
awsServiceAccessPrincipals ↔ Output<List<String>?>
List of AWS service principal names for which you want to enable integration with your organization. This is typically in the form of a URL, such as service-abbreviation.amazonaws.com. Organization must have featureSet set to ALL. Some services do not support enablement via this endpoint, see warning in aws docs.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
enabledPolicyTypes ↔ Output<List<String>?>
List of Organizations policy types to enable in the Organization Root. Organization must have featureSet set to ALL. For additional information about valid policy types (e.g., AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, BEDROCK_POLICY, CHATBOT_POLICY, DECLARATIVE_POLICY_EC2, INSPECTOR_POLICY, RESOURCE_CONTROL_POLICY, S3_POLICY, SECURITYHUB_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY and UPGRADE_ROLLOUT_POLICY), see the AWS Organizations API Reference. To enable INSPECTOR_POLICY, awsServiceAccessPrincipals must include inspector2.amazonaws.com. To enable SECURITYHUB_POLICY, awsServiceAccessPrincipals must include securityhub.amazonaws.com.
latefinal
featureSet ↔ Output<String?>
Specify ALL (default) or CONSOLIDATED_BILLING.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
masterAccountArn ↔ Output<String>
ARN of the master account.
latefinal
masterAccountEmail ↔ Output<String>
Email address of the master account.
latefinal
masterAccountId ↔ Output<String>
Identifier of the master account.
latefinal
masterAccountName ↔ Output<String>
Name of the master account.
latefinal
nonMasterAccounts ↔ Output<List<OrganizationNonMasterAccount>>
List of organization accounts excluding the master account. For a list including the master account, see the accounts attribute. All elements have these attributes:
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
returnOrganizationOnly ↔ Output<bool?>
Return (as attributes) only the results of the DescribeOrganization API to avoid API limits. When configured to true only the arn, featureSet, masterAccountArn, masterAccountEmail and masterAccountId attributes will be returned. All others will be empty. Default: false.
latefinal
roots ↔ Output<List<OrganizationRoot>>
List of organization roots. All elements have these attributes:
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {OrganizationState? state, CustomResourceOptions? options}) → Organization
Gets an existing Organization resource's state with the given name and id.