1. Packages
  2. AWS
  3. API Docs
  4. eks
  5. PodIdentityAssociation
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.eks.PodIdentityAssociation

Explore with Pulumi AI

Resource for managing an AWS EKS (Elastic Kubernetes) Pod Identity Association.

Creates an EKS Pod Identity association between a service account in an Amazon EKS cluster and an IAM role with EKS Pod Identity. Use EKS Pod Identity to give temporary IAM credentials to pods and the credentials are rotated automatically.

Amazon EKS Pod Identity associations provide the ability to manage credentials for your applications, similar to the way that EC2 instance profiles provide credentials to Amazon EC2 instances.

If a pod uses a service account that has an association, Amazon EKS sets environment variables in the containers of the pod. The environment variables configure the Amazon Web Services SDKs, including the Command Line Interface, to use the EKS Pod Identity credentials.

Pod Identity is a simpler method than IAM roles for service accounts, as this method doesn’t use OIDC identity providers. Additionally, you can configure a role for Pod Identity once, and reuse it across clusters.

Example Usage

Basic Usage

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

const assumeRole = aws.iam.getPolicyDocument({
    statements: [{
        effect: "Allow",
        principals: [{
            type: "Service",
            identifiers: ["pods.eks.amazonaws.com"],
        }],
        actions: [
            "sts:AssumeRole",
            "sts:TagSession",
        ],
    }],
});
const example = new aws.iam.Role("example", {
    name: "eks-pod-identity-example",
    assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json),
});
const exampleS3 = new aws.iam.RolePolicyAttachment("example_s3", {
    policyArn: "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess",
    role: example.name,
});
const examplePodIdentityAssociation = new aws.eks.PodIdentityAssociation("example", {
    clusterName: exampleAwsEksCluster.name,
    namespace: "example",
    serviceAccount: "example-sa",
    roleArn: example.arn,
});
Copy
import pulumi
import pulumi_aws as aws

assume_role = aws.iam.get_policy_document(statements=[{
    "effect": "Allow",
    "principals": [{
        "type": "Service",
        "identifiers": ["pods.eks.amazonaws.com"],
    }],
    "actions": [
        "sts:AssumeRole",
        "sts:TagSession",
    ],
}])
example = aws.iam.Role("example",
    name="eks-pod-identity-example",
    assume_role_policy=assume_role.json)
example_s3 = aws.iam.RolePolicyAttachment("example_s3",
    policy_arn="arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess",
    role=example.name)
example_pod_identity_association = aws.eks.PodIdentityAssociation("example",
    cluster_name=example_aws_eks_cluster["name"],
    namespace="example",
    service_account="example-sa",
    role_arn=example.arn)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
			Statements: []iam.GetPolicyDocumentStatement{
				{
					Effect: pulumi.StringRef("Allow"),
					Principals: []iam.GetPolicyDocumentStatementPrincipal{
						{
							Type: "Service",
							Identifiers: []string{
								"pods.eks.amazonaws.com",
							},
						},
					},
					Actions: []string{
						"sts:AssumeRole",
						"sts:TagSession",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		example, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
			Name:             pulumi.String("eks-pod-identity-example"),
			AssumeRolePolicy: pulumi.String(assumeRole.Json),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicyAttachment(ctx, "example_s3", &iam.RolePolicyAttachmentArgs{
			PolicyArn: pulumi.String("arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"),
			Role:      example.Name,
		})
		if err != nil {
			return err
		}
		_, err = eks.NewPodIdentityAssociation(ctx, "example", &eks.PodIdentityAssociationArgs{
			ClusterName:    pulumi.Any(exampleAwsEksCluster.Name),
			Namespace:      pulumi.String("example"),
			ServiceAccount: pulumi.String("example-sa"),
			RoleArn:        example.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
    {
        Statements = new[]
        {
            new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
            {
                Effect = "Allow",
                Principals = new[]
                {
                    new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                    {
                        Type = "Service",
                        Identifiers = new[]
                        {
                            "pods.eks.amazonaws.com",
                        },
                    },
                },
                Actions = new[]
                {
                    "sts:AssumeRole",
                    "sts:TagSession",
                },
            },
        },
    });

    var example = new Aws.Iam.Role("example", new()
    {
        Name = "eks-pod-identity-example",
        AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
    });

    var exampleS3 = new Aws.Iam.RolePolicyAttachment("example_s3", new()
    {
        PolicyArn = "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess",
        Role = example.Name,
    });

    var examplePodIdentityAssociation = new Aws.Eks.PodIdentityAssociation("example", new()
    {
        ClusterName = exampleAwsEksCluster.Name,
        Namespace = "example",
        ServiceAccount = "example-sa",
        RoleArn = example.Arn,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.iam.RolePolicyAttachment;
import com.pulumi.aws.iam.RolePolicyAttachmentArgs;
import com.pulumi.aws.eks.PodIdentityAssociation;
import com.pulumi.aws.eks.PodIdentityAssociationArgs;
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) {
        final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
            .statements(GetPolicyDocumentStatementArgs.builder()
                .effect("Allow")
                .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                    .type("Service")
                    .identifiers("pods.eks.amazonaws.com")
                    .build())
                .actions(                
                    "sts:AssumeRole",
                    "sts:TagSession")
                .build())
            .build());

        var example = new Role("example", RoleArgs.builder()
            .name("eks-pod-identity-example")
            .assumeRolePolicy(assumeRole.json())
            .build());

        var exampleS3 = new RolePolicyAttachment("exampleS3", RolePolicyAttachmentArgs.builder()
            .policyArn("arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess")
            .role(example.name())
            .build());

        var examplePodIdentityAssociation = new PodIdentityAssociation("examplePodIdentityAssociation", PodIdentityAssociationArgs.builder()
            .clusterName(exampleAwsEksCluster.name())
            .namespace("example")
            .serviceAccount("example-sa")
            .roleArn(example.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:iam:Role
    properties:
      name: eks-pod-identity-example
      assumeRolePolicy: ${assumeRole.json}
  exampleS3:
    type: aws:iam:RolePolicyAttachment
    name: example_s3
    properties:
      policyArn: arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
      role: ${example.name}
  examplePodIdentityAssociation:
    type: aws:eks:PodIdentityAssociation
    name: example
    properties:
      clusterName: ${exampleAwsEksCluster.name}
      namespace: example
      serviceAccount: example-sa
      roleArn: ${example.arn}
variables:
  assumeRole:
    fn::invoke:
      function: aws:iam:getPolicyDocument
      arguments:
        statements:
          - effect: Allow
            principals:
              - type: Service
                identifiers:
                  - pods.eks.amazonaws.com
            actions:
              - sts:AssumeRole
              - sts:TagSession
Copy

Create PodIdentityAssociation Resource

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

Constructor syntax

new PodIdentityAssociation(name: string, args: PodIdentityAssociationArgs, opts?: CustomResourceOptions);
@overload
def PodIdentityAssociation(resource_name: str,
                           args: PodIdentityAssociationArgs,
                           opts: Optional[ResourceOptions] = None)

@overload
def PodIdentityAssociation(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           cluster_name: Optional[str] = None,
                           namespace: Optional[str] = None,
                           role_arn: Optional[str] = None,
                           service_account: Optional[str] = None,
                           tags: Optional[Mapping[str, str]] = None)
func NewPodIdentityAssociation(ctx *Context, name string, args PodIdentityAssociationArgs, opts ...ResourceOption) (*PodIdentityAssociation, error)
public PodIdentityAssociation(string name, PodIdentityAssociationArgs args, CustomResourceOptions? opts = null)
public PodIdentityAssociation(String name, PodIdentityAssociationArgs args)
public PodIdentityAssociation(String name, PodIdentityAssociationArgs args, CustomResourceOptions options)
type: aws:eks:PodIdentityAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PodIdentityAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PodIdentityAssociationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PodIdentityAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PodIdentityAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PodIdentityAssociationArgs
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 podIdentityAssociationResource = new Aws.Eks.PodIdentityAssociation("podIdentityAssociationResource", new()
{
    ClusterName = "string",
    Namespace = "string",
    RoleArn = "string",
    ServiceAccount = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := eks.NewPodIdentityAssociation(ctx, "podIdentityAssociationResource", &eks.PodIdentityAssociationArgs{
	ClusterName:    pulumi.String("string"),
	Namespace:      pulumi.String("string"),
	RoleArn:        pulumi.String("string"),
	ServiceAccount: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var podIdentityAssociationResource = new PodIdentityAssociation("podIdentityAssociationResource", PodIdentityAssociationArgs.builder()
    .clusterName("string")
    .namespace("string")
    .roleArn("string")
    .serviceAccount("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
pod_identity_association_resource = aws.eks.PodIdentityAssociation("podIdentityAssociationResource",
    cluster_name="string",
    namespace="string",
    role_arn="string",
    service_account="string",
    tags={
        "string": "string",
    })
Copy
const podIdentityAssociationResource = new aws.eks.PodIdentityAssociation("podIdentityAssociationResource", {
    clusterName: "string",
    namespace: "string",
    roleArn: "string",
    serviceAccount: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:eks:PodIdentityAssociation
properties:
    clusterName: string
    namespace: string
    roleArn: string
    serviceAccount: string
    tags:
        string: string
Copy

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

ClusterName This property is required. string
The name of the cluster to create the association in.
Namespace This property is required. string
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
RoleArn This property is required. string
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
ServiceAccount This property is required. string

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

Tags Dictionary<string, string>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
ClusterName This property is required. string
The name of the cluster to create the association in.
Namespace This property is required. string
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
RoleArn This property is required. string
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
ServiceAccount This property is required. string

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

Tags map[string]string
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
clusterName This property is required. String
The name of the cluster to create the association in.
namespace This property is required. String
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
roleArn This property is required. String
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
serviceAccount This property is required. String

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

tags Map<String,String>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
clusterName This property is required. string
The name of the cluster to create the association in.
namespace This property is required. string
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
roleArn This property is required. string
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
serviceAccount This property is required. string

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

tags {[key: string]: string}
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
cluster_name This property is required. str
The name of the cluster to create the association in.
namespace This property is required. str
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
role_arn This property is required. str
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
service_account This property is required. str

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

tags Mapping[str, str]
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
clusterName This property is required. String
The name of the cluster to create the association in.
namespace This property is required. String
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
roleArn This property is required. String
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
serviceAccount This property is required. String

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

tags Map<String>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

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

AssociationArn string
The Amazon Resource Name (ARN) of the association.
AssociationId string
The ID of the association.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

AssociationArn string
The Amazon Resource Name (ARN) of the association.
AssociationId string
The ID of the association.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

associationArn String
The Amazon Resource Name (ARN) of the association.
associationId String
The ID of the association.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

associationArn string
The Amazon Resource Name (ARN) of the association.
associationId string
The ID of the association.
id string
The provider-assigned unique ID for this managed resource.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

association_arn str
The Amazon Resource Name (ARN) of the association.
association_id str
The ID of the association.
id str
The provider-assigned unique ID for this managed resource.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

associationArn String
The Amazon Resource Name (ARN) of the association.
associationId String
The ID of the association.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing PodIdentityAssociation Resource

Get an existing PodIdentityAssociation 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?: PodIdentityAssociationState, opts?: CustomResourceOptions): PodIdentityAssociation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        association_arn: Optional[str] = None,
        association_id: Optional[str] = None,
        cluster_name: Optional[str] = None,
        namespace: Optional[str] = None,
        role_arn: Optional[str] = None,
        service_account: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> PodIdentityAssociation
func GetPodIdentityAssociation(ctx *Context, name string, id IDInput, state *PodIdentityAssociationState, opts ...ResourceOption) (*PodIdentityAssociation, error)
public static PodIdentityAssociation Get(string name, Input<string> id, PodIdentityAssociationState? state, CustomResourceOptions? opts = null)
public static PodIdentityAssociation get(String name, Output<String> id, PodIdentityAssociationState state, CustomResourceOptions options)
resources:  _:    type: aws:eks:PodIdentityAssociation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AssociationArn string
The Amazon Resource Name (ARN) of the association.
AssociationId string
The ID of the association.
ClusterName string
The name of the cluster to create the association in.
Namespace string
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
RoleArn string
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
ServiceAccount string

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

Tags Dictionary<string, string>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

AssociationArn string
The Amazon Resource Name (ARN) of the association.
AssociationId string
The ID of the association.
ClusterName string
The name of the cluster to create the association in.
Namespace string
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
RoleArn string
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
ServiceAccount string

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

Tags map[string]string
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

associationArn String
The Amazon Resource Name (ARN) of the association.
associationId String
The ID of the association.
clusterName String
The name of the cluster to create the association in.
namespace String
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
roleArn String
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
serviceAccount String

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

tags Map<String,String>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

associationArn string
The Amazon Resource Name (ARN) of the association.
associationId string
The ID of the association.
clusterName string
The name of the cluster to create the association in.
namespace string
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
roleArn string
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
serviceAccount string

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

tags {[key: string]: string}
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

association_arn str
The Amazon Resource Name (ARN) of the association.
association_id str
The ID of the association.
cluster_name str
The name of the cluster to create the association in.
namespace str
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
role_arn str
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
service_account str

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

tags Mapping[str, str]
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

associationArn String
The Amazon Resource Name (ARN) of the association.
associationId String
The ID of the association.
clusterName String
The name of the cluster to create the association in.
namespace String
The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
roleArn String
The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
serviceAccount String

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.

The following arguments are optional:

tags Map<String>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Import

Using pulumi import, import EKS (Elastic Kubernetes) Pod Identity Association using the cluster_name and association_id separated by a comma (,). For example:

$ pulumi import aws:eks/podIdentityAssociation:PodIdentityAssociation example example,a-12345678
Copy

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.