1. Packages
  2. Packages
  3. AWS
  4. API Docs
  5. organizations
  6. AwsServiceAccess
Viewing docs for AWS v7.30.0
published on Thursday, May 14, 2026 by Pulumi
aws logo
Viewing docs for AWS v7.30.0
published on Thursday, May 14, 2026 by Pulumi

    Manages trusted access between an AWS service and AWS Organizations.

    Note: AWS recommends enabling and disabling trusted access for a service through the service’s own console or its AWS CLI commands or API operation equivalents, rather than using this resource directly. Using the service-specific tooling ensures that the service can perform the required steps when enabling trusted access (e.g. creating any required resources) and any required clean up operations when disabling trusted access. See the AWS Organizations User Guide for more details. The complete list of AWS services that support trusted access with AWS Organizations is available in the Services that work with Organizations page.

    Note: This resource requires the Organizations management account.

    NOTE: Terraform provides both this standalone AWS service access resource and exclusive service access defined in-line in the aws.organizations.Organization resource via the awsServiceAccessPrincipals argument. At this time, you cannot use the service access in conjunction with this resource otherwise it will cause a perpetual difference in plan output. You can optionally use the generic Terraform resource lifecycle configuration block with ignoreChanges in the aws.organizations.Organization resource to manage additional service access via this resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.organizations.AwsServiceAccess("example", {servicePrincipal: "tagpolicies.tag.amazonaws.com"});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.organizations.AwsServiceAccess("example", service_principal="tagpolicies.tag.amazonaws.com")
    
    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.NewAwsServiceAccess(ctx, "example", &organizations.AwsServiceAccessArgs{
    			ServicePrincipal: pulumi.String("tagpolicies.tag.amazonaws.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Organizations.AwsServiceAccess("example", new()
        {
            ServicePrincipal = "tagpolicies.tag.amazonaws.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.organizations.AwsServiceAccess;
    import com.pulumi.aws.organizations.AwsServiceAccessArgs;
    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 example = new AwsServiceAccess("example", AwsServiceAccessArgs.builder()
                .servicePrincipal("tagpolicies.tag.amazonaws.com")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:organizations:AwsServiceAccess
        properties:
          servicePrincipal: tagpolicies.tag.amazonaws.com
    
    Example coming soon!
    

    Create AwsServiceAccess Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AwsServiceAccess(name: string, args: AwsServiceAccessArgs, opts?: CustomResourceOptions);
    @overload
    def AwsServiceAccess(resource_name: str,
                         args: AwsServiceAccessArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def AwsServiceAccess(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         service_principal: Optional[str] = None)
    func NewAwsServiceAccess(ctx *Context, name string, args AwsServiceAccessArgs, opts ...ResourceOption) (*AwsServiceAccess, error)
    public AwsServiceAccess(string name, AwsServiceAccessArgs args, CustomResourceOptions? opts = null)
    public AwsServiceAccess(String name, AwsServiceAccessArgs args)
    public AwsServiceAccess(String name, AwsServiceAccessArgs args, CustomResourceOptions options)
    
    type: aws:organizations:AwsServiceAccess
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_organizations_awsserviceaccess" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AwsServiceAccessArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AwsServiceAccessArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AwsServiceAccessArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AwsServiceAccessArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AwsServiceAccessArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsServiceAccessResource = new Aws.Organizations.AwsServiceAccess("awsServiceAccessResource", new()
    {
        ServicePrincipal = "string",
    });
    
    example, err := organizations.NewAwsServiceAccess(ctx, "awsServiceAccessResource", &organizations.AwsServiceAccessArgs{
    	ServicePrincipal: pulumi.String("string"),
    })
    
    resource "aws_organizations_awsserviceaccess" "awsServiceAccessResource" {
      service_principal = "string"
    }
    
    var awsServiceAccessResource = new AwsServiceAccess("awsServiceAccessResource", AwsServiceAccessArgs.builder()
        .servicePrincipal("string")
        .build());
    
    aws_service_access_resource = aws.organizations.AwsServiceAccess("awsServiceAccessResource", service_principal="string")
    
    const awsServiceAccessResource = new aws.organizations.AwsServiceAccess("awsServiceAccessResource", {servicePrincipal: "string"});
    
    type: aws:organizations:AwsServiceAccess
    properties:
        servicePrincipal: string
    

    AwsServiceAccess Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AwsServiceAccess resource accepts the following input properties:

    ServicePrincipal string
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    ServicePrincipal string
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    service_principal string
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    servicePrincipal String
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    servicePrincipal string
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    service_principal str
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    servicePrincipal String
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AwsServiceAccess resource produces the following output properties:

    DateEnabled string
    Date and time that the service was enabled, in RFC 3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    DateEnabled string
    Date and time that the service was enabled, in RFC 3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    date_enabled string
    Date and time that the service was enabled, in RFC 3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    dateEnabled String
    Date and time that the service was enabled, in RFC 3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    dateEnabled string
    Date and time that the service was enabled, in RFC 3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    date_enabled str
    Date and time that the service was enabled, in RFC 3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    dateEnabled String
    Date and time that the service was enabled, in RFC 3339 format.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AwsServiceAccess Resource

    Get an existing AwsServiceAccess resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AwsServiceAccessState, opts?: CustomResourceOptions): AwsServiceAccess
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            date_enabled: Optional[str] = None,
            service_principal: Optional[str] = None) -> AwsServiceAccess
    func GetAwsServiceAccess(ctx *Context, name string, id IDInput, state *AwsServiceAccessState, opts ...ResourceOption) (*AwsServiceAccess, error)
    public static AwsServiceAccess Get(string name, Input<string> id, AwsServiceAccessState? state, CustomResourceOptions? opts = null)
    public static AwsServiceAccess get(String name, Output<String> id, AwsServiceAccessState state, CustomResourceOptions options)
    resources:  _:    type: aws:organizations:AwsServiceAccess    get:      id: ${id}
    import {
      to = aws_organizations_awsserviceaccess.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DateEnabled string
    Date and time that the service was enabled, in RFC 3339 format.
    ServicePrincipal string
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    DateEnabled string
    Date and time that the service was enabled, in RFC 3339 format.
    ServicePrincipal string
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    date_enabled string
    Date and time that the service was enabled, in RFC 3339 format.
    service_principal string
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    dateEnabled String
    Date and time that the service was enabled, in RFC 3339 format.
    servicePrincipal String
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    dateEnabled string
    Date and time that the service was enabled, in RFC 3339 format.
    servicePrincipal string
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    date_enabled str
    Date and time that the service was enabled, in RFC 3339 format.
    service_principal str
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.
    dateEnabled String
    Date and time that the service was enabled, in RFC 3339 format.
    servicePrincipal String
    Service principal of the AWS service to enable. For example, tagpolicies.tag.amazonaws.com. Changing this value will force a new resource.

    Import

    Using pulumi import, import trusted access using the servicePrincipal. For example:

    $ pulumi import aws:organizations/awsServiceAccess:AwsServiceAccess example tagpolicies.tag.amazonaws.com
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    Viewing docs for AWS v7.30.0
    published on Thursday, May 14, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.