github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/elasticsearch/domain.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 elasticsearch 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 // Manages an AWS Elasticsearch Domain. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch" 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 := elasticsearch.NewDomain(ctx, "example", &elasticsearch.DomainArgs{ 34 // DomainName: pulumi.String("example"), 35 // ElasticsearchVersion: pulumi.String("7.10"), 36 // ClusterConfig: &elasticsearch.DomainClusterConfigArgs{ 37 // InstanceType: pulumi.String("r4.large.elasticsearch"), 38 // }, 39 // Tags: pulumi.StringMap{ 40 // "Domain": pulumi.String("TestDomain"), 41 // }, 42 // }) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ### Access Policy 54 // 55 // > See also: `elasticsearch.DomainPolicy` resource 56 // 57 // <!--Start PulumiCodeChooser --> 58 // ```go 59 // package main 60 // 61 // import ( 62 // 63 // "fmt" 64 // 65 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws" 66 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch" 67 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 68 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" 69 // 70 // ) 71 // 72 // func main() { 73 // pulumi.Run(func(ctx *pulumi.Context) error { 74 // cfg := config.New(ctx, "") 75 // domain := "tf-test" 76 // if param := cfg.Get("domain"); param != "" { 77 // domain = param 78 // } 79 // current, err := aws.GetRegion(ctx, nil, nil) 80 // if err != nil { 81 // return err 82 // } 83 // currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) 84 // if err != nil { 85 // return err 86 // } 87 // _, err = elasticsearch.NewDomain(ctx, "example", &elasticsearch.DomainArgs{ 88 // DomainName: pulumi.String(domain), 89 // AccessPolicies: pulumi.Any(fmt.Sprintf(`{ 90 // "Version": "2012-10-17", 91 // "Statement": [ 92 // { 93 // "Action": "es:*", 94 // "Principal": "*", 95 // "Effect": "Allow", 96 // "Resource": "arn:aws:es:%v:%v:domain/%v/*", 97 // "Condition": { 98 // "IpAddress": {"aws:SourceIp": ["66.193.100.22/32"]} 99 // } 100 // } 101 // ] 102 // } 103 // 104 // `, current.Name, currentGetCallerIdentity.AccountId, domain)), 105 // 106 // }) 107 // if err != nil { 108 // return err 109 // } 110 // return nil 111 // }) 112 // } 113 // 114 // ``` 115 // <!--End PulumiCodeChooser --> 116 // 117 // ### Log Publishing to CloudWatch Logs 118 // 119 // <!--Start PulumiCodeChooser --> 120 // ```go 121 // package main 122 // 123 // import ( 124 // 125 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch" 126 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch" 127 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 128 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 129 // 130 // ) 131 // 132 // func main() { 133 // pulumi.Run(func(ctx *pulumi.Context) error { 134 // exampleLogGroup, err := cloudwatch.NewLogGroup(ctx, "example", &cloudwatch.LogGroupArgs{ 135 // Name: pulumi.String("example"), 136 // }) 137 // if err != nil { 138 // return err 139 // } 140 // example, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 141 // Statements: []iam.GetPolicyDocumentStatement{ 142 // { 143 // Effect: pulumi.StringRef("Allow"), 144 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 145 // { 146 // Type: "Service", 147 // Identifiers: []string{ 148 // "es.amazonaws.com", 149 // }, 150 // }, 151 // }, 152 // Actions: []string{ 153 // "logs:PutLogEvents", 154 // "logs:PutLogEventsBatch", 155 // "logs:CreateLogStream", 156 // }, 157 // Resources: []string{ 158 // "arn:aws:logs:*", 159 // }, 160 // }, 161 // }, 162 // }, nil) 163 // if err != nil { 164 // return err 165 // } 166 // _, err = cloudwatch.NewLogResourcePolicy(ctx, "example", &cloudwatch.LogResourcePolicyArgs{ 167 // PolicyName: pulumi.String("example"), 168 // PolicyDocument: pulumi.String(example.Json), 169 // }) 170 // if err != nil { 171 // return err 172 // } 173 // _, err = elasticsearch.NewDomain(ctx, "example", &elasticsearch.DomainArgs{ 174 // LogPublishingOptions: elasticsearch.DomainLogPublishingOptionArray{ 175 // &elasticsearch.DomainLogPublishingOptionArgs{ 176 // CloudwatchLogGroupArn: exampleLogGroup.Arn, 177 // LogType: pulumi.String("INDEX_SLOW_LOGS"), 178 // }, 179 // }, 180 // }) 181 // if err != nil { 182 // return err 183 // } 184 // return nil 185 // }) 186 // } 187 // 188 // ``` 189 // <!--End PulumiCodeChooser --> 190 // 191 // ### VPC based ES 192 // 193 // <!--Start PulumiCodeChooser --> 194 // ```go 195 // package main 196 // 197 // import ( 198 // 199 // "fmt" 200 // 201 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws" 202 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 203 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch" 204 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 205 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 206 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" 207 // 208 // ) 209 // func main() { 210 // pulumi.Run(func(ctx *pulumi.Context) error { 211 // cfg := config.New(ctx, "") 212 // vpc := cfg.RequireObject("vpc") 213 // domain := "tf-test"; 214 // if param := cfg.Get("domain"); param != ""{ 215 // domain = param 216 // } 217 // selected, err := ec2.LookupVpc(ctx, &ec2.LookupVpcArgs{ 218 // Tags: interface{}{ 219 // Name: vpc, 220 // }, 221 // }, nil); 222 // if err != nil { 223 // return err 224 // } 225 // selectedGetSubnets, err := ec2.GetSubnets(ctx, &ec2.GetSubnetsArgs{ 226 // Filters: []ec2.GetSubnetsFilter{ 227 // { 228 // Name: "vpc-id", 229 // Values: interface{}{ 230 // selected.Id, 231 // }, 232 // }, 233 // }, 234 // Tags: map[string]interface{}{ 235 // "Tier": "private", 236 // }, 237 // }, nil); 238 // if err != nil { 239 // return err 240 // } 241 // current, err := aws.GetRegion(ctx, nil, nil); 242 // if err != nil { 243 // return err 244 // } 245 // currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil); 246 // if err != nil { 247 // return err 248 // } 249 // es, err := ec2.NewSecurityGroup(ctx, "es", &ec2.SecurityGroupArgs{ 250 // Name: pulumi.String(fmt.Sprintf("%v-elasticsearch-%v", vpc, domain)), 251 // Description: pulumi.String("Managed by Pulumi"), 252 // VpcId: pulumi.String(selected.Id), 253 // Ingress: ec2.SecurityGroupIngressArray{ 254 // &ec2.SecurityGroupIngressArgs{ 255 // FromPort: pulumi.Int(443), 256 // ToPort: pulumi.Int(443), 257 // Protocol: pulumi.String("tcp"), 258 // CidrBlocks: pulumi.StringArray{ 259 // pulumi.String(selected.CidrBlock), 260 // }, 261 // }, 262 // }, 263 // }) 264 // if err != nil { 265 // return err 266 // } 267 // esServiceLinkedRole, err := iam.NewServiceLinkedRole(ctx, "es", &iam.ServiceLinkedRoleArgs{ 268 // AwsServiceName: pulumi.String("opensearchservice.amazonaws.com"), 269 // }) 270 // if err != nil { 271 // return err 272 // } 273 // _, err = elasticsearch.NewDomain(ctx, "es", &elasticsearch.DomainArgs{ 274 // DomainName: pulumi.String(domain), 275 // ElasticsearchVersion: pulumi.String("6.3"), 276 // ClusterConfig: &elasticsearch.DomainClusterConfigArgs{ 277 // InstanceType: pulumi.String("m4.large.elasticsearch"), 278 // ZoneAwarenessEnabled: pulumi.Bool(true), 279 // }, 280 // VpcOptions: &elasticsearch.DomainVpcOptionsArgs{ 281 // SubnetIds: pulumi.StringArray{ 282 // pulumi.String(selectedGetSubnets.Ids[0]), 283 // pulumi.String(selectedGetSubnets.Ids[1]), 284 // }, 285 // SecurityGroupIds: pulumi.StringArray{ 286 // es.ID(), 287 // }, 288 // }, 289 // AdvancedOptions: pulumi.StringMap{ 290 // "rest.action.multi.allow_explicit_index": pulumi.String("true"), 291 // }, 292 // 293 // AccessPolicies: pulumi.Any(fmt.Sprintf(`{ 294 // "Version": "2012-10-17", 295 // "Statement": [ 296 // { 297 // "Action": "es:*", 298 // "Principal": "*", 299 // "Effect": "Allow", 300 // "Resource": "arn:aws:es:%v:%v:domain/%v/*" 301 // } 302 // ] 303 // } 304 // 305 // `, current.Name, currentGetCallerIdentity.AccountId, domain)), 306 // Tags: pulumi.StringMap{ 307 // "Domain": pulumi.String("TestDomain"), 308 // }, 309 // }, pulumi.DependsOn([]pulumi.Resource{ 310 // esServiceLinkedRole, 311 // })) 312 // if err != nil { 313 // return err 314 // } 315 // return nil 316 // }) 317 // } 318 // ``` 319 // <!--End PulumiCodeChooser --> 320 // 321 // ## Import 322 // 323 // Using `pulumi import`, import Elasticsearch domains using the `domain_name`. For example: 324 // 325 // ```sh 326 // $ pulumi import aws:elasticsearch/domain:Domain example domain_name 327 // ``` 328 type Domain struct { 329 pulumi.CustomResourceState 330 331 // IAM policy document specifying the access policies for the domain. 332 AccessPolicies pulumi.StringOutput `pulumi:"accessPolicies"` 333 // Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing the provider to want to recreate your Elasticsearch domain on every apply. 334 AdvancedOptions pulumi.StringMapOutput `pulumi:"advancedOptions"` 335 // Configuration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html). Detailed below. 336 AdvancedSecurityOptions DomainAdvancedSecurityOptionsOutput `pulumi:"advancedSecurityOptions"` 337 // ARN of the domain. 338 Arn pulumi.StringOutput `pulumi:"arn"` 339 // Configuration block for the Auto-Tune options of the domain. Detailed below. 340 AutoTuneOptions DomainAutoTuneOptionsOutput `pulumi:"autoTuneOptions"` 341 // Configuration block for the cluster of the domain. Detailed below. 342 ClusterConfig DomainClusterConfigOutput `pulumi:"clusterConfig"` 343 // Configuration block for authenticating Kibana with Cognito. Detailed below. 344 CognitoOptions DomainCognitoOptionsPtrOutput `pulumi:"cognitoOptions"` 345 // Configuration block for domain endpoint HTTP(S) related options. Detailed below. 346 DomainEndpointOptions DomainDomainEndpointOptionsOutput `pulumi:"domainEndpointOptions"` 347 // Unique identifier for the domain. 348 DomainId pulumi.StringOutput `pulumi:"domainId"` 349 // Name of the domain. 350 // 351 // The following arguments are optional: 352 DomainName pulumi.StringOutput `pulumi:"domainName"` 353 // Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/). Detailed below. 354 EbsOptions DomainEbsOptionsOutput `pulumi:"ebsOptions"` 355 // Version of Elasticsearch to deploy. Defaults to `1.5`. 356 ElasticsearchVersion pulumi.StringPtrOutput `pulumi:"elasticsearchVersion"` 357 // Configuration block for encrypt at rest options. Only available for [certain instance types](http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). Detailed below. 358 EncryptAtRest DomainEncryptAtRestOutput `pulumi:"encryptAtRest"` 359 // Domain-specific endpoint used to submit index, search, and data upload requests. 360 Endpoint pulumi.StringOutput `pulumi:"endpoint"` 361 // Domain-specific endpoint for kibana without https scheme. 362 KibanaEndpoint pulumi.StringOutput `pulumi:"kibanaEndpoint"` 363 // Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log_type, within the same resource. Detailed below. 364 LogPublishingOptions DomainLogPublishingOptionArrayOutput `pulumi:"logPublishingOptions"` 365 // Configuration block for node-to-node encryption options. Detailed below. 366 NodeToNodeEncryption DomainNodeToNodeEncryptionOutput `pulumi:"nodeToNodeEncryption"` 367 // Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running Elasticsearch 5.3 and later, Amazon ES takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions of Elasticsearch, Amazon ES takes daily automated snapshots. 368 SnapshotOptions DomainSnapshotOptionsPtrOutput `pulumi:"snapshotOptions"` 369 // 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. 370 Tags pulumi.StringMapOutput `pulumi:"tags"` 371 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 372 // 373 // Deprecated: Please use `tags` instead. 374 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 375 // Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-vpc-limitations)). Detailed below. 376 VpcOptions DomainVpcOptionsPtrOutput `pulumi:"vpcOptions"` 377 } 378 379 // NewDomain registers a new resource with the given unique name, arguments, and options. 380 func NewDomain(ctx *pulumi.Context, 381 name string, args *DomainArgs, opts ...pulumi.ResourceOption) (*Domain, error) { 382 if args == nil { 383 args = &DomainArgs{} 384 } 385 386 opts = internal.PkgResourceDefaultOpts(opts) 387 var resource Domain 388 err := ctx.RegisterResource("aws:elasticsearch/domain:Domain", name, args, &resource, opts...) 389 if err != nil { 390 return nil, err 391 } 392 return &resource, nil 393 } 394 395 // GetDomain gets an existing Domain resource's state with the given name, ID, and optional 396 // state properties that are used to uniquely qualify the lookup (nil if not required). 397 func GetDomain(ctx *pulumi.Context, 398 name string, id pulumi.IDInput, state *DomainState, opts ...pulumi.ResourceOption) (*Domain, error) { 399 var resource Domain 400 err := ctx.ReadResource("aws:elasticsearch/domain:Domain", name, id, state, &resource, opts...) 401 if err != nil { 402 return nil, err 403 } 404 return &resource, nil 405 } 406 407 // Input properties used for looking up and filtering Domain resources. 408 type domainState struct { 409 // IAM policy document specifying the access policies for the domain. 410 AccessPolicies interface{} `pulumi:"accessPolicies"` 411 // Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing the provider to want to recreate your Elasticsearch domain on every apply. 412 AdvancedOptions map[string]string `pulumi:"advancedOptions"` 413 // Configuration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html). Detailed below. 414 AdvancedSecurityOptions *DomainAdvancedSecurityOptions `pulumi:"advancedSecurityOptions"` 415 // ARN of the domain. 416 Arn *string `pulumi:"arn"` 417 // Configuration block for the Auto-Tune options of the domain. Detailed below. 418 AutoTuneOptions *DomainAutoTuneOptions `pulumi:"autoTuneOptions"` 419 // Configuration block for the cluster of the domain. Detailed below. 420 ClusterConfig *DomainClusterConfig `pulumi:"clusterConfig"` 421 // Configuration block for authenticating Kibana with Cognito. Detailed below. 422 CognitoOptions *DomainCognitoOptions `pulumi:"cognitoOptions"` 423 // Configuration block for domain endpoint HTTP(S) related options. Detailed below. 424 DomainEndpointOptions *DomainDomainEndpointOptions `pulumi:"domainEndpointOptions"` 425 // Unique identifier for the domain. 426 DomainId *string `pulumi:"domainId"` 427 // Name of the domain. 428 // 429 // The following arguments are optional: 430 DomainName *string `pulumi:"domainName"` 431 // Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/). Detailed below. 432 EbsOptions *DomainEbsOptions `pulumi:"ebsOptions"` 433 // Version of Elasticsearch to deploy. Defaults to `1.5`. 434 ElasticsearchVersion *string `pulumi:"elasticsearchVersion"` 435 // Configuration block for encrypt at rest options. Only available for [certain instance types](http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). Detailed below. 436 EncryptAtRest *DomainEncryptAtRest `pulumi:"encryptAtRest"` 437 // Domain-specific endpoint used to submit index, search, and data upload requests. 438 Endpoint *string `pulumi:"endpoint"` 439 // Domain-specific endpoint for kibana without https scheme. 440 KibanaEndpoint *string `pulumi:"kibanaEndpoint"` 441 // Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log_type, within the same resource. Detailed below. 442 LogPublishingOptions []DomainLogPublishingOption `pulumi:"logPublishingOptions"` 443 // Configuration block for node-to-node encryption options. Detailed below. 444 NodeToNodeEncryption *DomainNodeToNodeEncryption `pulumi:"nodeToNodeEncryption"` 445 // Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running Elasticsearch 5.3 and later, Amazon ES takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions of Elasticsearch, Amazon ES takes daily automated snapshots. 446 SnapshotOptions *DomainSnapshotOptions `pulumi:"snapshotOptions"` 447 // 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. 448 Tags map[string]string `pulumi:"tags"` 449 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 450 // 451 // Deprecated: Please use `tags` instead. 452 TagsAll map[string]string `pulumi:"tagsAll"` 453 // Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-vpc-limitations)). Detailed below. 454 VpcOptions *DomainVpcOptions `pulumi:"vpcOptions"` 455 } 456 457 type DomainState struct { 458 // IAM policy document specifying the access policies for the domain. 459 AccessPolicies pulumi.Input 460 // Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing the provider to want to recreate your Elasticsearch domain on every apply. 461 AdvancedOptions pulumi.StringMapInput 462 // Configuration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html). Detailed below. 463 AdvancedSecurityOptions DomainAdvancedSecurityOptionsPtrInput 464 // ARN of the domain. 465 Arn pulumi.StringPtrInput 466 // Configuration block for the Auto-Tune options of the domain. Detailed below. 467 AutoTuneOptions DomainAutoTuneOptionsPtrInput 468 // Configuration block for the cluster of the domain. Detailed below. 469 ClusterConfig DomainClusterConfigPtrInput 470 // Configuration block for authenticating Kibana with Cognito. Detailed below. 471 CognitoOptions DomainCognitoOptionsPtrInput 472 // Configuration block for domain endpoint HTTP(S) related options. Detailed below. 473 DomainEndpointOptions DomainDomainEndpointOptionsPtrInput 474 // Unique identifier for the domain. 475 DomainId pulumi.StringPtrInput 476 // Name of the domain. 477 // 478 // The following arguments are optional: 479 DomainName pulumi.StringPtrInput 480 // Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/). Detailed below. 481 EbsOptions DomainEbsOptionsPtrInput 482 // Version of Elasticsearch to deploy. Defaults to `1.5`. 483 ElasticsearchVersion pulumi.StringPtrInput 484 // Configuration block for encrypt at rest options. Only available for [certain instance types](http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). Detailed below. 485 EncryptAtRest DomainEncryptAtRestPtrInput 486 // Domain-specific endpoint used to submit index, search, and data upload requests. 487 Endpoint pulumi.StringPtrInput 488 // Domain-specific endpoint for kibana without https scheme. 489 KibanaEndpoint pulumi.StringPtrInput 490 // Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log_type, within the same resource. Detailed below. 491 LogPublishingOptions DomainLogPublishingOptionArrayInput 492 // Configuration block for node-to-node encryption options. Detailed below. 493 NodeToNodeEncryption DomainNodeToNodeEncryptionPtrInput 494 // Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running Elasticsearch 5.3 and later, Amazon ES takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions of Elasticsearch, Amazon ES takes daily automated snapshots. 495 SnapshotOptions DomainSnapshotOptionsPtrInput 496 // 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. 497 Tags pulumi.StringMapInput 498 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 499 // 500 // Deprecated: Please use `tags` instead. 501 TagsAll pulumi.StringMapInput 502 // Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-vpc-limitations)). Detailed below. 503 VpcOptions DomainVpcOptionsPtrInput 504 } 505 506 func (DomainState) ElementType() reflect.Type { 507 return reflect.TypeOf((*domainState)(nil)).Elem() 508 } 509 510 type domainArgs struct { 511 // IAM policy document specifying the access policies for the domain. 512 AccessPolicies interface{} `pulumi:"accessPolicies"` 513 // Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing the provider to want to recreate your Elasticsearch domain on every apply. 514 AdvancedOptions map[string]string `pulumi:"advancedOptions"` 515 // Configuration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html). Detailed below. 516 AdvancedSecurityOptions *DomainAdvancedSecurityOptions `pulumi:"advancedSecurityOptions"` 517 // Configuration block for the Auto-Tune options of the domain. Detailed below. 518 AutoTuneOptions *DomainAutoTuneOptions `pulumi:"autoTuneOptions"` 519 // Configuration block for the cluster of the domain. Detailed below. 520 ClusterConfig *DomainClusterConfig `pulumi:"clusterConfig"` 521 // Configuration block for authenticating Kibana with Cognito. Detailed below. 522 CognitoOptions *DomainCognitoOptions `pulumi:"cognitoOptions"` 523 // Configuration block for domain endpoint HTTP(S) related options. Detailed below. 524 DomainEndpointOptions *DomainDomainEndpointOptions `pulumi:"domainEndpointOptions"` 525 // Name of the domain. 526 // 527 // The following arguments are optional: 528 DomainName *string `pulumi:"domainName"` 529 // Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/). Detailed below. 530 EbsOptions *DomainEbsOptions `pulumi:"ebsOptions"` 531 // Version of Elasticsearch to deploy. Defaults to `1.5`. 532 ElasticsearchVersion *string `pulumi:"elasticsearchVersion"` 533 // Configuration block for encrypt at rest options. Only available for [certain instance types](http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). Detailed below. 534 EncryptAtRest *DomainEncryptAtRest `pulumi:"encryptAtRest"` 535 // Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log_type, within the same resource. Detailed below. 536 LogPublishingOptions []DomainLogPublishingOption `pulumi:"logPublishingOptions"` 537 // Configuration block for node-to-node encryption options. Detailed below. 538 NodeToNodeEncryption *DomainNodeToNodeEncryption `pulumi:"nodeToNodeEncryption"` 539 // Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running Elasticsearch 5.3 and later, Amazon ES takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions of Elasticsearch, Amazon ES takes daily automated snapshots. 540 SnapshotOptions *DomainSnapshotOptions `pulumi:"snapshotOptions"` 541 // 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. 542 Tags map[string]string `pulumi:"tags"` 543 // Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-vpc-limitations)). Detailed below. 544 VpcOptions *DomainVpcOptions `pulumi:"vpcOptions"` 545 } 546 547 // The set of arguments for constructing a Domain resource. 548 type DomainArgs struct { 549 // IAM policy document specifying the access policies for the domain. 550 AccessPolicies pulumi.Input 551 // Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing the provider to want to recreate your Elasticsearch domain on every apply. 552 AdvancedOptions pulumi.StringMapInput 553 // Configuration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html). Detailed below. 554 AdvancedSecurityOptions DomainAdvancedSecurityOptionsPtrInput 555 // Configuration block for the Auto-Tune options of the domain. Detailed below. 556 AutoTuneOptions DomainAutoTuneOptionsPtrInput 557 // Configuration block for the cluster of the domain. Detailed below. 558 ClusterConfig DomainClusterConfigPtrInput 559 // Configuration block for authenticating Kibana with Cognito. Detailed below. 560 CognitoOptions DomainCognitoOptionsPtrInput 561 // Configuration block for domain endpoint HTTP(S) related options. Detailed below. 562 DomainEndpointOptions DomainDomainEndpointOptionsPtrInput 563 // Name of the domain. 564 // 565 // The following arguments are optional: 566 DomainName pulumi.StringPtrInput 567 // Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/). Detailed below. 568 EbsOptions DomainEbsOptionsPtrInput 569 // Version of Elasticsearch to deploy. Defaults to `1.5`. 570 ElasticsearchVersion pulumi.StringPtrInput 571 // Configuration block for encrypt at rest options. Only available for [certain instance types](http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). Detailed below. 572 EncryptAtRest DomainEncryptAtRestPtrInput 573 // Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log_type, within the same resource. Detailed below. 574 LogPublishingOptions DomainLogPublishingOptionArrayInput 575 // Configuration block for node-to-node encryption options. Detailed below. 576 NodeToNodeEncryption DomainNodeToNodeEncryptionPtrInput 577 // Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running Elasticsearch 5.3 and later, Amazon ES takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions of Elasticsearch, Amazon ES takes daily automated snapshots. 578 SnapshotOptions DomainSnapshotOptionsPtrInput 579 // 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. 580 Tags pulumi.StringMapInput 581 // Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-vpc-limitations)). Detailed below. 582 VpcOptions DomainVpcOptionsPtrInput 583 } 584 585 func (DomainArgs) ElementType() reflect.Type { 586 return reflect.TypeOf((*domainArgs)(nil)).Elem() 587 } 588 589 type DomainInput interface { 590 pulumi.Input 591 592 ToDomainOutput() DomainOutput 593 ToDomainOutputWithContext(ctx context.Context) DomainOutput 594 } 595 596 func (*Domain) ElementType() reflect.Type { 597 return reflect.TypeOf((**Domain)(nil)).Elem() 598 } 599 600 func (i *Domain) ToDomainOutput() DomainOutput { 601 return i.ToDomainOutputWithContext(context.Background()) 602 } 603 604 func (i *Domain) ToDomainOutputWithContext(ctx context.Context) DomainOutput { 605 return pulumi.ToOutputWithContext(ctx, i).(DomainOutput) 606 } 607 608 // DomainArrayInput is an input type that accepts DomainArray and DomainArrayOutput values. 609 // You can construct a concrete instance of `DomainArrayInput` via: 610 // 611 // DomainArray{ DomainArgs{...} } 612 type DomainArrayInput interface { 613 pulumi.Input 614 615 ToDomainArrayOutput() DomainArrayOutput 616 ToDomainArrayOutputWithContext(context.Context) DomainArrayOutput 617 } 618 619 type DomainArray []DomainInput 620 621 func (DomainArray) ElementType() reflect.Type { 622 return reflect.TypeOf((*[]*Domain)(nil)).Elem() 623 } 624 625 func (i DomainArray) ToDomainArrayOutput() DomainArrayOutput { 626 return i.ToDomainArrayOutputWithContext(context.Background()) 627 } 628 629 func (i DomainArray) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput { 630 return pulumi.ToOutputWithContext(ctx, i).(DomainArrayOutput) 631 } 632 633 // DomainMapInput is an input type that accepts DomainMap and DomainMapOutput values. 634 // You can construct a concrete instance of `DomainMapInput` via: 635 // 636 // DomainMap{ "key": DomainArgs{...} } 637 type DomainMapInput interface { 638 pulumi.Input 639 640 ToDomainMapOutput() DomainMapOutput 641 ToDomainMapOutputWithContext(context.Context) DomainMapOutput 642 } 643 644 type DomainMap map[string]DomainInput 645 646 func (DomainMap) ElementType() reflect.Type { 647 return reflect.TypeOf((*map[string]*Domain)(nil)).Elem() 648 } 649 650 func (i DomainMap) ToDomainMapOutput() DomainMapOutput { 651 return i.ToDomainMapOutputWithContext(context.Background()) 652 } 653 654 func (i DomainMap) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput { 655 return pulumi.ToOutputWithContext(ctx, i).(DomainMapOutput) 656 } 657 658 type DomainOutput struct{ *pulumi.OutputState } 659 660 func (DomainOutput) ElementType() reflect.Type { 661 return reflect.TypeOf((**Domain)(nil)).Elem() 662 } 663 664 func (o DomainOutput) ToDomainOutput() DomainOutput { 665 return o 666 } 667 668 func (o DomainOutput) ToDomainOutputWithContext(ctx context.Context) DomainOutput { 669 return o 670 } 671 672 // IAM policy document specifying the access policies for the domain. 673 func (o DomainOutput) AccessPolicies() pulumi.StringOutput { 674 return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.AccessPolicies }).(pulumi.StringOutput) 675 } 676 677 // Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing the provider to want to recreate your Elasticsearch domain on every apply. 678 func (o DomainOutput) AdvancedOptions() pulumi.StringMapOutput { 679 return o.ApplyT(func(v *Domain) pulumi.StringMapOutput { return v.AdvancedOptions }).(pulumi.StringMapOutput) 680 } 681 682 // Configuration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html). Detailed below. 683 func (o DomainOutput) AdvancedSecurityOptions() DomainAdvancedSecurityOptionsOutput { 684 return o.ApplyT(func(v *Domain) DomainAdvancedSecurityOptionsOutput { return v.AdvancedSecurityOptions }).(DomainAdvancedSecurityOptionsOutput) 685 } 686 687 // ARN of the domain. 688 func (o DomainOutput) Arn() pulumi.StringOutput { 689 return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 690 } 691 692 // Configuration block for the Auto-Tune options of the domain. Detailed below. 693 func (o DomainOutput) AutoTuneOptions() DomainAutoTuneOptionsOutput { 694 return o.ApplyT(func(v *Domain) DomainAutoTuneOptionsOutput { return v.AutoTuneOptions }).(DomainAutoTuneOptionsOutput) 695 } 696 697 // Configuration block for the cluster of the domain. Detailed below. 698 func (o DomainOutput) ClusterConfig() DomainClusterConfigOutput { 699 return o.ApplyT(func(v *Domain) DomainClusterConfigOutput { return v.ClusterConfig }).(DomainClusterConfigOutput) 700 } 701 702 // Configuration block for authenticating Kibana with Cognito. Detailed below. 703 func (o DomainOutput) CognitoOptions() DomainCognitoOptionsPtrOutput { 704 return o.ApplyT(func(v *Domain) DomainCognitoOptionsPtrOutput { return v.CognitoOptions }).(DomainCognitoOptionsPtrOutput) 705 } 706 707 // Configuration block for domain endpoint HTTP(S) related options. Detailed below. 708 func (o DomainOutput) DomainEndpointOptions() DomainDomainEndpointOptionsOutput { 709 return o.ApplyT(func(v *Domain) DomainDomainEndpointOptionsOutput { return v.DomainEndpointOptions }).(DomainDomainEndpointOptionsOutput) 710 } 711 712 // Unique identifier for the domain. 713 func (o DomainOutput) DomainId() pulumi.StringOutput { 714 return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.DomainId }).(pulumi.StringOutput) 715 } 716 717 // Name of the domain. 718 // 719 // The following arguments are optional: 720 func (o DomainOutput) DomainName() pulumi.StringOutput { 721 return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput) 722 } 723 724 // Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/). Detailed below. 725 func (o DomainOutput) EbsOptions() DomainEbsOptionsOutput { 726 return o.ApplyT(func(v *Domain) DomainEbsOptionsOutput { return v.EbsOptions }).(DomainEbsOptionsOutput) 727 } 728 729 // Version of Elasticsearch to deploy. Defaults to `1.5`. 730 func (o DomainOutput) ElasticsearchVersion() pulumi.StringPtrOutput { 731 return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.ElasticsearchVersion }).(pulumi.StringPtrOutput) 732 } 733 734 // Configuration block for encrypt at rest options. Only available for [certain instance types](http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). Detailed below. 735 func (o DomainOutput) EncryptAtRest() DomainEncryptAtRestOutput { 736 return o.ApplyT(func(v *Domain) DomainEncryptAtRestOutput { return v.EncryptAtRest }).(DomainEncryptAtRestOutput) 737 } 738 739 // Domain-specific endpoint used to submit index, search, and data upload requests. 740 func (o DomainOutput) Endpoint() pulumi.StringOutput { 741 return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput) 742 } 743 744 // Domain-specific endpoint for kibana without https scheme. 745 func (o DomainOutput) KibanaEndpoint() pulumi.StringOutput { 746 return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.KibanaEndpoint }).(pulumi.StringOutput) 747 } 748 749 // Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log_type, within the same resource. Detailed below. 750 func (o DomainOutput) LogPublishingOptions() DomainLogPublishingOptionArrayOutput { 751 return o.ApplyT(func(v *Domain) DomainLogPublishingOptionArrayOutput { return v.LogPublishingOptions }).(DomainLogPublishingOptionArrayOutput) 752 } 753 754 // Configuration block for node-to-node encryption options. Detailed below. 755 func (o DomainOutput) NodeToNodeEncryption() DomainNodeToNodeEncryptionOutput { 756 return o.ApplyT(func(v *Domain) DomainNodeToNodeEncryptionOutput { return v.NodeToNodeEncryption }).(DomainNodeToNodeEncryptionOutput) 757 } 758 759 // Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running Elasticsearch 5.3 and later, Amazon ES takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions of Elasticsearch, Amazon ES takes daily automated snapshots. 760 func (o DomainOutput) SnapshotOptions() DomainSnapshotOptionsPtrOutput { 761 return o.ApplyT(func(v *Domain) DomainSnapshotOptionsPtrOutput { return v.SnapshotOptions }).(DomainSnapshotOptionsPtrOutput) 762 } 763 764 // 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 DomainOutput) Tags() pulumi.StringMapOutput { 766 return o.ApplyT(func(v *Domain) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 767 } 768 769 // 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 DomainOutput) TagsAll() pulumi.StringMapOutput { 773 return o.ApplyT(func(v *Domain) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 774 } 775 776 // Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-vpc-limitations)). Detailed below. 777 func (o DomainOutput) VpcOptions() DomainVpcOptionsPtrOutput { 778 return o.ApplyT(func(v *Domain) DomainVpcOptionsPtrOutput { return v.VpcOptions }).(DomainVpcOptionsPtrOutput) 779 } 780 781 type DomainArrayOutput struct{ *pulumi.OutputState } 782 783 func (DomainArrayOutput) ElementType() reflect.Type { 784 return reflect.TypeOf((*[]*Domain)(nil)).Elem() 785 } 786 787 func (o DomainArrayOutput) ToDomainArrayOutput() DomainArrayOutput { 788 return o 789 } 790 791 func (o DomainArrayOutput) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput { 792 return o 793 } 794 795 func (o DomainArrayOutput) Index(i pulumi.IntInput) DomainOutput { 796 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Domain { 797 return vs[0].([]*Domain)[vs[1].(int)] 798 }).(DomainOutput) 799 } 800 801 type DomainMapOutput struct{ *pulumi.OutputState } 802 803 func (DomainMapOutput) ElementType() reflect.Type { 804 return reflect.TypeOf((*map[string]*Domain)(nil)).Elem() 805 } 806 807 func (o DomainMapOutput) ToDomainMapOutput() DomainMapOutput { 808 return o 809 } 810 811 func (o DomainMapOutput) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput { 812 return o 813 } 814 815 func (o DomainMapOutput) MapIndex(k pulumi.StringInput) DomainOutput { 816 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Domain { 817 return vs[0].(map[string]*Domain)[vs[1].(string)] 818 }).(DomainOutput) 819 } 820 821 func init() { 822 pulumi.RegisterInputType(reflect.TypeOf((*DomainInput)(nil)).Elem(), &Domain{}) 823 pulumi.RegisterInputType(reflect.TypeOf((*DomainArrayInput)(nil)).Elem(), DomainArray{}) 824 pulumi.RegisterInputType(reflect.TypeOf((*DomainMapInput)(nil)).Elem(), DomainMap{}) 825 pulumi.RegisterOutputType(DomainOutput{}) 826 pulumi.RegisterOutputType(DomainArrayOutput{}) 827 pulumi.RegisterOutputType(DomainMapOutput{}) 828 }