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
The AccessEntry resource accepts the following input properties:
- Cluster
Name string - Name of the EKS Cluster.
- Principal
Arn string The IAM Principal ARN which requires Authentication access to the EKS cluster.
The following arguments are optional:
- Kubernetes
Groups 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_tags
configuration 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.
- User
Name string - Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- Cluster
Name string - Name of the EKS Cluster.
- Principal
Arn string The IAM Principal ARN which requires Authentication access to the EKS cluster.
The following arguments are optional:
- Kubernetes
Groups []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_tags
configuration 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.
- User
Name string - Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- cluster
Name String - Name of the EKS Cluster.
- principal
Arn String The IAM Principal ARN which requires Authentication access to the EKS cluster.
The following arguments are optional:
- kubernetes
Groups 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_tags
configuration 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.
- user
Name String - Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- cluster
Name string - Name of the EKS Cluster.
- principal
Arn string The IAM Principal ARN which requires Authentication access to the EKS cluster.
The following arguments are optional:
- kubernetes
Groups 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_tags
configuration 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.
- user
Name 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_tags
configuration 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.
- cluster
Name String - Name of the EKS Cluster.
- principal
Arn String The IAM Principal ARN which requires Authentication access to the EKS cluster.
The following arguments are optional:
- kubernetes
Groups 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_tags
configuration 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.
- user
Name 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:
- Access
Entry stringArn - Amazon Resource Name (ARN) of the Access Entry.
- Created
At 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.
- Modified
At 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_tags
configuration block.
- Access
Entry stringArn - Amazon Resource Name (ARN) of the Access Entry.
- Created
At 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.
- Modified
At 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_tags
configuration block.
- access
Entry StringArn - Amazon Resource Name (ARN) of the Access Entry.
- created
At 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.
- modified
At 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_tags
configuration block.
- access
Entry stringArn - Amazon Resource Name (ARN) of the Access Entry.
- created
At 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.
- modified
At 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_tags
configuration 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_tags
configuration block.
- access
Entry StringArn - Amazon Resource Name (ARN) of the Access Entry.
- created
At 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.
- modified
At 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_tags
configuration 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) -> AccessEntry
func 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)
Resource lookup is not supported in YAML
- 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.
- Access
Entry stringArn - Amazon Resource Name (ARN) of the Access Entry.
- Cluster
Name string - Name of the EKS Cluster.
- Created
At string - Date and time in RFC3339 format that the EKS add-on was created.
- Kubernetes
Groups List<string> - List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- Modified
At string - Date and time in RFC3339 format that the EKS add-on was updated.
- Principal
Arn 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_tags
configuration 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_tags
configuration 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.
- User
Name string - Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- Access
Entry stringArn - Amazon Resource Name (ARN) of the Access Entry.
- Cluster
Name string - Name of the EKS Cluster.
- Created
At string - Date and time in RFC3339 format that the EKS add-on was created.
- Kubernetes
Groups []string - List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- Modified
At string - Date and time in RFC3339 format that the EKS add-on was updated.
- Principal
Arn 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_tags
configuration 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_tags
configuration 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.
- User
Name string - Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- access
Entry StringArn - Amazon Resource Name (ARN) of the Access Entry.
- cluster
Name String - Name of the EKS Cluster.
- created
At String - Date and time in RFC3339 format that the EKS add-on was created.
- kubernetes
Groups List<String> - List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- modified
At String - Date and time in RFC3339 format that the EKS add-on was updated.
- principal
Arn 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_tags
configuration 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_tags
configuration 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.
- user
Name String - Defaults to principal ARN if user is principal else defaults to assume-role/session-name is role is used.
- access
Entry stringArn - Amazon Resource Name (ARN) of the Access Entry.
- cluster
Name string - Name of the EKS Cluster.
- created
At string - Date and time in RFC3339 format that the EKS add-on was created.
- kubernetes
Groups string[] - List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- modified
At string - Date and time in RFC3339 format that the EKS add-on was updated.
- principal
Arn 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_tags
configuration 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_tags
configuration 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.
- user
Name 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_tags
configuration 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_tags
configuration 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.
- access
Entry StringArn - Amazon Resource Name (ARN) of the Access Entry.
- cluster
Name String - Name of the EKS Cluster.
- created
At String - Date and time in RFC3339 format that the EKS add-on was created.
- kubernetes
Groups List<String> - List of string which can optionally specify the Kubernetes groups the user would belong to when creating an access entry.
- modified
At String - Date and time in RFC3339 format that the EKS add-on was updated.
- principal
Arn 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_tags
configuration 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_tags
configuration 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.
- user
Name 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
aws
Terraform Provider.