1. Packages
  2. AWS
  3. API Docs
  4. bedrock
  5. AgentcoreWorkloadIdentity
AWS v7.10.0 published on Friday, Oct 24, 2025 by Pulumi

aws.bedrock.AgentcoreWorkloadIdentity

Get Started
aws logo
AWS v7.10.0 published on Friday, Oct 24, 2025 by Pulumi

    Manages an AWS Bedrock AgentCore Workload Identity. Workload Identity provides OAuth2-based authentication and authorization for AI agents to access external resources securely.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.bedrock.AgentcoreWorkloadIdentity("example", {
        name: "example-workload-identity",
        allowedResourceOauth2ReturnUrls: ["https://example.com/callback"],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.bedrock.AgentcoreWorkloadIdentity("example",
        name="example-workload-identity",
        allowed_resource_oauth2_return_urls=["https://example.com/callback"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/bedrock"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bedrock.NewAgentcoreWorkloadIdentity(ctx, "example", &bedrock.AgentcoreWorkloadIdentityArgs{
    			Name: pulumi.String("example-workload-identity"),
    			AllowedResourceOauth2ReturnUrls: pulumi.StringArray{
    				pulumi.String("https://example.com/callback"),
    			},
    		})
    		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.Bedrock.AgentcoreWorkloadIdentity("example", new()
        {
            Name = "example-workload-identity",
            AllowedResourceOauth2ReturnUrls = new[]
            {
                "https://example.com/callback",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.bedrock.AgentcoreWorkloadIdentity;
    import com.pulumi.aws.bedrock.AgentcoreWorkloadIdentityArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 AgentcoreWorkloadIdentity("example", AgentcoreWorkloadIdentityArgs.builder()
                .name("example-workload-identity")
                .allowedResourceOauth2ReturnUrls("https://example.com/callback")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:bedrock:AgentcoreWorkloadIdentity
        properties:
          name: example-workload-identity
          allowedResourceOauth2ReturnUrls:
            - https://example.com/callback
    

    Workload Identity with Multiple Return URLs

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.bedrock.AgentcoreWorkloadIdentity("example", {
        name: "example-workload-identity",
        allowedResourceOauth2ReturnUrls: [
            "https://app.example.com/oauth/callback",
            "https://api.example.com/auth/return",
            "https://example.com/callback",
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.bedrock.AgentcoreWorkloadIdentity("example",
        name="example-workload-identity",
        allowed_resource_oauth2_return_urls=[
            "https://app.example.com/oauth/callback",
            "https://api.example.com/auth/return",
            "https://example.com/callback",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/bedrock"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bedrock.NewAgentcoreWorkloadIdentity(ctx, "example", &bedrock.AgentcoreWorkloadIdentityArgs{
    			Name: pulumi.String("example-workload-identity"),
    			AllowedResourceOauth2ReturnUrls: pulumi.StringArray{
    				pulumi.String("https://app.example.com/oauth/callback"),
    				pulumi.String("https://api.example.com/auth/return"),
    				pulumi.String("https://example.com/callback"),
    			},
    		})
    		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.Bedrock.AgentcoreWorkloadIdentity("example", new()
        {
            Name = "example-workload-identity",
            AllowedResourceOauth2ReturnUrls = new[]
            {
                "https://app.example.com/oauth/callback",
                "https://api.example.com/auth/return",
                "https://example.com/callback",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.bedrock.AgentcoreWorkloadIdentity;
    import com.pulumi.aws.bedrock.AgentcoreWorkloadIdentityArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 AgentcoreWorkloadIdentity("example", AgentcoreWorkloadIdentityArgs.builder()
                .name("example-workload-identity")
                .allowedResourceOauth2ReturnUrls(            
                    "https://app.example.com/oauth/callback",
                    "https://api.example.com/auth/return",
                    "https://example.com/callback")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:bedrock:AgentcoreWorkloadIdentity
        properties:
          name: example-workload-identity
          allowedResourceOauth2ReturnUrls:
            - https://app.example.com/oauth/callback
            - https://api.example.com/auth/return
            - https://example.com/callback
    

    Create AgentcoreWorkloadIdentity Resource

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

    Constructor syntax

    new AgentcoreWorkloadIdentity(name: string, args?: AgentcoreWorkloadIdentityArgs, opts?: CustomResourceOptions);
    @overload
    def AgentcoreWorkloadIdentity(resource_name: str,
                                  args: Optional[AgentcoreWorkloadIdentityArgs] = None,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AgentcoreWorkloadIdentity(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  allowed_resource_oauth2_return_urls: Optional[Sequence[str]] = None,
                                  name: Optional[str] = None,
                                  region: Optional[str] = None)
    func NewAgentcoreWorkloadIdentity(ctx *Context, name string, args *AgentcoreWorkloadIdentityArgs, opts ...ResourceOption) (*AgentcoreWorkloadIdentity, error)
    public AgentcoreWorkloadIdentity(string name, AgentcoreWorkloadIdentityArgs? args = null, CustomResourceOptions? opts = null)
    public AgentcoreWorkloadIdentity(String name, AgentcoreWorkloadIdentityArgs args)
    public AgentcoreWorkloadIdentity(String name, AgentcoreWorkloadIdentityArgs args, CustomResourceOptions options)
    
    type: aws:bedrock:AgentcoreWorkloadIdentity
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AgentcoreWorkloadIdentityArgs
    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 AgentcoreWorkloadIdentityArgs
    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 AgentcoreWorkloadIdentityArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AgentcoreWorkloadIdentityArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AgentcoreWorkloadIdentityArgs
    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 agentcoreWorkloadIdentityResource = new Aws.Bedrock.AgentcoreWorkloadIdentity("agentcoreWorkloadIdentityResource", new()
    {
        AllowedResourceOauth2ReturnUrls = new[]
        {
            "string",
        },
        Name = "string",
        Region = "string",
    });
    
    example, err := bedrock.NewAgentcoreWorkloadIdentity(ctx, "agentcoreWorkloadIdentityResource", &bedrock.AgentcoreWorkloadIdentityArgs{
    	AllowedResourceOauth2ReturnUrls: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:   pulumi.String("string"),
    	Region: pulumi.String("string"),
    })
    
    var agentcoreWorkloadIdentityResource = new AgentcoreWorkloadIdentity("agentcoreWorkloadIdentityResource", AgentcoreWorkloadIdentityArgs.builder()
        .allowedResourceOauth2ReturnUrls("string")
        .name("string")
        .region("string")
        .build());
    
    agentcore_workload_identity_resource = aws.bedrock.AgentcoreWorkloadIdentity("agentcoreWorkloadIdentityResource",
        allowed_resource_oauth2_return_urls=["string"],
        name="string",
        region="string")
    
    const agentcoreWorkloadIdentityResource = new aws.bedrock.AgentcoreWorkloadIdentity("agentcoreWorkloadIdentityResource", {
        allowedResourceOauth2ReturnUrls: ["string"],
        name: "string",
        region: "string",
    });
    
    type: aws:bedrock:AgentcoreWorkloadIdentity
    properties:
        allowedResourceOauth2ReturnUrls:
            - string
        name: string
        region: string
    

    AgentcoreWorkloadIdentity 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 AgentcoreWorkloadIdentity resource accepts the following input properties:

    AllowedResourceOauth2ReturnUrls List<string>
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    Name string

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    AllowedResourceOauth2ReturnUrls []string
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    Name string

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    allowedResourceOauth2ReturnUrls List<String>
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    name String

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    allowedResourceOauth2ReturnUrls string[]
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    name string

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    allowed_resource_oauth2_return_urls Sequence[str]
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    name str

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    allowedResourceOauth2ReturnUrls List<String>
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    name String

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    WorkloadIdentityArn string
    ARN of the Workload Identity.
    Id string
    The provider-assigned unique ID for this managed resource.
    WorkloadIdentityArn string
    ARN of the Workload Identity.
    id String
    The provider-assigned unique ID for this managed resource.
    workloadIdentityArn String
    ARN of the Workload Identity.
    id string
    The provider-assigned unique ID for this managed resource.
    workloadIdentityArn string
    ARN of the Workload Identity.
    id str
    The provider-assigned unique ID for this managed resource.
    workload_identity_arn str
    ARN of the Workload Identity.
    id String
    The provider-assigned unique ID for this managed resource.
    workloadIdentityArn String
    ARN of the Workload Identity.

    Look up Existing AgentcoreWorkloadIdentity Resource

    Get an existing AgentcoreWorkloadIdentity 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?: AgentcoreWorkloadIdentityState, opts?: CustomResourceOptions): AgentcoreWorkloadIdentity
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allowed_resource_oauth2_return_urls: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            workload_identity_arn: Optional[str] = None) -> AgentcoreWorkloadIdentity
    func GetAgentcoreWorkloadIdentity(ctx *Context, name string, id IDInput, state *AgentcoreWorkloadIdentityState, opts ...ResourceOption) (*AgentcoreWorkloadIdentity, error)
    public static AgentcoreWorkloadIdentity Get(string name, Input<string> id, AgentcoreWorkloadIdentityState? state, CustomResourceOptions? opts = null)
    public static AgentcoreWorkloadIdentity get(String name, Output<String> id, AgentcoreWorkloadIdentityState state, CustomResourceOptions options)
    resources:  _:    type: aws:bedrock:AgentcoreWorkloadIdentity    get:      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:
    AllowedResourceOauth2ReturnUrls List<string>
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    Name string

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    WorkloadIdentityArn string
    ARN of the Workload Identity.
    AllowedResourceOauth2ReturnUrls []string
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    Name string

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    WorkloadIdentityArn string
    ARN of the Workload Identity.
    allowedResourceOauth2ReturnUrls List<String>
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    name String

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    workloadIdentityArn String
    ARN of the Workload Identity.
    allowedResourceOauth2ReturnUrls string[]
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    name string

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    workloadIdentityArn string
    ARN of the Workload Identity.
    allowed_resource_oauth2_return_urls Sequence[str]
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    name str

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    workload_identity_arn str
    ARN of the Workload Identity.
    allowedResourceOauth2ReturnUrls List<String>
    Set of allowed OAuth2 return URLs for resources associated with this workload identity. These URLs are used as valid redirect targets during OAuth2 authentication flows.
    name String

    Name of the workload identity. Must be 3-255 characters and contain only alphanumeric characters, hyphens, periods, and underscores.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    workloadIdentityArn String
    ARN of the Workload Identity.

    Import

    Using pulumi import, import Bedrock AgentCore Workload Identity using the workload identity name. For example:

    $ pulumi import aws:bedrock/agentcoreWorkloadIdentity:AgentcoreWorkloadIdentity example example-workload-identity
    

    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
    AWS v7.10.0 published on Friday, Oct 24, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate