FargateProfile
Manages an EKS Fargate Profile.
Example Usage
Example IAM Role for EKS Fargate Profile
using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Iam.Role("example", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
{
{ "Statement", new[]
{
new Dictionary<string, object?>
{
{ "Action", "sts:AssumeRole" },
{ "Effect", "Allow" },
{ "Principal", new Dictionary<string, object?>
{
{ "Service", "eks-fargate-pods.amazonaws.com" },
} },
},
}
},
{ "Version", "2012-10-17" },
}),
});
var example_AmazonEKSFargatePodExecutionRolePolicy = new Aws.Iam.RolePolicyAttachment("example-AmazonEKSFargatePodExecutionRolePolicy", new Aws.Iam.RolePolicyAttachmentArgs
{
PolicyArn = "arn:aws:iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy",
Role = example.Name,
});
}
}
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"Statement": []map[string]interface{}{
map[string]interface{}{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": map[string]interface{}{
"Service": "eks-fargate-pods.amazonaws.com",
},
},
},
"Version": "2012-10-17",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
example, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
AssumeRolePolicy: pulumi.String(json0),
})
if err != nil {
return err
}
_, err = iam.NewRolePolicyAttachment(ctx, "example_AmazonEKSFargatePodExecutionRolePolicy", &iam.RolePolicyAttachmentArgs{
PolicyArn: pulumi.String("arn:aws:iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy"),
Role: example.Name,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import json
import pulumi_aws as aws
example = aws.iam.Role("example", assume_role_policy=json.dumps({
"Statement": [{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "eks-fargate-pods.amazonaws.com",
},
}],
"Version": "2012-10-17",
}))
example__amazon_eks_fargate_pod_execution_role_policy = aws.iam.RolePolicyAttachment("example-AmazonEKSFargatePodExecutionRolePolicy",
policy_arn="arn:aws:iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy",
role=example.name)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.iam.Role("example", {assumeRolePolicy: JSON.stringify({
Statement: [{
Action: "sts:AssumeRole",
Effect: "Allow",
Principal: {
Service: "eks-fargate-pods.amazonaws.com",
},
}],
Version: "2012-10-17",
})});
const example_AmazonEKSFargatePodExecutionRolePolicy = new aws.iam.RolePolicyAttachment("example-AmazonEKSFargatePodExecutionRolePolicy", {
policyArn: "arn:aws:iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy",
role: example.name,
});Create a FargateProfile Resource
new FargateProfile(name: string, args: FargateProfileArgs, opts?: CustomResourceOptions);def FargateProfile(resource_name, opts=None, cluster_name=None, fargate_profile_name=None, pod_execution_role_arn=None, selectors=None, subnet_ids=None, tags=None, __props__=None);func NewFargateProfile(ctx *Context, name string, args FargateProfileArgs, opts ...ResourceOption) (*FargateProfile, error)public FargateProfile(string name, FargateProfileArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args FargateProfileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FargateProfileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FargateProfileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
FargateProfile Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The FargateProfile resource accepts the following input properties:
- Cluster
Name string Name of the EKS Cluster.
- Pod
Execution stringRole Arn Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.
- Selectors
List<Fargate
Profile Selector Args> Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.
- Fargate
Profile stringName Name of the EKS Fargate Profile.
- Subnet
Ids 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(whereCLUSTER_NAMEis replaced with the name of the EKS Cluster).- Dictionary<string, string>
Key-value map of resource tags.
- Cluster
Name string Name of the EKS Cluster.
- Pod
Execution stringRole Arn Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.
- Selectors
[]Fargate
Profile Selector Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.
- Fargate
Profile stringName Name of the EKS Fargate Profile.
- Subnet
Ids []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(whereCLUSTER_NAMEis replaced with the name of the EKS Cluster).- map[string]string
Key-value map of resource tags.
- cluster
Name string Name of the EKS Cluster.
- pod
Execution stringRole Arn Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.
- selectors
Fargate
Profile Selector[] Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.
- fargate
Profile stringName Name of the EKS Fargate Profile.
- subnet
Ids 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(whereCLUSTER_NAMEis replaced with the name of the EKS Cluster).- {[key: string]: string}
Key-value map of resource tags.
- cluster_
name str Name of the EKS Cluster.
- pod_
execution_ strrole_ arn Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.
- selectors
List[Fargate
Profile Selector] Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.
- fargate_
profile_ strname Name of the EKS Fargate Profile.
- subnet_
ids List[str] 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(whereCLUSTER_NAMEis replaced with the name of the EKS Cluster).- Dict[str, str]
Key-value map of resource tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the FargateProfile resource produces the following output properties:
Look up an Existing FargateProfile Resource
Get an existing FargateProfile 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?: FargateProfileState, opts?: CustomResourceOptions): FargateProfilestatic get(resource_name, id, opts=None, arn=None, cluster_name=None, fargate_profile_name=None, pod_execution_role_arn=None, selectors=None, status=None, subnet_ids=None, tags=None, __props__=None);func GetFargateProfile(ctx *Context, name string, id IDInput, state *FargateProfileState, opts ...ResourceOption) (*FargateProfile, error)public static FargateProfile Get(string name, Input<string> id, FargateProfileState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Arn string
Amazon Resource Name (ARN) of the EKS Fargate Profile.
- Cluster
Name string Name of the EKS Cluster.
- Fargate
Profile stringName Name of the EKS Fargate Profile.
- Pod
Execution stringRole Arn Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.
- Selectors
List<Fargate
Profile Selector Args> Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.
- Status string
Status of the EKS Fargate Profile.
- Subnet
Ids 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(whereCLUSTER_NAMEis replaced with the name of the EKS Cluster).- Dictionary<string, string>
Key-value map of resource tags.
- Arn string
Amazon Resource Name (ARN) of the EKS Fargate Profile.
- Cluster
Name string Name of the EKS Cluster.
- Fargate
Profile stringName Name of the EKS Fargate Profile.
- Pod
Execution stringRole Arn Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.
- Selectors
[]Fargate
Profile Selector Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.
- Status string
Status of the EKS Fargate Profile.
- Subnet
Ids []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(whereCLUSTER_NAMEis replaced with the name of the EKS Cluster).- map[string]string
Key-value map of resource tags.
- arn string
Amazon Resource Name (ARN) of the EKS Fargate Profile.
- cluster
Name string Name of the EKS Cluster.
- fargate
Profile stringName Name of the EKS Fargate Profile.
- pod
Execution stringRole Arn Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.
- selectors
Fargate
Profile Selector[] Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.
- status string
Status of the EKS Fargate Profile.
- subnet
Ids 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(whereCLUSTER_NAMEis replaced with the name of the EKS Cluster).- {[key: string]: string}
Key-value map of resource tags.
- arn str
Amazon Resource Name (ARN) of the EKS Fargate Profile.
- cluster_
name str Name of the EKS Cluster.
- fargate_
profile_ strname Name of the EKS Fargate Profile.
- pod_
execution_ strrole_ arn Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Fargate Profile.
- selectors
List[Fargate
Profile Selector] Configuration block(s) for selecting Kubernetes Pods to execute with this EKS Fargate Profile. Detailed below.
- status str
Status of the EKS Fargate Profile.
- subnet_
ids List[str] 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(whereCLUSTER_NAMEis replaced with the name of the EKS Cluster).- Dict[str, str]
Key-value map of resource tags.
Supporting Types
FargateProfileSelector
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.