github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/msk/getCluster.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 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Get information on an Amazon MSK Cluster. 15 // 16 // > **Note:** This data sources returns information on _provisioned_ clusters. 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := msk.LookupCluster(ctx, &msk.LookupClusterArgs{ 34 // ClusterName: "example", 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func LookupCluster(ctx *pulumi.Context, args *LookupClusterArgs, opts ...pulumi.InvokeOption) (*LookupClusterResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv LookupClusterResult 48 err := ctx.Invoke("aws:msk/getCluster:getCluster", args, &rv, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &rv, nil 53 } 54 55 // A collection of arguments for invoking getCluster. 56 type LookupClusterArgs struct { 57 // Name of the cluster. 58 ClusterName string `pulumi:"clusterName"` 59 // Map of key-value pairs assigned to the cluster. 60 Tags map[string]string `pulumi:"tags"` 61 } 62 63 // A collection of values returned by getCluster. 64 type LookupClusterResult struct { 65 // ARN of the MSK cluster. 66 Arn string `pulumi:"arn"` 67 // 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. 68 BootstrapBrokers string `pulumi:"bootstrapBrokers"` 69 // 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. 70 BootstrapBrokersPublicSaslIam string `pulumi:"bootstrapBrokersPublicSaslIam"` 71 // 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. 72 BootstrapBrokersPublicSaslScram string `pulumi:"bootstrapBrokersPublicSaslScram"` 73 // 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. 74 BootstrapBrokersPublicTls string `pulumi:"bootstrapBrokersPublicTls"` 75 // 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. 76 BootstrapBrokersSaslIam string `pulumi:"bootstrapBrokersSaslIam"` 77 // 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. 78 BootstrapBrokersSaslScram string `pulumi:"bootstrapBrokersSaslScram"` 79 // 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. 80 BootstrapBrokersTls string `pulumi:"bootstrapBrokersTls"` 81 ClusterName string `pulumi:"clusterName"` 82 // UUID of the MSK cluster, for use in IAM policies. 83 ClusterUuid string `pulumi:"clusterUuid"` 84 // The provider-assigned unique ID for this managed resource. 85 Id string `pulumi:"id"` 86 // Apache Kafka version. 87 KafkaVersion string `pulumi:"kafkaVersion"` 88 // Number of broker nodes in the cluster. 89 NumberOfBrokerNodes int `pulumi:"numberOfBrokerNodes"` 90 // Map of key-value pairs assigned to the cluster. 91 Tags map[string]string `pulumi:"tags"` 92 // 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 alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies. 93 ZookeeperConnectString string `pulumi:"zookeeperConnectString"` 94 // 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. 95 ZookeeperConnectStringTls string `pulumi:"zookeeperConnectStringTls"` 96 } 97 98 func LookupClusterOutput(ctx *pulumi.Context, args LookupClusterOutputArgs, opts ...pulumi.InvokeOption) LookupClusterResultOutput { 99 return pulumi.ToOutputWithContext(context.Background(), args). 100 ApplyT(func(v interface{}) (LookupClusterResult, error) { 101 args := v.(LookupClusterArgs) 102 r, err := LookupCluster(ctx, &args, opts...) 103 var s LookupClusterResult 104 if r != nil { 105 s = *r 106 } 107 return s, err 108 }).(LookupClusterResultOutput) 109 } 110 111 // A collection of arguments for invoking getCluster. 112 type LookupClusterOutputArgs struct { 113 // Name of the cluster. 114 ClusterName pulumi.StringInput `pulumi:"clusterName"` 115 // Map of key-value pairs assigned to the cluster. 116 Tags pulumi.StringMapInput `pulumi:"tags"` 117 } 118 119 func (LookupClusterOutputArgs) ElementType() reflect.Type { 120 return reflect.TypeOf((*LookupClusterArgs)(nil)).Elem() 121 } 122 123 // A collection of values returned by getCluster. 124 type LookupClusterResultOutput struct{ *pulumi.OutputState } 125 126 func (LookupClusterResultOutput) ElementType() reflect.Type { 127 return reflect.TypeOf((*LookupClusterResult)(nil)).Elem() 128 } 129 130 func (o LookupClusterResultOutput) ToLookupClusterResultOutput() LookupClusterResultOutput { 131 return o 132 } 133 134 func (o LookupClusterResultOutput) ToLookupClusterResultOutputWithContext(ctx context.Context) LookupClusterResultOutput { 135 return o 136 } 137 138 // ARN of the MSK cluster. 139 func (o LookupClusterResultOutput) Arn() pulumi.StringOutput { 140 return o.ApplyT(func(v LookupClusterResult) string { return v.Arn }).(pulumi.StringOutput) 141 } 142 143 // 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. 144 func (o LookupClusterResultOutput) BootstrapBrokers() pulumi.StringOutput { 145 return o.ApplyT(func(v LookupClusterResult) string { return v.BootstrapBrokers }).(pulumi.StringOutput) 146 } 147 148 // 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. 149 func (o LookupClusterResultOutput) BootstrapBrokersPublicSaslIam() pulumi.StringOutput { 150 return o.ApplyT(func(v LookupClusterResult) string { return v.BootstrapBrokersPublicSaslIam }).(pulumi.StringOutput) 151 } 152 153 // 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. 154 func (o LookupClusterResultOutput) BootstrapBrokersPublicSaslScram() pulumi.StringOutput { 155 return o.ApplyT(func(v LookupClusterResult) string { return v.BootstrapBrokersPublicSaslScram }).(pulumi.StringOutput) 156 } 157 158 // 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. 159 func (o LookupClusterResultOutput) BootstrapBrokersPublicTls() pulumi.StringOutput { 160 return o.ApplyT(func(v LookupClusterResult) string { return v.BootstrapBrokersPublicTls }).(pulumi.StringOutput) 161 } 162 163 // 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. 164 func (o LookupClusterResultOutput) BootstrapBrokersSaslIam() pulumi.StringOutput { 165 return o.ApplyT(func(v LookupClusterResult) string { return v.BootstrapBrokersSaslIam }).(pulumi.StringOutput) 166 } 167 168 // 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. 169 func (o LookupClusterResultOutput) BootstrapBrokersSaslScram() pulumi.StringOutput { 170 return o.ApplyT(func(v LookupClusterResult) string { return v.BootstrapBrokersSaslScram }).(pulumi.StringOutput) 171 } 172 173 // 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. 174 func (o LookupClusterResultOutput) BootstrapBrokersTls() pulumi.StringOutput { 175 return o.ApplyT(func(v LookupClusterResult) string { return v.BootstrapBrokersTls }).(pulumi.StringOutput) 176 } 177 178 func (o LookupClusterResultOutput) ClusterName() pulumi.StringOutput { 179 return o.ApplyT(func(v LookupClusterResult) string { return v.ClusterName }).(pulumi.StringOutput) 180 } 181 182 // UUID of the MSK cluster, for use in IAM policies. 183 func (o LookupClusterResultOutput) ClusterUuid() pulumi.StringOutput { 184 return o.ApplyT(func(v LookupClusterResult) string { return v.ClusterUuid }).(pulumi.StringOutput) 185 } 186 187 // The provider-assigned unique ID for this managed resource. 188 func (o LookupClusterResultOutput) Id() pulumi.StringOutput { 189 return o.ApplyT(func(v LookupClusterResult) string { return v.Id }).(pulumi.StringOutput) 190 } 191 192 // Apache Kafka version. 193 func (o LookupClusterResultOutput) KafkaVersion() pulumi.StringOutput { 194 return o.ApplyT(func(v LookupClusterResult) string { return v.KafkaVersion }).(pulumi.StringOutput) 195 } 196 197 // Number of broker nodes in the cluster. 198 func (o LookupClusterResultOutput) NumberOfBrokerNodes() pulumi.IntOutput { 199 return o.ApplyT(func(v LookupClusterResult) int { return v.NumberOfBrokerNodes }).(pulumi.IntOutput) 200 } 201 202 // Map of key-value pairs assigned to the cluster. 203 func (o LookupClusterResultOutput) Tags() pulumi.StringMapOutput { 204 return o.ApplyT(func(v LookupClusterResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 205 } 206 207 // 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 alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies. 208 func (o LookupClusterResultOutput) ZookeeperConnectString() pulumi.StringOutput { 209 return o.ApplyT(func(v LookupClusterResult) string { return v.ZookeeperConnectString }).(pulumi.StringOutput) 210 } 211 212 // 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. 213 func (o LookupClusterResultOutput) ZookeeperConnectStringTls() pulumi.StringOutput { 214 return o.ApplyT(func(v LookupClusterResult) string { return v.ZookeeperConnectStringTls }).(pulumi.StringOutput) 215 } 216 217 func init() { 218 pulumi.RegisterOutputType(LookupClusterResultOutput{}) 219 }