FargateProfileArgs

data class FargateProfileArgs(val clusterName: Output<String>? = null, val fargateProfileName: Output<String>? = null, val podExecutionRoleArn: Output<String>? = null, val selectors: Output<List<FargateProfileSelectorArgs>>? = null, val subnetIds: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<FargateProfileArgs>

Manages an EKS Fargate Profile.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.eks.FargateProfile;
import com.pulumi.aws.eks.FargateProfileArgs;
import com.pulumi.aws.eks.inputs.FargateProfileSelectorArgs;
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 FargateProfile("example", FargateProfileArgs.builder()
.clusterName(aws_eks_cluster.example().name())
.podExecutionRoleArn(aws_iam_role.example().arn())
.subnetIds(aws_subnet.example().stream().map(element -> element.id()).collect(toList()))
.selectors(FargateProfileSelectorArgs.builder()
.namespace("example")
.build())
.build());
}
}

Example IAM Role for EKS Fargate Profile

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 static com.pulumi.codegen.internal.Serialization.*;
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 Role("example", RoleArgs.builder()
.assumeRolePolicy(serializeJson(
jsonObject(
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Action", "sts:AssumeRole"),
jsonProperty("Effect", "Allow"),
jsonProperty("Principal", jsonObject(
jsonProperty("Service", "eks-fargate-pods.amazonaws.com")
))
))),
jsonProperty("Version", "2012-10-17")
)))
.build());
var example_AmazonEKSFargatePodExecutionRolePolicy = new RolePolicyAttachment("example-AmazonEKSFargatePodExecutionRolePolicy", RolePolicyAttachmentArgs.builder()
.policyArn("arn:aws:iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy")
.role(example.name())
.build());
}
}

Import

EKS Fargate Profiles can be imported using the cluster_name and fargate_profile_name separated by a colon (:), e.g.,

$ pulumi import aws:eks/fargateProfile:FargateProfile my_fargate_profile my_cluster:my_fargate_profile

Constructors

Link copied to clipboard
constructor(clusterName: Output<String>? = null, fargateProfileName: Output<String>? = null, podExecutionRoleArn: Output<String>? = null, selectors: Output<List<FargateProfileSelectorArgs>>? = null, subnetIds: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val clusterName: Output<String>? = null

Name of the EKS Cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (^[0-9A-Za-z][A-Za-z0-9\-_]+$).

Link copied to clipboard
val fargateProfileName: Output<String>? = null

Name of the EKS Fargate Profile.

Link copied to clipboard
val podExecutionRoleArn: Output<String>? = null

Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.

Link copied to clipboard

Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.

Link copied to clipboard
val subnetIds: Output<List<String>>? = null

Identifiers of private EC2 Subnets to associate with the EKS Fargate Profile. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster). The following arguments are optional:

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): FargateProfileArgs