FargateProfile

class FargateProfile : KotlinCustomResource

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

Properties

Link copied to clipboard
val arn: Output<String>

Amazon Resource Name (ARN) of the EKS Fargate Profile.

Link copied to clipboard
val clusterName: Output<String>

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

Name of the EKS Fargate Profile.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
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 status: Output<String>

Status of the EKS Fargate Profile.

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

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>>?

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.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>