Resource Schema for AWS::EKS::FargateProfile
Fargate profile for defined namespace pods
resource "awscc_eks_fargate_profile" "example" {
cluster_name = awscc_eks_cluster.example.name
fargate_profile_name = "example"
pod_execution_role_arn = awscc_iam_role.example.arn
subnets = [awscc_ec2_subnet.example1.id, awscc_ec2_subnet.example2.id]
selectors = [{
namespace = "default"
}]
tags = [
{
key = "Managed By"
value = "AWSCC"
}
]
}
Fargate profile for defined namespace and labeled pods
resource "awscc_eks_fargate_profile" "example" {
cluster_name = awscc_eks_cluster.example.name
fargate_profile_name = "example"
pod_execution_role_arn = awscc_iam_role.example.arn
subnets = [awscc_ec2_subnet.example1.id, awscc_ec2_subnet.example2.id]
selectors = [{
namespace = "default"
labels = [{
key = "env"
value = "dev"
}]
}]
tags = [
{
key = "Managed By"
value = "AWSCC"
}
]
}
resource "awscc_iam_role" "example" {
role_name = "example-AmazonEKSFargatePodExecutionRole"
description = "Example AWS FargatePod execution role"
assume_role_policy_document = jsonencode({
Statement = [{
Action = "sts:AssumeRole"
Effect = "Allow"
Principal = {
Service = "eks-fargate-pods.amazonaws.com"
}
}]
Version = "2012-10-17"
})
managed_policy_arns = ["arn:aws:iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy"]
tags = [
{
key = "Managed By"
value = "AWSCC"
}
]
}
cluster_name
(String) Name of the Clusterpod_execution_role_arn
(String) The IAM policy arn for podsselectors
(Attributes List) (see below for nested schema)fargate_profile_name
(String) Name of FargateProfilesubnets
(List of String)tags
(Attributes List) An array of key-value pairs to apply to this resource. (see below for nested schema)arn
(String)id
(String) Uniquely identifies the resource.selectors
Required:
namespace
(String)Optional:
labels
(Attributes List) (see below for nested schema)selectors.labels
Required:
key
(String) The key name of the label.value
(String) The value for the label.tags
Required:
key
(String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.value
(String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.Import is supported using the following syntax:
$ terraform import awscc_eks_fargate_profile.example <resource ID>