Try AWS Native preview for resources not in the classic version.
aws.msk.ServerlessCluster
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages an Amazon MSK Serverless cluster.
Note: To manage a provisioned Amazon MSK cluster, use the
aws.msk.Cluster
resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.msk.ServerlessCluster("example", {
clusterName: "Example",
vpcConfigs: [{
subnetIds: exampleAwsSubnet.map(__item => __item.id),
securityGroupIds: [exampleAwsSecurityGroup.id],
}],
clientAuthentication: {
sasl: {
iam: {
enabled: true,
},
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.msk.ServerlessCluster("example",
cluster_name="Example",
vpc_configs=[{
"subnetIds": [__item["id"] for __item in example_aws_subnet],
"securityGroupIds": [example_aws_security_group["id"]],
}],
client_authentication={
"sasl": {
"iam": {
"enabled": True,
},
},
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := msk.NewServerlessCluster(ctx, "example", &msk.ServerlessClusterArgs{
ClusterName: pulumi.String("Example"),
VpcConfigs: msk.ServerlessClusterVpcConfigArray{
&msk.ServerlessClusterVpcConfigArgs{
SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:3,24-46),
SecurityGroupIds: pulumi.StringArray{
exampleAwsSecurityGroup.Id,
},
},
},
ClientAuthentication: &msk.ServerlessClusterClientAuthenticationArgs{
Sasl: &msk.ServerlessClusterClientAuthenticationSaslArgs{
Iam: &msk.ServerlessClusterClientAuthenticationSaslIamArgs{
Enabled: pulumi.Bool(true),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Msk.ServerlessCluster("example", new()
{
ClusterName = "Example",
VpcConfigs = new[]
{
new Aws.Msk.Inputs.ServerlessClusterVpcConfigArgs
{
SubnetIds = exampleAwsSubnet.Select(__item => __item.Id).ToList(),
SecurityGroupIds = new[]
{
exampleAwsSecurityGroup.Id,
},
},
},
ClientAuthentication = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationArgs
{
Sasl = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationSaslArgs
{
Iam = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationSaslIamArgs
{
Enabled = true,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.msk.ServerlessCluster;
import com.pulumi.aws.msk.ServerlessClusterArgs;
import com.pulumi.aws.msk.inputs.ServerlessClusterVpcConfigArgs;
import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationArgs;
import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationSaslArgs;
import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationSaslIamArgs;
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 ServerlessCluster("example", ServerlessClusterArgs.builder()
.clusterName("Example")
.vpcConfigs(ServerlessClusterVpcConfigArgs.builder()
.subnetIds(exampleAwsSubnet.stream().map(element -> element.id()).collect(toList()))
.securityGroupIds(exampleAwsSecurityGroup.id())
.build())
.clientAuthentication(ServerlessClusterClientAuthenticationArgs.builder()
.sasl(ServerlessClusterClientAuthenticationSaslArgs.builder()
.iam(ServerlessClusterClientAuthenticationSaslIamArgs.builder()
.enabled(true)
.build())
.build())
.build())
.build());
}
}
Coming soon!
Create ServerlessCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerlessCluster(name: string, args: ServerlessClusterArgs, opts?: CustomResourceOptions);
@overload
def ServerlessCluster(resource_name: str,
args: ServerlessClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerlessCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
client_authentication: Optional[ServerlessClusterClientAuthenticationArgs] = None,
vpc_configs: Optional[Sequence[ServerlessClusterVpcConfigArgs]] = None,
cluster_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewServerlessCluster(ctx *Context, name string, args ServerlessClusterArgs, opts ...ResourceOption) (*ServerlessCluster, error)
public ServerlessCluster(string name, ServerlessClusterArgs args, CustomResourceOptions? opts = null)
public ServerlessCluster(String name, ServerlessClusterArgs args)
public ServerlessCluster(String name, ServerlessClusterArgs args, CustomResourceOptions options)
type: aws:msk:ServerlessCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ServerlessClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ServerlessClusterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServerlessClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerlessClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerlessClusterArgs
- 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 serverlessClusterResource = new Aws.Msk.ServerlessCluster("serverlessClusterResource", new()
{
ClientAuthentication = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationArgs
{
Sasl = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationSaslArgs
{
Iam = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationSaslIamArgs
{
Enabled = false,
},
},
},
VpcConfigs = new[]
{
new Aws.Msk.Inputs.ServerlessClusterVpcConfigArgs
{
SubnetIds = new[]
{
"string",
},
SecurityGroupIds = new[]
{
"string",
},
},
},
ClusterName = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := msk.NewServerlessCluster(ctx, "serverlessClusterResource", &msk.ServerlessClusterArgs{
ClientAuthentication: &msk.ServerlessClusterClientAuthenticationArgs{
Sasl: &msk.ServerlessClusterClientAuthenticationSaslArgs{
Iam: &msk.ServerlessClusterClientAuthenticationSaslIamArgs{
Enabled: pulumi.Bool(false),
},
},
},
VpcConfigs: msk.ServerlessClusterVpcConfigArray{
&msk.ServerlessClusterVpcConfigArgs{
SubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
},
},
ClusterName: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var serverlessClusterResource = new ServerlessCluster("serverlessClusterResource", ServerlessClusterArgs.builder()
.clientAuthentication(ServerlessClusterClientAuthenticationArgs.builder()
.sasl(ServerlessClusterClientAuthenticationSaslArgs.builder()
.iam(ServerlessClusterClientAuthenticationSaslIamArgs.builder()
.enabled(false)
.build())
.build())
.build())
.vpcConfigs(ServerlessClusterVpcConfigArgs.builder()
.subnetIds("string")
.securityGroupIds("string")
.build())
.clusterName("string")
.tags(Map.of("string", "string"))
.build());
serverless_cluster_resource = aws.msk.ServerlessCluster("serverlessClusterResource",
client_authentication={
"sasl": {
"iam": {
"enabled": False,
},
},
},
vpc_configs=[{
"subnetIds": ["string"],
"securityGroupIds": ["string"],
}],
cluster_name="string",
tags={
"string": "string",
})
const serverlessClusterResource = new aws.msk.ServerlessCluster("serverlessClusterResource", {
clientAuthentication: {
sasl: {
iam: {
enabled: false,
},
},
},
vpcConfigs: [{
subnetIds: ["string"],
securityGroupIds: ["string"],
}],
clusterName: "string",
tags: {
string: "string",
},
});
type: aws:msk:ServerlessCluster
properties:
clientAuthentication:
sasl:
iam:
enabled: false
clusterName: string
tags:
string: string
vpcConfigs:
- securityGroupIds:
- string
subnetIds:
- string
ServerlessCluster Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ServerlessCluster resource accepts the following input properties:
- Client
Authentication ServerlessCluster Client Authentication - Specifies client authentication information for the serverless cluster. See below.
- Vpc
Configs List<ServerlessCluster Vpc Config> - VPC configuration information. See below.
- Cluster
Name string - The name of the serverless cluster.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Client
Authentication ServerlessCluster Client Authentication Args - Specifies client authentication information for the serverless cluster. See below.
- Vpc
Configs []ServerlessCluster Vpc Config Args - VPC configuration information. See below.
- Cluster
Name string - The name of the serverless cluster.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- client
Authentication ServerlessCluster Client Authentication - Specifies client authentication information for the serverless cluster. See below.
- vpc
Configs List<ServerlessCluster Vpc Config> - VPC configuration information. See below.
- cluster
Name String - The name of the serverless cluster.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- client
Authentication ServerlessCluster Client Authentication - Specifies client authentication information for the serverless cluster. See below.
- vpc
Configs ServerlessCluster Vpc Config[] - VPC configuration information. See below.
- cluster
Name string - The name of the serverless cluster.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- client_
authentication ServerlessCluster Client Authentication Args - Specifies client authentication information for the serverless cluster. See below.
- vpc_
configs Sequence[ServerlessCluster Vpc Config Args] - VPC configuration information. See below.
- cluster_
name str - The name of the serverless cluster.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- client
Authentication Property Map - Specifies client authentication information for the serverless cluster. See below.
- vpc
Configs List<Property Map> - VPC configuration information. See below.
- cluster
Name String - The name of the serverless cluster.
- Map<String>
- A map of tags to assign to the resource. 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 ServerlessCluster resource produces the following output properties:
- Arn string
- The ARN of the serverless cluster.
- Cluster
Uuid string - UUID of the serverless cluster, for use in IAM policies.
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN of the serverless cluster.
- Cluster
Uuid string - UUID of the serverless cluster, for use in IAM policies.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the serverless cluster.
- cluster
Uuid String - UUID of the serverless cluster, for use in IAM policies.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN of the serverless cluster.
- cluster
Uuid string - UUID of the serverless cluster, for use in IAM policies.
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The ARN of the serverless cluster.
- cluster_
uuid str - UUID of the serverless cluster, for use in IAM policies.
- id str
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the serverless cluster.
- cluster
Uuid String - UUID of the serverless cluster, for use in IAM policies.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing ServerlessCluster Resource
Get an existing ServerlessCluster 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?: ServerlessClusterState, opts?: CustomResourceOptions): ServerlessCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
client_authentication: Optional[ServerlessClusterClientAuthenticationArgs] = None,
cluster_name: Optional[str] = None,
cluster_uuid: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
vpc_configs: Optional[Sequence[ServerlessClusterVpcConfigArgs]] = None) -> ServerlessCluster
func GetServerlessCluster(ctx *Context, name string, id IDInput, state *ServerlessClusterState, opts ...ResourceOption) (*ServerlessCluster, error)
public static ServerlessCluster Get(string name, Input<string> id, ServerlessClusterState? state, CustomResourceOptions? opts = null)
public static ServerlessCluster get(String name, Output<String> id, ServerlessClusterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Arn string
- The ARN of the serverless cluster.
- Client
Authentication ServerlessCluster Client Authentication - Specifies client authentication information for the serverless cluster. See below.
- Cluster
Name string - The name of the serverless cluster.
- Cluster
Uuid string - UUID of the serverless cluster, for use in IAM policies.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Configs List<ServerlessCluster Vpc Config> - VPC configuration information. See below.
- Arn string
- The ARN of the serverless cluster.
- Client
Authentication ServerlessCluster Client Authentication Args - Specifies client authentication information for the serverless cluster. See below.
- Cluster
Name string - The name of the serverless cluster.
- Cluster
Uuid string - UUID of the serverless cluster, for use in IAM policies.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Configs []ServerlessCluster Vpc Config Args - VPC configuration information. See below.
- arn String
- The ARN of the serverless cluster.
- client
Authentication ServerlessCluster Client Authentication - Specifies client authentication information for the serverless cluster. See below.
- cluster
Name String - The name of the serverless cluster.
- cluster
Uuid String - UUID of the serverless cluster, for use in IAM policies.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Configs List<ServerlessCluster Vpc Config> - VPC configuration information. See below.
- arn string
- The ARN of the serverless cluster.
- client
Authentication ServerlessCluster Client Authentication - Specifies client authentication information for the serverless cluster. See below.
- cluster
Name string - The name of the serverless cluster.
- cluster
Uuid string - UUID of the serverless cluster, for use in IAM policies.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Configs ServerlessCluster Vpc Config[] - VPC configuration information. See below.
- arn str
- The ARN of the serverless cluster.
- client_
authentication ServerlessCluster Client Authentication Args - Specifies client authentication information for the serverless cluster. See below.
- cluster_
name str - The name of the serverless cluster.
- cluster_
uuid str - UUID of the serverless cluster, for use in IAM policies.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc_
configs Sequence[ServerlessCluster Vpc Config Args] - VPC configuration information. See below.
- arn String
- The ARN of the serverless cluster.
- client
Authentication Property Map - Specifies client authentication information for the serverless cluster. See below.
- cluster
Name String - The name of the serverless cluster.
- cluster
Uuid String - UUID of the serverless cluster, for use in IAM policies.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Configs List<Property Map> - VPC configuration information. See below.
Supporting Types
ServerlessClusterClientAuthentication, ServerlessClusterClientAuthenticationArgs
- Sasl
Serverless
Cluster Client Authentication Sasl - Details for client authentication using SASL. See below.
- Sasl
Serverless
Cluster Client Authentication Sasl - Details for client authentication using SASL. See below.
- sasl
Serverless
Cluster Client Authentication Sasl - Details for client authentication using SASL. See below.
- sasl
Serverless
Cluster Client Authentication Sasl - Details for client authentication using SASL. See below.
- sasl
Serverless
Cluster Client Authentication Sasl - Details for client authentication using SASL. See below.
- sasl Property Map
- Details for client authentication using SASL. See below.
ServerlessClusterClientAuthenticationSasl, ServerlessClusterClientAuthenticationSaslArgs
- Iam
Serverless
Cluster Client Authentication Sasl Iam - Details for client authentication using IAM. See below.
- Iam
Serverless
Cluster Client Authentication Sasl Iam - Details for client authentication using IAM. See below.
- iam
Serverless
Cluster Client Authentication Sasl Iam - Details for client authentication using IAM. See below.
- iam
Serverless
Cluster Client Authentication Sasl Iam - Details for client authentication using IAM. See below.
- iam
Serverless
Cluster Client Authentication Sasl Iam - Details for client authentication using IAM. See below.
- iam Property Map
- Details for client authentication using IAM. See below.
ServerlessClusterClientAuthenticationSaslIam, ServerlessClusterClientAuthenticationSaslIamArgs
- Enabled bool
- Whether SASL/IAM authentication is enabled or not.
- Enabled bool
- Whether SASL/IAM authentication is enabled or not.
- enabled Boolean
- Whether SASL/IAM authentication is enabled or not.
- enabled boolean
- Whether SASL/IAM authentication is enabled or not.
- enabled bool
- Whether SASL/IAM authentication is enabled or not.
- enabled Boolean
- Whether SASL/IAM authentication is enabled or not.
ServerlessClusterVpcConfig, ServerlessClusterVpcConfigArgs
- Subnet
Ids List<string> - A list of subnets in at least two different Availability Zones that host your client applications.
- Security
Group List<string>Ids - Specifies up to five security groups that control inbound and outbound traffic for the serverless cluster.
- Subnet
Ids []string - A list of subnets in at least two different Availability Zones that host your client applications.
- Security
Group []stringIds - Specifies up to five security groups that control inbound and outbound traffic for the serverless cluster.
- subnet
Ids List<String> - A list of subnets in at least two different Availability Zones that host your client applications.
- security
Group List<String>Ids - Specifies up to five security groups that control inbound and outbound traffic for the serverless cluster.
- subnet
Ids string[] - A list of subnets in at least two different Availability Zones that host your client applications.
- security
Group string[]Ids - Specifies up to five security groups that control inbound and outbound traffic for the serverless cluster.
- subnet_
ids Sequence[str] - A list of subnets in at least two different Availability Zones that host your client applications.
- security_
group_ Sequence[str]ids - Specifies up to five security groups that control inbound and outbound traffic for the serverless cluster.
- subnet
Ids List<String> - A list of subnets in at least two different Availability Zones that host your client applications.
- security
Group List<String>Ids - Specifies up to five security groups that control inbound and outbound traffic for the serverless cluster.
Import
Using pulumi import
, import MSK serverless clusters using the cluster arn
. For example:
$ pulumi import aws:msk/serverlessCluster:ServerlessCluster example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3
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.
Try AWS Native preview for resources not in the classic version.