github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/msk/cluster.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package msk
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Manages an Amazon MSK cluster.
    16  //
    17  // > **Note:** This resource manages _provisioned_ clusters. To manage a _serverless_ Amazon MSK cluster, use the `msk.ServerlessCluster` resource.
    18  //
    19  // ## Example Usage
    20  //
    21  // ### Basic
    22  //
    23  // <!--Start PulumiCodeChooser -->
    24  // ```go
    25  // package main
    26  //
    27  // import (
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    30  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
    31  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    32  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    33  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis"
    34  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
    35  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk"
    36  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
    37  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    38  //
    39  // )
    40  //
    41  //	func main() {
    42  //		pulumi.Run(func(ctx *pulumi.Context) error {
    43  //			vpc, err := ec2.NewVpc(ctx, "vpc", &ec2.VpcArgs{
    44  //				CidrBlock: pulumi.String("192.168.0.0/22"),
    45  //			})
    46  //			if err != nil {
    47  //				return err
    48  //			}
    49  //			azs, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{
    50  //				State: pulumi.StringRef("available"),
    51  //			}, nil)
    52  //			if err != nil {
    53  //				return err
    54  //			}
    55  //			subnetAz1, err := ec2.NewSubnet(ctx, "subnet_az1", &ec2.SubnetArgs{
    56  //				AvailabilityZone: pulumi.String(azs.Names[0]),
    57  //				CidrBlock:        pulumi.String("192.168.0.0/24"),
    58  //				VpcId:            vpc.ID(),
    59  //			})
    60  //			if err != nil {
    61  //				return err
    62  //			}
    63  //			subnetAz2, err := ec2.NewSubnet(ctx, "subnet_az2", &ec2.SubnetArgs{
    64  //				AvailabilityZone: pulumi.String(azs.Names[1]),
    65  //				CidrBlock:        pulumi.String("192.168.1.0/24"),
    66  //				VpcId:            vpc.ID(),
    67  //			})
    68  //			if err != nil {
    69  //				return err
    70  //			}
    71  //			subnetAz3, err := ec2.NewSubnet(ctx, "subnet_az3", &ec2.SubnetArgs{
    72  //				AvailabilityZone: pulumi.String(azs.Names[2]),
    73  //				CidrBlock:        pulumi.String("192.168.2.0/24"),
    74  //				VpcId:            vpc.ID(),
    75  //			})
    76  //			if err != nil {
    77  //				return err
    78  //			}
    79  //			sg, err := ec2.NewSecurityGroup(ctx, "sg", &ec2.SecurityGroupArgs{
    80  //				VpcId: vpc.ID(),
    81  //			})
    82  //			if err != nil {
    83  //				return err
    84  //			}
    85  //			kms, err := kms.NewKey(ctx, "kms", &kms.KeyArgs{
    86  //				Description: pulumi.String("example"),
    87  //			})
    88  //			if err != nil {
    89  //				return err
    90  //			}
    91  //			test, err := cloudwatch.NewLogGroup(ctx, "test", &cloudwatch.LogGroupArgs{
    92  //				Name: pulumi.String("msk_broker_logs"),
    93  //			})
    94  //			if err != nil {
    95  //				return err
    96  //			}
    97  //			bucket, err := s3.NewBucketV2(ctx, "bucket", &s3.BucketV2Args{
    98  //				Bucket: pulumi.String("msk-broker-logs-bucket"),
    99  //			})
   100  //			if err != nil {
   101  //				return err
   102  //			}
   103  //			_, err = s3.NewBucketAclV2(ctx, "bucket_acl", &s3.BucketAclV2Args{
   104  //				Bucket: bucket.ID(),
   105  //				Acl:    pulumi.String("private"),
   106  //			})
   107  //			if err != nil {
   108  //				return err
   109  //			}
   110  //			assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
   111  //				Statements: []iam.GetPolicyDocumentStatement{
   112  //					{
   113  //						Effect: pulumi.StringRef("Allow"),
   114  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
   115  //							{
   116  //								Type: "Service",
   117  //								Identifiers: []string{
   118  //									"firehose.amazonaws.com",
   119  //								},
   120  //							},
   121  //						},
   122  //						Actions: []string{
   123  //							"sts:AssumeRole",
   124  //						},
   125  //					},
   126  //				},
   127  //			}, nil)
   128  //			if err != nil {
   129  //				return err
   130  //			}
   131  //			firehoseRole, err := iam.NewRole(ctx, "firehose_role", &iam.RoleArgs{
   132  //				Name:             pulumi.String("firehose_test_role"),
   133  //				AssumeRolePolicy: pulumi.String(assumeRole.Json),
   134  //			})
   135  //			if err != nil {
   136  //				return err
   137  //			}
   138  //			testStream, err := kinesis.NewFirehoseDeliveryStream(ctx, "test_stream", &kinesis.FirehoseDeliveryStreamArgs{
   139  //				Name:        pulumi.String("kinesis-firehose-msk-broker-logs-stream"),
   140  //				Destination: pulumi.String("extended_s3"),
   141  //				ExtendedS3Configuration: &kinesis.FirehoseDeliveryStreamExtendedS3ConfigurationArgs{
   142  //					RoleArn:   firehoseRole.Arn,
   143  //					BucketArn: bucket.Arn,
   144  //				},
   145  //				Tags: pulumi.StringMap{
   146  //					"LogDeliveryEnabled": pulumi.String("placeholder"),
   147  //				},
   148  //			})
   149  //			if err != nil {
   150  //				return err
   151  //			}
   152  //			example, err := msk.NewCluster(ctx, "example", &msk.ClusterArgs{
   153  //				ClusterName:         pulumi.String("example"),
   154  //				KafkaVersion:        pulumi.String("3.2.0"),
   155  //				NumberOfBrokerNodes: pulumi.Int(3),
   156  //				BrokerNodeGroupInfo: &msk.ClusterBrokerNodeGroupInfoArgs{
   157  //					InstanceType: pulumi.String("kafka.m5.large"),
   158  //					ClientSubnets: pulumi.StringArray{
   159  //						subnetAz1.ID(),
   160  //						subnetAz2.ID(),
   161  //						subnetAz3.ID(),
   162  //					},
   163  //					StorageInfo: &msk.ClusterBrokerNodeGroupInfoStorageInfoArgs{
   164  //						EbsStorageInfo: &msk.ClusterBrokerNodeGroupInfoStorageInfoEbsStorageInfoArgs{
   165  //							VolumeSize: pulumi.Int(1000),
   166  //						},
   167  //					},
   168  //					SecurityGroups: pulumi.StringArray{
   169  //						sg.ID(),
   170  //					},
   171  //				},
   172  //				EncryptionInfo: &msk.ClusterEncryptionInfoArgs{
   173  //					EncryptionAtRestKmsKeyArn: kms.Arn,
   174  //				},
   175  //				OpenMonitoring: &msk.ClusterOpenMonitoringArgs{
   176  //					Prometheus: &msk.ClusterOpenMonitoringPrometheusArgs{
   177  //						JmxExporter: &msk.ClusterOpenMonitoringPrometheusJmxExporterArgs{
   178  //							EnabledInBroker: pulumi.Bool(true),
   179  //						},
   180  //						NodeExporter: &msk.ClusterOpenMonitoringPrometheusNodeExporterArgs{
   181  //							EnabledInBroker: pulumi.Bool(true),
   182  //						},
   183  //					},
   184  //				},
   185  //				LoggingInfo: &msk.ClusterLoggingInfoArgs{
   186  //					BrokerLogs: &msk.ClusterLoggingInfoBrokerLogsArgs{
   187  //						CloudwatchLogs: &msk.ClusterLoggingInfoBrokerLogsCloudwatchLogsArgs{
   188  //							Enabled:  pulumi.Bool(true),
   189  //							LogGroup: test.Name,
   190  //						},
   191  //						Firehose: &msk.ClusterLoggingInfoBrokerLogsFirehoseArgs{
   192  //							Enabled:        pulumi.Bool(true),
   193  //							DeliveryStream: testStream.Name,
   194  //						},
   195  //						S3: &msk.ClusterLoggingInfoBrokerLogsS3Args{
   196  //							Enabled: pulumi.Bool(true),
   197  //							Bucket:  bucket.ID(),
   198  //							Prefix:  pulumi.String("logs/msk-"),
   199  //						},
   200  //					},
   201  //				},
   202  //				Tags: pulumi.StringMap{
   203  //					"foo": pulumi.String("bar"),
   204  //				},
   205  //			})
   206  //			if err != nil {
   207  //				return err
   208  //			}
   209  //			ctx.Export("zookeeperConnectString", example.ZookeeperConnectString)
   210  //			ctx.Export("bootstrapBrokersTls", example.BootstrapBrokersTls)
   211  //			return nil
   212  //		})
   213  //	}
   214  //
   215  // ```
   216  // <!--End PulumiCodeChooser -->
   217  //
   218  // ### With volumeThroughput argument
   219  //
   220  // <!--Start PulumiCodeChooser -->
   221  // ```go
   222  // package main
   223  //
   224  // import (
   225  //
   226  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk"
   227  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   228  //
   229  // )
   230  //
   231  //	func main() {
   232  //		pulumi.Run(func(ctx *pulumi.Context) error {
   233  //			_, err := msk.NewCluster(ctx, "example", &msk.ClusterArgs{
   234  //				ClusterName:         pulumi.String("example"),
   235  //				KafkaVersion:        pulumi.String("2.7.1"),
   236  //				NumberOfBrokerNodes: pulumi.Int(3),
   237  //				BrokerNodeGroupInfo: &msk.ClusterBrokerNodeGroupInfoArgs{
   238  //					InstanceType: pulumi.String("kafka.m5.4xlarge"),
   239  //					ClientSubnets: pulumi.StringArray{
   240  //						subnetAz1.Id,
   241  //						subnetAz2.Id,
   242  //						subnetAz3.Id,
   243  //					},
   244  //					StorageInfo: &msk.ClusterBrokerNodeGroupInfoStorageInfoArgs{
   245  //						EbsStorageInfo: &msk.ClusterBrokerNodeGroupInfoStorageInfoEbsStorageInfoArgs{
   246  //							ProvisionedThroughput: &msk.ClusterBrokerNodeGroupInfoStorageInfoEbsStorageInfoProvisionedThroughputArgs{
   247  //								Enabled:          pulumi.Bool(true),
   248  //								VolumeThroughput: pulumi.Int(250),
   249  //							},
   250  //							VolumeSize: pulumi.Int(1000),
   251  //						},
   252  //					},
   253  //					SecurityGroups: pulumi.StringArray{
   254  //						sg.Id,
   255  //					},
   256  //				},
   257  //			})
   258  //			if err != nil {
   259  //				return err
   260  //			}
   261  //			return nil
   262  //		})
   263  //	}
   264  //
   265  // ```
   266  // <!--End PulumiCodeChooser -->
   267  //
   268  // ## Import
   269  //
   270  // Using `pulumi import`, import MSK clusters using the cluster `arn`. For example:
   271  //
   272  // ```sh
   273  // $ pulumi import aws:msk/cluster:Cluster example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3
   274  // ```
   275  type Cluster struct {
   276  	pulumi.CustomResourceState
   277  
   278  	// Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster.
   279  	Arn pulumi.StringOutput `pulumi:"arn"`
   280  	// Comma separated list of one or more hostname:port pairs of kafka brokers suitable to bootstrap connectivity to the kafka cluster. Contains a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `PLAINTEXT` or `TLS_PLAINTEXT`. The resource sorts values alphabetically. AWS may not always return all endpoints so this value is not guaranteed to be stable across applies.
   281  	BootstrapBrokers pulumi.StringOutput `pulumi:"bootstrapBrokers"`
   282  	// One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   283  	BootstrapBrokersPublicSaslIam pulumi.StringOutput `pulumi:"bootstrapBrokersPublicSaslIam"`
   284  	// One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   285  	BootstrapBrokersPublicSaslScram pulumi.StringOutput `pulumi:"bootstrapBrokersPublicSaslScram"`
   286  	// One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   287  	BootstrapBrokersPublicTls pulumi.StringOutput `pulumi:"bootstrapBrokersPublicTls"`
   288  	// One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   289  	BootstrapBrokersSaslIam pulumi.StringOutput `pulumi:"bootstrapBrokersSaslIam"`
   290  	// One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   291  	BootstrapBrokersSaslScram pulumi.StringOutput `pulumi:"bootstrapBrokersSaslScram"`
   292  	// One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   293  	BootstrapBrokersTls pulumi.StringOutput `pulumi:"bootstrapBrokersTls"`
   294  	// A string containing one or more DNS names (or IP addresses) and SASL IAM port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   295  	BootstrapBrokersVpcConnectivitySaslIam pulumi.StringOutput `pulumi:"bootstrapBrokersVpcConnectivitySaslIam"`
   296  	// A string containing one or more DNS names (or IP addresses) and SASL SCRAM port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   297  	BootstrapBrokersVpcConnectivitySaslScram pulumi.StringOutput `pulumi:"bootstrapBrokersVpcConnectivitySaslScram"`
   298  	// A string containing one or more DNS names (or IP addresses) and TLS port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   299  	BootstrapBrokersVpcConnectivityTls pulumi.StringOutput `pulumi:"bootstrapBrokersVpcConnectivityTls"`
   300  	// Configuration block for the broker nodes of the Kafka cluster.
   301  	BrokerNodeGroupInfo ClusterBrokerNodeGroupInfoOutput `pulumi:"brokerNodeGroupInfo"`
   302  	// Configuration block for specifying a client authentication. See below.
   303  	ClientAuthentication ClusterClientAuthenticationPtrOutput `pulumi:"clientAuthentication"`
   304  	// Name of the MSK cluster.
   305  	ClusterName pulumi.StringOutput `pulumi:"clusterName"`
   306  	// UUID of the MSK cluster, for use in IAM policies.
   307  	ClusterUuid pulumi.StringOutput `pulumi:"clusterUuid"`
   308  	// Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.
   309  	ConfigurationInfo ClusterConfigurationInfoPtrOutput `pulumi:"configurationInfo"`
   310  	// Current version of the MSK Cluster used for updates, e.g., `K13V1IB3VIYZZH`
   311  	CurrentVersion pulumi.StringOutput `pulumi:"currentVersion"`
   312  	// Configuration block for specifying encryption. See below.
   313  	EncryptionInfo ClusterEncryptionInfoPtrOutput `pulumi:"encryptionInfo"`
   314  	// Specify the desired enhanced MSK CloudWatch monitoring level. See [Monitoring Amazon MSK with Amazon CloudWatch](https://docs.aws.amazon.com/msk/latest/developerguide/monitoring.html)
   315  	EnhancedMonitoring pulumi.StringPtrOutput `pulumi:"enhancedMonitoring"`
   316  	// Specify the desired Kafka software version.
   317  	KafkaVersion pulumi.StringOutput `pulumi:"kafkaVersion"`
   318  	// Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
   319  	LoggingInfo ClusterLoggingInfoPtrOutput `pulumi:"loggingInfo"`
   320  	// The desired total number of broker nodes in the kafka cluster.  It must be a multiple of the number of specified client subnets.
   321  	NumberOfBrokerNodes pulumi.IntOutput `pulumi:"numberOfBrokerNodes"`
   322  	// Configuration block for JMX and Node monitoring for the MSK cluster. See below.
   323  	OpenMonitoring ClusterOpenMonitoringPtrOutput `pulumi:"openMonitoring"`
   324  	// Controls storage mode for supported storage tiers. Valid values are: `LOCAL` or `TIERED`.
   325  	StorageMode pulumi.StringOutput `pulumi:"storageMode"`
   326  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   327  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   328  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   329  	//
   330  	// Deprecated: Please use `tags` instead.
   331  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   332  	// A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
   333  	ZookeeperConnectString pulumi.StringOutput `pulumi:"zookeeperConnectString"`
   334  	// A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
   335  	ZookeeperConnectStringTls pulumi.StringOutput `pulumi:"zookeeperConnectStringTls"`
   336  }
   337  
   338  // NewCluster registers a new resource with the given unique name, arguments, and options.
   339  func NewCluster(ctx *pulumi.Context,
   340  	name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error) {
   341  	if args == nil {
   342  		return nil, errors.New("missing one or more required arguments")
   343  	}
   344  
   345  	if args.BrokerNodeGroupInfo == nil {
   346  		return nil, errors.New("invalid value for required argument 'BrokerNodeGroupInfo'")
   347  	}
   348  	if args.KafkaVersion == nil {
   349  		return nil, errors.New("invalid value for required argument 'KafkaVersion'")
   350  	}
   351  	if args.NumberOfBrokerNodes == nil {
   352  		return nil, errors.New("invalid value for required argument 'NumberOfBrokerNodes'")
   353  	}
   354  	opts = internal.PkgResourceDefaultOpts(opts)
   355  	var resource Cluster
   356  	err := ctx.RegisterResource("aws:msk/cluster:Cluster", name, args, &resource, opts...)
   357  	if err != nil {
   358  		return nil, err
   359  	}
   360  	return &resource, nil
   361  }
   362  
   363  // GetCluster gets an existing Cluster resource's state with the given name, ID, and optional
   364  // state properties that are used to uniquely qualify the lookup (nil if not required).
   365  func GetCluster(ctx *pulumi.Context,
   366  	name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) {
   367  	var resource Cluster
   368  	err := ctx.ReadResource("aws:msk/cluster:Cluster", name, id, state, &resource, opts...)
   369  	if err != nil {
   370  		return nil, err
   371  	}
   372  	return &resource, nil
   373  }
   374  
   375  // Input properties used for looking up and filtering Cluster resources.
   376  type clusterState struct {
   377  	// Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster.
   378  	Arn *string `pulumi:"arn"`
   379  	// Comma separated list of one or more hostname:port pairs of kafka brokers suitable to bootstrap connectivity to the kafka cluster. Contains a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `PLAINTEXT` or `TLS_PLAINTEXT`. The resource sorts values alphabetically. AWS may not always return all endpoints so this value is not guaranteed to be stable across applies.
   380  	BootstrapBrokers *string `pulumi:"bootstrapBrokers"`
   381  	// One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   382  	BootstrapBrokersPublicSaslIam *string `pulumi:"bootstrapBrokersPublicSaslIam"`
   383  	// One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   384  	BootstrapBrokersPublicSaslScram *string `pulumi:"bootstrapBrokersPublicSaslScram"`
   385  	// One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   386  	BootstrapBrokersPublicTls *string `pulumi:"bootstrapBrokersPublicTls"`
   387  	// One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   388  	BootstrapBrokersSaslIam *string `pulumi:"bootstrapBrokersSaslIam"`
   389  	// One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   390  	BootstrapBrokersSaslScram *string `pulumi:"bootstrapBrokersSaslScram"`
   391  	// One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   392  	BootstrapBrokersTls *string `pulumi:"bootstrapBrokersTls"`
   393  	// A string containing one or more DNS names (or IP addresses) and SASL IAM port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   394  	BootstrapBrokersVpcConnectivitySaslIam *string `pulumi:"bootstrapBrokersVpcConnectivitySaslIam"`
   395  	// A string containing one or more DNS names (or IP addresses) and SASL SCRAM port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   396  	BootstrapBrokersVpcConnectivitySaslScram *string `pulumi:"bootstrapBrokersVpcConnectivitySaslScram"`
   397  	// A string containing one or more DNS names (or IP addresses) and TLS port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   398  	BootstrapBrokersVpcConnectivityTls *string `pulumi:"bootstrapBrokersVpcConnectivityTls"`
   399  	// Configuration block for the broker nodes of the Kafka cluster.
   400  	BrokerNodeGroupInfo *ClusterBrokerNodeGroupInfo `pulumi:"brokerNodeGroupInfo"`
   401  	// Configuration block for specifying a client authentication. See below.
   402  	ClientAuthentication *ClusterClientAuthentication `pulumi:"clientAuthentication"`
   403  	// Name of the MSK cluster.
   404  	ClusterName *string `pulumi:"clusterName"`
   405  	// UUID of the MSK cluster, for use in IAM policies.
   406  	ClusterUuid *string `pulumi:"clusterUuid"`
   407  	// Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.
   408  	ConfigurationInfo *ClusterConfigurationInfo `pulumi:"configurationInfo"`
   409  	// Current version of the MSK Cluster used for updates, e.g., `K13V1IB3VIYZZH`
   410  	CurrentVersion *string `pulumi:"currentVersion"`
   411  	// Configuration block for specifying encryption. See below.
   412  	EncryptionInfo *ClusterEncryptionInfo `pulumi:"encryptionInfo"`
   413  	// Specify the desired enhanced MSK CloudWatch monitoring level. See [Monitoring Amazon MSK with Amazon CloudWatch](https://docs.aws.amazon.com/msk/latest/developerguide/monitoring.html)
   414  	EnhancedMonitoring *string `pulumi:"enhancedMonitoring"`
   415  	// Specify the desired Kafka software version.
   416  	KafkaVersion *string `pulumi:"kafkaVersion"`
   417  	// Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
   418  	LoggingInfo *ClusterLoggingInfo `pulumi:"loggingInfo"`
   419  	// The desired total number of broker nodes in the kafka cluster.  It must be a multiple of the number of specified client subnets.
   420  	NumberOfBrokerNodes *int `pulumi:"numberOfBrokerNodes"`
   421  	// Configuration block for JMX and Node monitoring for the MSK cluster. See below.
   422  	OpenMonitoring *ClusterOpenMonitoring `pulumi:"openMonitoring"`
   423  	// Controls storage mode for supported storage tiers. Valid values are: `LOCAL` or `TIERED`.
   424  	StorageMode *string `pulumi:"storageMode"`
   425  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   426  	Tags map[string]string `pulumi:"tags"`
   427  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   428  	//
   429  	// Deprecated: Please use `tags` instead.
   430  	TagsAll map[string]string `pulumi:"tagsAll"`
   431  	// A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
   432  	ZookeeperConnectString *string `pulumi:"zookeeperConnectString"`
   433  	// A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
   434  	ZookeeperConnectStringTls *string `pulumi:"zookeeperConnectStringTls"`
   435  }
   436  
   437  type ClusterState struct {
   438  	// Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster.
   439  	Arn pulumi.StringPtrInput
   440  	// Comma separated list of one or more hostname:port pairs of kafka brokers suitable to bootstrap connectivity to the kafka cluster. Contains a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `PLAINTEXT` or `TLS_PLAINTEXT`. The resource sorts values alphabetically. AWS may not always return all endpoints so this value is not guaranteed to be stable across applies.
   441  	BootstrapBrokers pulumi.StringPtrInput
   442  	// One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   443  	BootstrapBrokersPublicSaslIam pulumi.StringPtrInput
   444  	// One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   445  	BootstrapBrokersPublicSaslScram pulumi.StringPtrInput
   446  	// One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   447  	BootstrapBrokersPublicTls pulumi.StringPtrInput
   448  	// One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   449  	BootstrapBrokersSaslIam pulumi.StringPtrInput
   450  	// One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   451  	BootstrapBrokersSaslScram pulumi.StringPtrInput
   452  	// One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   453  	BootstrapBrokersTls pulumi.StringPtrInput
   454  	// A string containing one or more DNS names (or IP addresses) and SASL IAM port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   455  	BootstrapBrokersVpcConnectivitySaslIam pulumi.StringPtrInput
   456  	// A string containing one or more DNS names (or IP addresses) and SASL SCRAM port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   457  	BootstrapBrokersVpcConnectivitySaslScram pulumi.StringPtrInput
   458  	// A string containing one or more DNS names (or IP addresses) and TLS port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   459  	BootstrapBrokersVpcConnectivityTls pulumi.StringPtrInput
   460  	// Configuration block for the broker nodes of the Kafka cluster.
   461  	BrokerNodeGroupInfo ClusterBrokerNodeGroupInfoPtrInput
   462  	// Configuration block for specifying a client authentication. See below.
   463  	ClientAuthentication ClusterClientAuthenticationPtrInput
   464  	// Name of the MSK cluster.
   465  	ClusterName pulumi.StringPtrInput
   466  	// UUID of the MSK cluster, for use in IAM policies.
   467  	ClusterUuid pulumi.StringPtrInput
   468  	// Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.
   469  	ConfigurationInfo ClusterConfigurationInfoPtrInput
   470  	// Current version of the MSK Cluster used for updates, e.g., `K13V1IB3VIYZZH`
   471  	CurrentVersion pulumi.StringPtrInput
   472  	// Configuration block for specifying encryption. See below.
   473  	EncryptionInfo ClusterEncryptionInfoPtrInput
   474  	// Specify the desired enhanced MSK CloudWatch monitoring level. See [Monitoring Amazon MSK with Amazon CloudWatch](https://docs.aws.amazon.com/msk/latest/developerguide/monitoring.html)
   475  	EnhancedMonitoring pulumi.StringPtrInput
   476  	// Specify the desired Kafka software version.
   477  	KafkaVersion pulumi.StringPtrInput
   478  	// Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
   479  	LoggingInfo ClusterLoggingInfoPtrInput
   480  	// The desired total number of broker nodes in the kafka cluster.  It must be a multiple of the number of specified client subnets.
   481  	NumberOfBrokerNodes pulumi.IntPtrInput
   482  	// Configuration block for JMX and Node monitoring for the MSK cluster. See below.
   483  	OpenMonitoring ClusterOpenMonitoringPtrInput
   484  	// Controls storage mode for supported storage tiers. Valid values are: `LOCAL` or `TIERED`.
   485  	StorageMode pulumi.StringPtrInput
   486  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   487  	Tags pulumi.StringMapInput
   488  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   489  	//
   490  	// Deprecated: Please use `tags` instead.
   491  	TagsAll pulumi.StringMapInput
   492  	// A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
   493  	ZookeeperConnectString pulumi.StringPtrInput
   494  	// A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
   495  	ZookeeperConnectStringTls pulumi.StringPtrInput
   496  }
   497  
   498  func (ClusterState) ElementType() reflect.Type {
   499  	return reflect.TypeOf((*clusterState)(nil)).Elem()
   500  }
   501  
   502  type clusterArgs struct {
   503  	// Configuration block for the broker nodes of the Kafka cluster.
   504  	BrokerNodeGroupInfo ClusterBrokerNodeGroupInfo `pulumi:"brokerNodeGroupInfo"`
   505  	// Configuration block for specifying a client authentication. See below.
   506  	ClientAuthentication *ClusterClientAuthentication `pulumi:"clientAuthentication"`
   507  	// Name of the MSK cluster.
   508  	ClusterName *string `pulumi:"clusterName"`
   509  	// Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.
   510  	ConfigurationInfo *ClusterConfigurationInfo `pulumi:"configurationInfo"`
   511  	// Configuration block for specifying encryption. See below.
   512  	EncryptionInfo *ClusterEncryptionInfo `pulumi:"encryptionInfo"`
   513  	// Specify the desired enhanced MSK CloudWatch monitoring level. See [Monitoring Amazon MSK with Amazon CloudWatch](https://docs.aws.amazon.com/msk/latest/developerguide/monitoring.html)
   514  	EnhancedMonitoring *string `pulumi:"enhancedMonitoring"`
   515  	// Specify the desired Kafka software version.
   516  	KafkaVersion string `pulumi:"kafkaVersion"`
   517  	// Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
   518  	LoggingInfo *ClusterLoggingInfo `pulumi:"loggingInfo"`
   519  	// The desired total number of broker nodes in the kafka cluster.  It must be a multiple of the number of specified client subnets.
   520  	NumberOfBrokerNodes int `pulumi:"numberOfBrokerNodes"`
   521  	// Configuration block for JMX and Node monitoring for the MSK cluster. See below.
   522  	OpenMonitoring *ClusterOpenMonitoring `pulumi:"openMonitoring"`
   523  	// Controls storage mode for supported storage tiers. Valid values are: `LOCAL` or `TIERED`.
   524  	StorageMode *string `pulumi:"storageMode"`
   525  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   526  	Tags map[string]string `pulumi:"tags"`
   527  }
   528  
   529  // The set of arguments for constructing a Cluster resource.
   530  type ClusterArgs struct {
   531  	// Configuration block for the broker nodes of the Kafka cluster.
   532  	BrokerNodeGroupInfo ClusterBrokerNodeGroupInfoInput
   533  	// Configuration block for specifying a client authentication. See below.
   534  	ClientAuthentication ClusterClientAuthenticationPtrInput
   535  	// Name of the MSK cluster.
   536  	ClusterName pulumi.StringPtrInput
   537  	// Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.
   538  	ConfigurationInfo ClusterConfigurationInfoPtrInput
   539  	// Configuration block for specifying encryption. See below.
   540  	EncryptionInfo ClusterEncryptionInfoPtrInput
   541  	// Specify the desired enhanced MSK CloudWatch monitoring level. See [Monitoring Amazon MSK with Amazon CloudWatch](https://docs.aws.amazon.com/msk/latest/developerguide/monitoring.html)
   542  	EnhancedMonitoring pulumi.StringPtrInput
   543  	// Specify the desired Kafka software version.
   544  	KafkaVersion pulumi.StringInput
   545  	// Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
   546  	LoggingInfo ClusterLoggingInfoPtrInput
   547  	// The desired total number of broker nodes in the kafka cluster.  It must be a multiple of the number of specified client subnets.
   548  	NumberOfBrokerNodes pulumi.IntInput
   549  	// Configuration block for JMX and Node monitoring for the MSK cluster. See below.
   550  	OpenMonitoring ClusterOpenMonitoringPtrInput
   551  	// Controls storage mode for supported storage tiers. Valid values are: `LOCAL` or `TIERED`.
   552  	StorageMode pulumi.StringPtrInput
   553  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   554  	Tags pulumi.StringMapInput
   555  }
   556  
   557  func (ClusterArgs) ElementType() reflect.Type {
   558  	return reflect.TypeOf((*clusterArgs)(nil)).Elem()
   559  }
   560  
   561  type ClusterInput interface {
   562  	pulumi.Input
   563  
   564  	ToClusterOutput() ClusterOutput
   565  	ToClusterOutputWithContext(ctx context.Context) ClusterOutput
   566  }
   567  
   568  func (*Cluster) ElementType() reflect.Type {
   569  	return reflect.TypeOf((**Cluster)(nil)).Elem()
   570  }
   571  
   572  func (i *Cluster) ToClusterOutput() ClusterOutput {
   573  	return i.ToClusterOutputWithContext(context.Background())
   574  }
   575  
   576  func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
   577  	return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput)
   578  }
   579  
   580  // ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values.
   581  // You can construct a concrete instance of `ClusterArrayInput` via:
   582  //
   583  //	ClusterArray{ ClusterArgs{...} }
   584  type ClusterArrayInput interface {
   585  	pulumi.Input
   586  
   587  	ToClusterArrayOutput() ClusterArrayOutput
   588  	ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput
   589  }
   590  
   591  type ClusterArray []ClusterInput
   592  
   593  func (ClusterArray) ElementType() reflect.Type {
   594  	return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
   595  }
   596  
   597  func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput {
   598  	return i.ToClusterArrayOutputWithContext(context.Background())
   599  }
   600  
   601  func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
   602  	return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput)
   603  }
   604  
   605  // ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values.
   606  // You can construct a concrete instance of `ClusterMapInput` via:
   607  //
   608  //	ClusterMap{ "key": ClusterArgs{...} }
   609  type ClusterMapInput interface {
   610  	pulumi.Input
   611  
   612  	ToClusterMapOutput() ClusterMapOutput
   613  	ToClusterMapOutputWithContext(context.Context) ClusterMapOutput
   614  }
   615  
   616  type ClusterMap map[string]ClusterInput
   617  
   618  func (ClusterMap) ElementType() reflect.Type {
   619  	return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
   620  }
   621  
   622  func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput {
   623  	return i.ToClusterMapOutputWithContext(context.Background())
   624  }
   625  
   626  func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
   627  	return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput)
   628  }
   629  
   630  type ClusterOutput struct{ *pulumi.OutputState }
   631  
   632  func (ClusterOutput) ElementType() reflect.Type {
   633  	return reflect.TypeOf((**Cluster)(nil)).Elem()
   634  }
   635  
   636  func (o ClusterOutput) ToClusterOutput() ClusterOutput {
   637  	return o
   638  }
   639  
   640  func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
   641  	return o
   642  }
   643  
   644  // Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster.
   645  func (o ClusterOutput) Arn() pulumi.StringOutput {
   646  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   647  }
   648  
   649  // Comma separated list of one or more hostname:port pairs of kafka brokers suitable to bootstrap connectivity to the kafka cluster. Contains a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `PLAINTEXT` or `TLS_PLAINTEXT`. The resource sorts values alphabetically. AWS may not always return all endpoints so this value is not guaranteed to be stable across applies.
   650  func (o ClusterOutput) BootstrapBrokers() pulumi.StringOutput {
   651  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokers }).(pulumi.StringOutput)
   652  }
   653  
   654  // One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9198`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   655  func (o ClusterOutput) BootstrapBrokersPublicSaslIam() pulumi.StringOutput {
   656  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersPublicSaslIam }).(pulumi.StringOutput)
   657  }
   658  
   659  // One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9196`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   660  func (o ClusterOutput) BootstrapBrokersPublicSaslScram() pulumi.StringOutput {
   661  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersPublicSaslScram }).(pulumi.StringOutput)
   662  }
   663  
   664  // One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194,b-2-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194,b-3-public.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9194`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `broker_node_group_info.0.connectivity_info.0.public_access.0.type` is set to `SERVICE_PROVIDED_EIPS` and the cluster fulfill all other requirements for public access. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   665  func (o ClusterOutput) BootstrapBrokersPublicTls() pulumi.StringOutput {
   666  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersPublicTls }).(pulumi.StringOutput)
   667  }
   668  
   669  // One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   670  func (o ClusterOutput) BootstrapBrokersSaslIam() pulumi.StringOutput {
   671  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersSaslIam }).(pulumi.StringOutput)
   672  }
   673  
   674  // One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   675  func (o ClusterOutput) BootstrapBrokersSaslScram() pulumi.StringOutput {
   676  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersSaslScram }).(pulumi.StringOutput)
   677  }
   678  
   679  // One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
   680  func (o ClusterOutput) BootstrapBrokersTls() pulumi.StringOutput {
   681  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersTls }).(pulumi.StringOutput)
   682  }
   683  
   684  // A string containing one or more DNS names (or IP addresses) and SASL IAM port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   685  func (o ClusterOutput) BootstrapBrokersVpcConnectivitySaslIam() pulumi.StringOutput {
   686  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersVpcConnectivitySaslIam }).(pulumi.StringOutput)
   687  }
   688  
   689  // A string containing one or more DNS names (or IP addresses) and SASL SCRAM port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   690  func (o ClusterOutput) BootstrapBrokersVpcConnectivitySaslScram() pulumi.StringOutput {
   691  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersVpcConnectivitySaslScram }).(pulumi.StringOutput)
   692  }
   693  
   694  // A string containing one or more DNS names (or IP addresses) and TLS port pairs for VPC connectivity. AWS may not always return all endpoints so the values may not be stable across applies.
   695  func (o ClusterOutput) BootstrapBrokersVpcConnectivityTls() pulumi.StringOutput {
   696  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.BootstrapBrokersVpcConnectivityTls }).(pulumi.StringOutput)
   697  }
   698  
   699  // Configuration block for the broker nodes of the Kafka cluster.
   700  func (o ClusterOutput) BrokerNodeGroupInfo() ClusterBrokerNodeGroupInfoOutput {
   701  	return o.ApplyT(func(v *Cluster) ClusterBrokerNodeGroupInfoOutput { return v.BrokerNodeGroupInfo }).(ClusterBrokerNodeGroupInfoOutput)
   702  }
   703  
   704  // Configuration block for specifying a client authentication. See below.
   705  func (o ClusterOutput) ClientAuthentication() ClusterClientAuthenticationPtrOutput {
   706  	return o.ApplyT(func(v *Cluster) ClusterClientAuthenticationPtrOutput { return v.ClientAuthentication }).(ClusterClientAuthenticationPtrOutput)
   707  }
   708  
   709  // Name of the MSK cluster.
   710  func (o ClusterOutput) ClusterName() pulumi.StringOutput {
   711  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput)
   712  }
   713  
   714  // UUID of the MSK cluster, for use in IAM policies.
   715  func (o ClusterOutput) ClusterUuid() pulumi.StringOutput {
   716  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ClusterUuid }).(pulumi.StringOutput)
   717  }
   718  
   719  // Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.
   720  func (o ClusterOutput) ConfigurationInfo() ClusterConfigurationInfoPtrOutput {
   721  	return o.ApplyT(func(v *Cluster) ClusterConfigurationInfoPtrOutput { return v.ConfigurationInfo }).(ClusterConfigurationInfoPtrOutput)
   722  }
   723  
   724  // Current version of the MSK Cluster used for updates, e.g., `K13V1IB3VIYZZH`
   725  func (o ClusterOutput) CurrentVersion() pulumi.StringOutput {
   726  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.CurrentVersion }).(pulumi.StringOutput)
   727  }
   728  
   729  // Configuration block for specifying encryption. See below.
   730  func (o ClusterOutput) EncryptionInfo() ClusterEncryptionInfoPtrOutput {
   731  	return o.ApplyT(func(v *Cluster) ClusterEncryptionInfoPtrOutput { return v.EncryptionInfo }).(ClusterEncryptionInfoPtrOutput)
   732  }
   733  
   734  // Specify the desired enhanced MSK CloudWatch monitoring level. See [Monitoring Amazon MSK with Amazon CloudWatch](https://docs.aws.amazon.com/msk/latest/developerguide/monitoring.html)
   735  func (o ClusterOutput) EnhancedMonitoring() pulumi.StringPtrOutput {
   736  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.EnhancedMonitoring }).(pulumi.StringPtrOutput)
   737  }
   738  
   739  // Specify the desired Kafka software version.
   740  func (o ClusterOutput) KafkaVersion() pulumi.StringOutput {
   741  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.KafkaVersion }).(pulumi.StringOutput)
   742  }
   743  
   744  // Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
   745  func (o ClusterOutput) LoggingInfo() ClusterLoggingInfoPtrOutput {
   746  	return o.ApplyT(func(v *Cluster) ClusterLoggingInfoPtrOutput { return v.LoggingInfo }).(ClusterLoggingInfoPtrOutput)
   747  }
   748  
   749  // The desired total number of broker nodes in the kafka cluster.  It must be a multiple of the number of specified client subnets.
   750  func (o ClusterOutput) NumberOfBrokerNodes() pulumi.IntOutput {
   751  	return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.NumberOfBrokerNodes }).(pulumi.IntOutput)
   752  }
   753  
   754  // Configuration block for JMX and Node monitoring for the MSK cluster. See below.
   755  func (o ClusterOutput) OpenMonitoring() ClusterOpenMonitoringPtrOutput {
   756  	return o.ApplyT(func(v *Cluster) ClusterOpenMonitoringPtrOutput { return v.OpenMonitoring }).(ClusterOpenMonitoringPtrOutput)
   757  }
   758  
   759  // Controls storage mode for supported storage tiers. Valid values are: `LOCAL` or `TIERED`.
   760  func (o ClusterOutput) StorageMode() pulumi.StringOutput {
   761  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.StorageMode }).(pulumi.StringOutput)
   762  }
   763  
   764  // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   765  func (o ClusterOutput) Tags() pulumi.StringMapOutput {
   766  	return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   767  }
   768  
   769  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   770  //
   771  // Deprecated: Please use `tags` instead.
   772  func (o ClusterOutput) TagsAll() pulumi.StringMapOutput {
   773  	return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   774  }
   775  
   776  // A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
   777  func (o ClusterOutput) ZookeeperConnectString() pulumi.StringOutput {
   778  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ZookeeperConnectString }).(pulumi.StringOutput)
   779  }
   780  
   781  // A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
   782  func (o ClusterOutput) ZookeeperConnectStringTls() pulumi.StringOutput {
   783  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ZookeeperConnectStringTls }).(pulumi.StringOutput)
   784  }
   785  
   786  type ClusterArrayOutput struct{ *pulumi.OutputState }
   787  
   788  func (ClusterArrayOutput) ElementType() reflect.Type {
   789  	return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
   790  }
   791  
   792  func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput {
   793  	return o
   794  }
   795  
   796  func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
   797  	return o
   798  }
   799  
   800  func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput {
   801  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster {
   802  		return vs[0].([]*Cluster)[vs[1].(int)]
   803  	}).(ClusterOutput)
   804  }
   805  
   806  type ClusterMapOutput struct{ *pulumi.OutputState }
   807  
   808  func (ClusterMapOutput) ElementType() reflect.Type {
   809  	return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
   810  }
   811  
   812  func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput {
   813  	return o
   814  }
   815  
   816  func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
   817  	return o
   818  }
   819  
   820  func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput {
   821  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster {
   822  		return vs[0].(map[string]*Cluster)[vs[1].(string)]
   823  	}).(ClusterOutput)
   824  }
   825  
   826  func init() {
   827  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{})
   828  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{})
   829  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{})
   830  	pulumi.RegisterOutputType(ClusterOutput{})
   831  	pulumi.RegisterOutputType(ClusterArrayOutput{})
   832  	pulumi.RegisterOutputType(ClusterMapOutput{})
   833  }