1. Packages
  2. AWS
  3. API Docs
  4. emrcontainers
  5. VirtualCluster
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.emrcontainers.VirtualCluster

Explore with Pulumi AI

Manages an EMR Containers (EMR on EKS) Virtual Cluster.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.emrcontainers.VirtualCluster("example", {
    containerProvider: {
        id: exampleAwsEksCluster.name,
        type: "EKS",
        info: {
            eksInfo: {
                namespace: "default",
            },
        },
    },
    name: "example",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.emrcontainers.VirtualCluster("example",
    container_provider={
        "id": example_aws_eks_cluster["name"],
        "type": "EKS",
        "info": {
            "eks_info": {
                "namespace": "default",
            },
        },
    },
    name="example")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emrcontainers"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := emrcontainers.NewVirtualCluster(ctx, "example", &emrcontainers.VirtualClusterArgs{
			ContainerProvider: &emrcontainers.VirtualClusterContainerProviderArgs{
				Id:   pulumi.Any(exampleAwsEksCluster.Name),
				Type: pulumi.String("EKS"),
				Info: &emrcontainers.VirtualClusterContainerProviderInfoArgs{
					EksInfo: &emrcontainers.VirtualClusterContainerProviderInfoEksInfoArgs{
						Namespace: pulumi.String("default"),
					},
				},
			},
			Name: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.EmrContainers.VirtualCluster("example", new()
    {
        ContainerProvider = new Aws.EmrContainers.Inputs.VirtualClusterContainerProviderArgs
        {
            Id = exampleAwsEksCluster.Name,
            Type = "EKS",
            Info = new Aws.EmrContainers.Inputs.VirtualClusterContainerProviderInfoArgs
            {
                EksInfo = new Aws.EmrContainers.Inputs.VirtualClusterContainerProviderInfoEksInfoArgs
                {
                    Namespace = "default",
                },
            },
        },
        Name = "example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.emrcontainers.VirtualCluster;
import com.pulumi.aws.emrcontainers.VirtualClusterArgs;
import com.pulumi.aws.emrcontainers.inputs.VirtualClusterContainerProviderArgs;
import com.pulumi.aws.emrcontainers.inputs.VirtualClusterContainerProviderInfoArgs;
import com.pulumi.aws.emrcontainers.inputs.VirtualClusterContainerProviderInfoEksInfoArgs;
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 VirtualCluster("example", VirtualClusterArgs.builder()
            .containerProvider(VirtualClusterContainerProviderArgs.builder()
                .id(exampleAwsEksCluster.name())
                .type("EKS")
                .info(VirtualClusterContainerProviderInfoArgs.builder()
                    .eksInfo(VirtualClusterContainerProviderInfoEksInfoArgs.builder()
                        .namespace("default")
                        .build())
                    .build())
                .build())
            .name("example")
            .build());

    }
}
Copy
resources:
  example:
    type: aws:emrcontainers:VirtualCluster
    properties:
      containerProvider:
        id: ${exampleAwsEksCluster.name}
        type: EKS
        info:
          eksInfo:
            namespace: default
      name: example
Copy

Create VirtualCluster Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VirtualCluster(name: string, args: VirtualClusterArgs, opts?: CustomResourceOptions);
@overload
def VirtualCluster(resource_name: str,
                   args: VirtualClusterArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def VirtualCluster(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   container_provider: Optional[VirtualClusterContainerProviderArgs] = None,
                   name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None)
func NewVirtualCluster(ctx *Context, name string, args VirtualClusterArgs, opts ...ResourceOption) (*VirtualCluster, error)
public VirtualCluster(string name, VirtualClusterArgs args, CustomResourceOptions? opts = null)
public VirtualCluster(String name, VirtualClusterArgs args)
public VirtualCluster(String name, VirtualClusterArgs args, CustomResourceOptions options)
type: aws:emrcontainers:VirtualCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VirtualClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VirtualClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VirtualClusterArgs
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 virtualClusterResource = new Aws.EmrContainers.VirtualCluster("virtualClusterResource", new()
{
    ContainerProvider = new Aws.EmrContainers.Inputs.VirtualClusterContainerProviderArgs
    {
        Id = "string",
        Info = new Aws.EmrContainers.Inputs.VirtualClusterContainerProviderInfoArgs
        {
            EksInfo = new Aws.EmrContainers.Inputs.VirtualClusterContainerProviderInfoEksInfoArgs
            {
                Namespace = "string",
            },
        },
        Type = "string",
    },
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := emrcontainers.NewVirtualCluster(ctx, "virtualClusterResource", &emrcontainers.VirtualClusterArgs{
	ContainerProvider: &emrcontainers.VirtualClusterContainerProviderArgs{
		Id: pulumi.String("string"),
		Info: &emrcontainers.VirtualClusterContainerProviderInfoArgs{
			EksInfo: &emrcontainers.VirtualClusterContainerProviderInfoEksInfoArgs{
				Namespace: pulumi.String("string"),
			},
		},
		Type: pulumi.String("string"),
	},
	Name: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var virtualClusterResource = new VirtualCluster("virtualClusterResource", VirtualClusterArgs.builder()
    .containerProvider(VirtualClusterContainerProviderArgs.builder()
        .id("string")
        .info(VirtualClusterContainerProviderInfoArgs.builder()
            .eksInfo(VirtualClusterContainerProviderInfoEksInfoArgs.builder()
                .namespace("string")
                .build())
            .build())
        .type("string")
        .build())
    .name("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
virtual_cluster_resource = aws.emrcontainers.VirtualCluster("virtualClusterResource",
    container_provider={
        "id": "string",
        "info": {
            "eks_info": {
                "namespace": "string",
            },
        },
        "type": "string",
    },
    name="string",
    tags={
        "string": "string",
    })
Copy
const virtualClusterResource = new aws.emrcontainers.VirtualCluster("virtualClusterResource", {
    containerProvider: {
        id: "string",
        info: {
            eksInfo: {
                namespace: "string",
            },
        },
        type: "string",
    },
    name: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:emrcontainers:VirtualCluster
properties:
    containerProvider:
        id: string
        info:
            eksInfo:
                namespace: string
        type: string
    name: string
    tags:
        string: string
Copy

VirtualCluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VirtualCluster resource accepts the following input properties:

ContainerProvider
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProvider
Configuration block for the container provider associated with your cluster.
Name Changes to this property will trigger replacement. string
Name of the virtual cluster.
Tags Dictionary<string, string>
Key-value mapping 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.
ContainerProvider
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderArgs
Configuration block for the container provider associated with your cluster.
Name Changes to this property will trigger replacement. string
Name of the virtual cluster.
Tags map[string]string
Key-value mapping 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.
containerProvider
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProvider
Configuration block for the container provider associated with your cluster.
name Changes to this property will trigger replacement. String
Name of the virtual cluster.
tags Map<String,String>
Key-value mapping 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.
containerProvider
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProvider
Configuration block for the container provider associated with your cluster.
name Changes to this property will trigger replacement. string
Name of the virtual cluster.
tags {[key: string]: string}
Key-value mapping 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.
container_provider
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderArgs
Configuration block for the container provider associated with your cluster.
name Changes to this property will trigger replacement. str
Name of the virtual cluster.
tags Mapping[str, str]
Key-value mapping 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.
containerProvider
This property is required.
Changes to this property will trigger replacement.
Property Map
Configuration block for the container provider associated with your cluster.
name Changes to this property will trigger replacement. String
Name of the virtual cluster.
tags Map<String>
Key-value mapping 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.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualCluster resource produces the following output properties:

Arn string
ARN of the cluster.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
ARN of the cluster.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll map[string]string
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the cluster.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
ARN of the cluster.
id string
The provider-assigned unique ID for this managed resource.
tagsAll {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
ARN of the cluster.
id str
The provider-assigned unique ID for this managed resource.
tags_all Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the cluster.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing VirtualCluster Resource

Get an existing VirtualCluster 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?: VirtualClusterState, opts?: CustomResourceOptions): VirtualCluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        container_provider: Optional[VirtualClusterContainerProviderArgs] = None,
        name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> VirtualCluster
func GetVirtualCluster(ctx *Context, name string, id IDInput, state *VirtualClusterState, opts ...ResourceOption) (*VirtualCluster, error)
public static VirtualCluster Get(string name, Input<string> id, VirtualClusterState? state, CustomResourceOptions? opts = null)
public static VirtualCluster get(String name, Output<String> id, VirtualClusterState state, CustomResourceOptions options)
resources:  _:    type: aws:emrcontainers:VirtualCluster    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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
ARN of the cluster.
ContainerProvider Changes to this property will trigger replacement. VirtualClusterContainerProvider
Configuration block for the container provider associated with your cluster.
Name Changes to this property will trigger replacement. string
Name of the virtual cluster.
Tags Dictionary<string, string>
Key-value mapping 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.
TagsAll Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
ARN of the cluster.
ContainerProvider Changes to this property will trigger replacement. VirtualClusterContainerProviderArgs
Configuration block for the container provider associated with your cluster.
Name Changes to this property will trigger replacement. string
Name of the virtual cluster.
Tags map[string]string
Key-value mapping 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.
TagsAll map[string]string
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the cluster.
containerProvider Changes to this property will trigger replacement. VirtualClusterContainerProvider
Configuration block for the container provider associated with your cluster.
name Changes to this property will trigger replacement. String
Name of the virtual cluster.
tags Map<String,String>
Key-value mapping 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.
tagsAll Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
ARN of the cluster.
containerProvider Changes to this property will trigger replacement. VirtualClusterContainerProvider
Configuration block for the container provider associated with your cluster.
name Changes to this property will trigger replacement. string
Name of the virtual cluster.
tags {[key: string]: string}
Key-value mapping 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.
tagsAll {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
ARN of the cluster.
container_provider Changes to this property will trigger replacement. VirtualClusterContainerProviderArgs
Configuration block for the container provider associated with your cluster.
name Changes to this property will trigger replacement. str
Name of the virtual cluster.
tags Mapping[str, str]
Key-value mapping 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.
tags_all Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the cluster.
containerProvider Changes to this property will trigger replacement. Property Map
Configuration block for the container provider associated with your cluster.
name Changes to this property will trigger replacement. String
Name of the virtual cluster.
tags Map<String>
Key-value mapping 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.
tagsAll Map<String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Supporting Types

VirtualClusterContainerProvider
, VirtualClusterContainerProviderArgs

Id
This property is required.
Changes to this property will trigger replacement.
string
The name of the container provider that is running your EMR Containers cluster
Info
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfo
Nested list containing information about the configuration of the container provider
Type
This property is required.
Changes to this property will trigger replacement.
string
The type of the container provider
Id
This property is required.
Changes to this property will trigger replacement.
string
The name of the container provider that is running your EMR Containers cluster
Info
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfo
Nested list containing information about the configuration of the container provider
Type
This property is required.
Changes to this property will trigger replacement.
string
The type of the container provider
id
This property is required.
Changes to this property will trigger replacement.
String
The name of the container provider that is running your EMR Containers cluster
info
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfo
Nested list containing information about the configuration of the container provider
type
This property is required.
Changes to this property will trigger replacement.
String
The type of the container provider
id
This property is required.
Changes to this property will trigger replacement.
string
The name of the container provider that is running your EMR Containers cluster
info
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfo
Nested list containing information about the configuration of the container provider
type
This property is required.
Changes to this property will trigger replacement.
string
The type of the container provider
id
This property is required.
Changes to this property will trigger replacement.
str
The name of the container provider that is running your EMR Containers cluster
info
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfo
Nested list containing information about the configuration of the container provider
type
This property is required.
Changes to this property will trigger replacement.
str
The type of the container provider
id
This property is required.
Changes to this property will trigger replacement.
String
The name of the container provider that is running your EMR Containers cluster
info
This property is required.
Changes to this property will trigger replacement.
Property Map
Nested list containing information about the configuration of the container provider
type
This property is required.
Changes to this property will trigger replacement.
String
The type of the container provider

VirtualClusterContainerProviderInfo
, VirtualClusterContainerProviderInfoArgs

EksInfo
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfoEksInfo
Nested list containing EKS-specific information about the cluster where the EMR Containers cluster is running
EksInfo
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfoEksInfo
Nested list containing EKS-specific information about the cluster where the EMR Containers cluster is running
eksInfo
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfoEksInfo
Nested list containing EKS-specific information about the cluster where the EMR Containers cluster is running
eksInfo
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfoEksInfo
Nested list containing EKS-specific information about the cluster where the EMR Containers cluster is running
eks_info
This property is required.
Changes to this property will trigger replacement.
VirtualClusterContainerProviderInfoEksInfo
Nested list containing EKS-specific information about the cluster where the EMR Containers cluster is running
eksInfo
This property is required.
Changes to this property will trigger replacement.
Property Map
Nested list containing EKS-specific information about the cluster where the EMR Containers cluster is running

VirtualClusterContainerProviderInfoEksInfo
, VirtualClusterContainerProviderInfoEksInfoArgs

Namespace Changes to this property will trigger replacement. string
The namespace where the EMR Containers cluster is running
Namespace Changes to this property will trigger replacement. string
The namespace where the EMR Containers cluster is running
namespace Changes to this property will trigger replacement. String
The namespace where the EMR Containers cluster is running
namespace Changes to this property will trigger replacement. string
The namespace where the EMR Containers cluster is running
namespace Changes to this property will trigger replacement. str
The namespace where the EMR Containers cluster is running
namespace Changes to this property will trigger replacement. String
The namespace where the EMR Containers cluster is running

Import

Using pulumi import, import EKS Clusters using the id. For example:

$ pulumi import aws:emrcontainers/virtualCluster:VirtualCluster example a1b2c3d4e5f6g7h8i9j10k11l
Copy

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.