aws.eks.AccessEntry
Explore with Pulumi AI
Access Entry Configurations for an EKS Cluster.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.eks.AccessEntry("example", {
    clusterName: exampleAwsEksCluster.name,
    principalArn: exampleAwsIamRole.arn,
    kubernetesGroups: [
        "group-1",
        "group-2",
    ],
    type: "STANDARD",
});
import pulumi
import pulumi_aws as aws
example = aws.eks.AccessEntry("example",
    cluster_name=example_aws_eks_cluster["name"],
    principal_arn=example_aws_iam_role["arn"],
    kubernetes_groups=[
        "group-1",
        "group-2",
    ],
    type="STANDARD")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eks.NewAccessEntry(ctx, "example", &eks.AccessEntryArgs{
			ClusterName:  pulumi.Any(exampleAwsEksCluster.Name),
			PrincipalArn: pulumi.Any(exampleAwsIamRole.Arn),
			KubernetesGroups: pulumi.StringArray{
				pulumi.String("group-1"),
				pulumi.String("group-2"),
			},
			Type: pulumi.String("STANDARD"),
		})
		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.Eks.AccessEntry("example", new()
    {
        ClusterName = exampleAwsEksCluster.Name,
        PrincipalArn = exampleAwsIamRole.Arn,
        KubernetesGroups = new[]
        {
            "group-1",
            "group-2",
        },
        Type = "STANDARD",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.eks.AccessEntry;
import com.pulumi.aws.eks.AccessEntryArgs;
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 AccessEntry("example", AccessEntryArgs.builder()
            .clusterName(exampleAwsEksCluster.name())
            .principalArn(exampleAwsIamRole.arn())
            .kubernetesGroups(            
                "group-1",
                "group-2")
            .type("STANDARD")
            .build());
    }
}
resources:
  example:
    type: aws:eks:AccessEntry
    properties:
      clusterName: ${exampleAwsEksCluster.name}
      principalArn: ${exampleAwsIamRole.arn}
      kubernetesGroups:
        - group-1
        - group-2
      type: STANDARD
Create AccessEntry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccessEntry(name: string, args: AccessEntryArgs, opts?: CustomResourceOptions);@overload
def AccessEntry(resource_name: str,
                args: AccessEntryArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def AccessEntry(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                cluster_name: Optional[str] = None,
                principal_arn: Optional[str] = None,
                kubernetes_groups: Optional[Sequence[str]] = None,
                tags: Optional[Mapping[str, str]] = None,
                type: Optional[str] = None,
                user_name: Optional[str] = None)func NewAccessEntry(ctx *Context, name string, args AccessEntryArgs, opts ...ResourceOption) (*AccessEntry, error)public AccessEntry(string name, AccessEntryArgs args, CustomResourceOptions? opts = null)
public AccessEntry(String name, AccessEntryArgs args)
public AccessEntry(String name, AccessEntryArgs args, CustomResourceOptions options)
type: aws:eks:AccessEntry
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 AccessEntryArgs
- 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 AccessEntryArgs
- 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 AccessEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccessEntryArgs
- 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 accessEntryResource = new Aws.Eks.AccessEntry("accessEntryResource", new()
{
    ClusterName = "string",
    PrincipalArn = "string",
    KubernetesGroups = new[]
    {
        "string",
    },
    Tags = 
    {
        { "string", "string" },
    },
    Type = "string",
    UserName = "string",
});
example, err := eks.NewAccessEntry(ctx, "accessEntryResource", &eks.AccessEntryArgs{
	ClusterName:  pulumi.String("string"),
	PrincipalArn: pulumi.String("string"),
	KubernetesGroups: pulumi.StringArray{
		pulumi.String("string"),
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Type:     pulumi.String("string"),
	UserName: pulumi.String("string"),
})
var accessEntryResource = new AccessEntry("accessEntryResource", AccessEntryArgs.builder()
    .clusterName("string")
    .principalArn("string")
    .kubernetesGroups("string")
    .tags(Map.of("string", "string"))
    .type("string")
    .userName("string")
    .build());
access_entry_resource = aws.eks.AccessEntry("accessEntryResource",
    cluster_name="string",
    principal_arn="string",
    kubernetes_groups=["string"],
    tags={
        "string": "string",
    },
    type="string",
    user_name="string")
const accessEntryResource = new aws.eks.AccessEntry("accessEntryResource", {
    clusterName: "string",
    principalArn: "string",
    kubernetesGroups: ["string"],
    tags: {
        string: "string",
    },
    type: "string",
    userName: "string",
});
type: aws:eks:AccessEntry
properties:
    clusterName: string
    kubernetesGroups:
        - string
    principalArn: string
    tags:
        string: string
    type: string
    userName: string
AccessEntry 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 AccessEntry resource accepts the following input properties:
- ClusterName string
- Name of the EKS Cluster.
- PrincipalArn string
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- KubernetesGroups List<string>
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Type string
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- UserName string
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- ClusterName string
- Name of the EKS Cluster.
- PrincipalArn string
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- KubernetesGroups []string
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- map[string]string
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Type string
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- UserName string
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- clusterName String
- Name of the EKS Cluster.
- principalArn String
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- kubernetesGroups List<String>
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- Map<String,String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- type String
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- userName String
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- clusterName string
- Name of the EKS Cluster.
- principalArn string
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- kubernetesGroups string[]
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- type string
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- userName string
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- cluster_name str
- Name of the EKS Cluster.
- principal_arn str
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- kubernetes_groups Sequence[str]
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- type str
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- user_name str
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- clusterName String
- Name of the EKS Cluster.
- principalArn String
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- kubernetesGroups List<String>
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- Map<String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- type String
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- userName String
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessEntry resource produces the following output properties:
- AccessEntry stringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- CreatedAt string
- Date and time in RFC3339 format that the EKS add-on was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- ModifiedAt string
- Date and time in RFC3339 format that the EKS add-on was updated.
- Dictionary<string, string>
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- AccessEntry stringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- CreatedAt string
- Date and time in RFC3339 format that the EKS add-on was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- ModifiedAt string
- Date and time in RFC3339 format that the EKS add-on was updated.
- map[string]string
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- accessEntry StringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- createdAt String
- Date and time in RFC3339 format that the EKS add-on was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modifiedAt String
- Date and time in RFC3339 format that the EKS add-on was updated.
- Map<String,String>
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- accessEntry stringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- createdAt string
- Date and time in RFC3339 format that the EKS add-on was created.
- id string
- The provider-assigned unique ID for this managed resource.
- modifiedAt string
- Date and time in RFC3339 format that the EKS add-on was updated.
- {[key: string]: string}
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- access_entry_ strarn 
- Amazon Resource Name (ARN) of the Access Entry.
- created_at str
- Date and time in RFC3339 format that the EKS add-on was created.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_at str
- Date and time in RFC3339 format that the EKS add-on was updated.
- Mapping[str, str]
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- accessEntry StringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- createdAt String
- Date and time in RFC3339 format that the EKS add-on was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modifiedAt String
- Date and time in RFC3339 format that the EKS add-on was updated.
- Map<String>
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
Look up Existing AccessEntry Resource
Get an existing AccessEntry 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?: AccessEntryState, opts?: CustomResourceOptions): AccessEntry@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_entry_arn: Optional[str] = None,
        cluster_name: Optional[str] = None,
        created_at: Optional[str] = None,
        kubernetes_groups: Optional[Sequence[str]] = None,
        modified_at: Optional[str] = None,
        principal_arn: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        type: Optional[str] = None,
        user_name: Optional[str] = None) -> AccessEntryfunc GetAccessEntry(ctx *Context, name string, id IDInput, state *AccessEntryState, opts ...ResourceOption) (*AccessEntry, error)public static AccessEntry Get(string name, Input<string> id, AccessEntryState? state, CustomResourceOptions? opts = null)public static AccessEntry get(String name, Output<String> id, AccessEntryState state, CustomResourceOptions options)resources:  _:    type: aws:eks:AccessEntry    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.
- AccessEntry stringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- ClusterName string
- Name of the EKS Cluster.
- CreatedAt string
- Date and time in RFC3339 format that the EKS add-on was created.
- KubernetesGroups List<string>
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- ModifiedAt string
- Date and time in RFC3339 format that the EKS add-on was updated.
- PrincipalArn string
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- Type string
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- UserName string
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- AccessEntry stringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- ClusterName string
- Name of the EKS Cluster.
- CreatedAt string
- Date and time in RFC3339 format that the EKS add-on was created.
- KubernetesGroups []string
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- ModifiedAt string
- Date and time in RFC3339 format that the EKS add-on was updated.
- PrincipalArn string
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- map[string]string
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- Type string
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- UserName string
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- accessEntry StringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- clusterName String
- Name of the EKS Cluster.
- createdAt String
- Date and time in RFC3339 format that the EKS add-on was created.
- kubernetesGroups List<String>
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- modifiedAt String
- Date and time in RFC3339 format that the EKS add-on was updated.
- principalArn String
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- Map<String,String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- type String
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- userName String
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- accessEntry stringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- clusterName string
- Name of the EKS Cluster.
- createdAt string
- Date and time in RFC3339 format that the EKS add-on was created.
- kubernetesGroups string[]
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- modifiedAt string
- Date and time in RFC3339 format that the EKS add-on was updated.
- principalArn string
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- type string
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- userName string
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- access_entry_ strarn 
- Amazon Resource Name (ARN) of the Access Entry.
- cluster_name str
- Name of the EKS Cluster.
- created_at str
- Date and time in RFC3339 format that the EKS add-on was created.
- kubernetes_groups Sequence[str]
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- modified_at str
- Date and time in RFC3339 format that the EKS add-on was updated.
- principal_arn str
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- type str
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- user_name str
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- accessEntry StringArn 
- Amazon Resource Name (ARN) of the Access Entry.
- clusterName String
- Name of the EKS Cluster.
- createdAt String
- Date and time in RFC3339 format that the EKS add-on was created.
- kubernetesGroups List<String>
- List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- modifiedAt String
- Date and time in RFC3339 format that the EKS add-on was updated.
- principalArn String
- The IAM Principal ARN which requires Authentication access to the EKS cluster. - The following arguments are optional: 
- Map<String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- (Optional) Key-value map of resource tags, including those inherited from the provider default_tagsconfiguration block.
- type String
- Defaults to STANDARD which provides the standard workflow. EC2_LINUX, EC2_WINDOWS, FARGATE_LINUX types disallow users to input a username or groups, and prevent associations.
- userName String
- Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
Import
Using pulumi import, import EKS access entry using the cluster_name and principal_arn separated by a colon (:). For example:
$ pulumi import aws:eks/accessEntry:AccessEntry my_eks_access_entry my_cluster_name:my_principal_arn
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 awsTerraform Provider.