github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/opensearch/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 opensearch
     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 Amazon OpenSearch Domain.
    15  //
    16  // ## Elasticsearch vs. OpenSearch
    17  //
    18  // Amazon OpenSearch Service is the successor to Amazon Elasticsearch Service and supports OpenSearch and legacy Elasticsearch OSS (up to 7.10, the final open source version of the software).
    19  //
    20  // OpenSearch Domain configurations are similar in many ways to Elasticsearch Domain configurations. However, there are important differences including these:
    21  //
    22  // * OpenSearch has `engineVersion` while Elasticsearch has `elasticsearchVersion`
    23  // * Versions are specified differently - _e.g._, `Elasticsearch_7.10` with OpenSearch vs. `7.10` for Elasticsearch.
    24  // * `instanceType` argument values end in `search` for OpenSearch vs. `elasticsearch` for Elasticsearch (_e.g._, `t2.micro.search` vs. `t2.micro.elasticsearch`).
    25  // * The AWS-managed service-linked role for OpenSearch is called `AWSServiceRoleForAmazonOpenSearchService` instead of `AWSServiceRoleForAmazonElasticsearchService` for Elasticsearch.
    26  //
    27  // There are also some potentially unexpected similarities in configurations:
    28  //
    29  // * ARNs for both are prefaced with `arn:aws:es:`.
    30  // * Both OpenSearch and Elasticsearch use assume role policies that refer to the `Principal` `Service` as `es.amazonaws.com`.
    31  // * IAM policy actions, such as those you will find in `accessPolicies`, are prefaced with `es:` for both.
    32  //
    33  // ## Example Usage
    34  //
    35  // ### Basic Usage
    36  //
    37  // <!--Start PulumiCodeChooser -->
    38  // ```go
    39  // package main
    40  //
    41  // import (
    42  //
    43  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
    44  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    45  //
    46  // )
    47  //
    48  //	func main() {
    49  //		pulumi.Run(func(ctx *pulumi.Context) error {
    50  //			_, err := opensearch.NewDomain(ctx, "example", &opensearch.DomainArgs{
    51  //				DomainName:    pulumi.String("example"),
    52  //				EngineVersion: pulumi.String("Elasticsearch_7.10"),
    53  //				ClusterConfig: &opensearch.DomainClusterConfigArgs{
    54  //					InstanceType: pulumi.String("r4.large.search"),
    55  //				},
    56  //				Tags: pulumi.StringMap{
    57  //					"Domain": pulumi.String("TestDomain"),
    58  //				},
    59  //			})
    60  //			if err != nil {
    61  //				return err
    62  //			}
    63  //			return nil
    64  //		})
    65  //	}
    66  //
    67  // ```
    68  // <!--End PulumiCodeChooser -->
    69  //
    70  // ### Access Policy
    71  //
    72  // > See also: `opensearch.DomainPolicy` resource
    73  //
    74  // <!--Start PulumiCodeChooser -->
    75  // ```go
    76  // package main
    77  //
    78  // import (
    79  //
    80  //	"fmt"
    81  //
    82  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    83  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    84  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
    85  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    86  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    87  //
    88  // )
    89  //
    90  //	func main() {
    91  //		pulumi.Run(func(ctx *pulumi.Context) error {
    92  //			cfg := config.New(ctx, "")
    93  //			domain := "tf-test"
    94  //			if param := cfg.Get("domain"); param != "" {
    95  //				domain = param
    96  //			}
    97  //			current, err := aws.GetRegion(ctx, nil, nil)
    98  //			if err != nil {
    99  //				return err
   100  //			}
   101  //			currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)
   102  //			if err != nil {
   103  //				return err
   104  //			}
   105  //			example, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
   106  //				Statements: []iam.GetPolicyDocumentStatement{
   107  //					{
   108  //						Effect: pulumi.StringRef("Allow"),
   109  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
   110  //							{
   111  //								Type: "*",
   112  //								Identifiers: []string{
   113  //									"*",
   114  //								},
   115  //							},
   116  //						},
   117  //						Actions: []string{
   118  //							"es:*",
   119  //						},
   120  //						Resources: []string{
   121  //							fmt.Sprintf("arn:aws:es:%v:%v:domain/%v/*", current.Name, currentGetCallerIdentity.AccountId, domain),
   122  //						},
   123  //						Conditions: []iam.GetPolicyDocumentStatementCondition{
   124  //							{
   125  //								Test:     "IpAddress",
   126  //								Variable: "aws:SourceIp",
   127  //								Values: []string{
   128  //									"66.193.100.22/32",
   129  //								},
   130  //							},
   131  //						},
   132  //					},
   133  //				},
   134  //			}, nil)
   135  //			if err != nil {
   136  //				return err
   137  //			}
   138  //			_, err = opensearch.NewDomain(ctx, "example", &opensearch.DomainArgs{
   139  //				DomainName:     pulumi.String(domain),
   140  //				AccessPolicies: pulumi.String(example.Json),
   141  //			})
   142  //			if err != nil {
   143  //				return err
   144  //			}
   145  //			return nil
   146  //		})
   147  //	}
   148  //
   149  // ```
   150  // <!--End PulumiCodeChooser -->
   151  //
   152  // ### Log publishing to CloudWatch Logs
   153  //
   154  // <!--Start PulumiCodeChooser -->
   155  // ```go
   156  // package main
   157  //
   158  // import (
   159  //
   160  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
   161  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
   162  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
   163  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   164  //
   165  // )
   166  //
   167  //	func main() {
   168  //		pulumi.Run(func(ctx *pulumi.Context) error {
   169  //			exampleLogGroup, err := cloudwatch.NewLogGroup(ctx, "example", &cloudwatch.LogGroupArgs{
   170  //				Name: pulumi.String("example"),
   171  //			})
   172  //			if err != nil {
   173  //				return err
   174  //			}
   175  //			example, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
   176  //				Statements: []iam.GetPolicyDocumentStatement{
   177  //					{
   178  //						Effect: pulumi.StringRef("Allow"),
   179  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
   180  //							{
   181  //								Type: "Service",
   182  //								Identifiers: []string{
   183  //									"es.amazonaws.com",
   184  //								},
   185  //							},
   186  //						},
   187  //						Actions: []string{
   188  //							"logs:PutLogEvents",
   189  //							"logs:PutLogEventsBatch",
   190  //							"logs:CreateLogStream",
   191  //						},
   192  //						Resources: []string{
   193  //							"arn:aws:logs:*",
   194  //						},
   195  //					},
   196  //				},
   197  //			}, nil)
   198  //			if err != nil {
   199  //				return err
   200  //			}
   201  //			_, err = cloudwatch.NewLogResourcePolicy(ctx, "example", &cloudwatch.LogResourcePolicyArgs{
   202  //				PolicyName:     pulumi.String("example"),
   203  //				PolicyDocument: pulumi.String(example.Json),
   204  //			})
   205  //			if err != nil {
   206  //				return err
   207  //			}
   208  //			_, err = opensearch.NewDomain(ctx, "example", &opensearch.DomainArgs{
   209  //				LogPublishingOptions: opensearch.DomainLogPublishingOptionArray{
   210  //					&opensearch.DomainLogPublishingOptionArgs{
   211  //						CloudwatchLogGroupArn: exampleLogGroup.Arn,
   212  //						LogType:               pulumi.String("INDEX_SLOW_LOGS"),
   213  //					},
   214  //				},
   215  //			})
   216  //			if err != nil {
   217  //				return err
   218  //			}
   219  //			return nil
   220  //		})
   221  //	}
   222  //
   223  // ```
   224  // <!--End PulumiCodeChooser -->
   225  //
   226  // ### VPC based OpenSearch
   227  //
   228  // <!--Start PulumiCodeChooser -->
   229  // ```go
   230  // package main
   231  //
   232  // import (
   233  //
   234  //	"fmt"
   235  //
   236  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
   237  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
   238  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
   239  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
   240  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   241  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
   242  //
   243  // )
   244  // func main() {
   245  // pulumi.Run(func(ctx *pulumi.Context) error {
   246  // cfg := config.New(ctx, "")
   247  // vpc := cfg.RequireObject("vpc")
   248  // domain := "tf-test";
   249  // if param := cfg.Get("domain"); param != ""{
   250  // domain = param
   251  // }
   252  // example, err := ec2.LookupVpc(ctx, &ec2.LookupVpcArgs{
   253  // Tags: interface{}{
   254  // Name: vpc,
   255  // },
   256  // }, nil);
   257  // if err != nil {
   258  // return err
   259  // }
   260  // exampleGetSubnets, err := ec2.GetSubnets(ctx, &ec2.GetSubnetsArgs{
   261  // Filters: []ec2.GetSubnetsFilter{
   262  // {
   263  // Name: "vpc-id",
   264  // Values: interface{}{
   265  // example.Id,
   266  // },
   267  // },
   268  // },
   269  // Tags: map[string]interface{}{
   270  // "Tier": "private",
   271  // },
   272  // }, nil);
   273  // if err != nil {
   274  // return err
   275  // }
   276  // current, err := aws.GetRegion(ctx, nil, nil);
   277  // if err != nil {
   278  // return err
   279  // }
   280  // currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil);
   281  // if err != nil {
   282  // return err
   283  // }
   284  // exampleSecurityGroup, err := ec2.NewSecurityGroup(ctx, "example", &ec2.SecurityGroupArgs{
   285  // Name: pulumi.String(fmt.Sprintf("%v-opensearch-%v", vpc, domain)),
   286  // Description: pulumi.String("Managed by Pulumi"),
   287  // VpcId: pulumi.String(example.Id),
   288  // Ingress: ec2.SecurityGroupIngressArray{
   289  // &ec2.SecurityGroupIngressArgs{
   290  // FromPort: pulumi.Int(443),
   291  // ToPort: pulumi.Int(443),
   292  // Protocol: pulumi.String("tcp"),
   293  // CidrBlocks: pulumi.StringArray{
   294  // pulumi.String(example.CidrBlock),
   295  // },
   296  // },
   297  // },
   298  // })
   299  // if err != nil {
   300  // return err
   301  // }
   302  // exampleServiceLinkedRole, err := iam.NewServiceLinkedRole(ctx, "example", &iam.ServiceLinkedRoleArgs{
   303  // AwsServiceName: pulumi.String("opensearchservice.amazonaws.com"),
   304  // })
   305  // if err != nil {
   306  // return err
   307  // }
   308  // exampleGetPolicyDocument, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
   309  // Statements: []iam.GetPolicyDocumentStatement{
   310  // {
   311  // Effect: pulumi.StringRef("Allow"),
   312  // Principals: []iam.GetPolicyDocumentStatementPrincipal{
   313  // {
   314  // Type: "*",
   315  // Identifiers: []string{
   316  // "*",
   317  // },
   318  // },
   319  // },
   320  // Actions: []string{
   321  // "es:*",
   322  // },
   323  // Resources: []string{
   324  // fmt.Sprintf("arn:aws:es:%v:%v:domain/%v/*", current.Name, currentGetCallerIdentity.AccountId, domain),
   325  // },
   326  // },
   327  // },
   328  // }, nil);
   329  // if err != nil {
   330  // return err
   331  // }
   332  // _, err = opensearch.NewDomain(ctx, "example", &opensearch.DomainArgs{
   333  // DomainName: pulumi.String(domain),
   334  // EngineVersion: pulumi.String("OpenSearch_1.0"),
   335  // ClusterConfig: &opensearch.DomainClusterConfigArgs{
   336  // InstanceType: pulumi.String("m4.large.search"),
   337  // ZoneAwarenessEnabled: pulumi.Bool(true),
   338  // },
   339  // VpcOptions: &opensearch.DomainVpcOptionsArgs{
   340  // SubnetIds: pulumi.StringArray{
   341  // pulumi.String(exampleGetSubnets.Ids[0]),
   342  // pulumi.String(exampleGetSubnets.Ids[1]),
   343  // },
   344  // SecurityGroupIds: pulumi.StringArray{
   345  // exampleSecurityGroup.ID(),
   346  // },
   347  // },
   348  // AdvancedOptions: pulumi.StringMap{
   349  // "rest.action.multi.allow_explicit_index": pulumi.String("true"),
   350  // },
   351  // AccessPolicies: pulumi.String(exampleGetPolicyDocument.Json),
   352  // Tags: pulumi.StringMap{
   353  // "Domain": pulumi.String("TestDomain"),
   354  // },
   355  // }, pulumi.DependsOn([]pulumi.Resource{
   356  // exampleServiceLinkedRole,
   357  // }))
   358  // if err != nil {
   359  // return err
   360  // }
   361  // return nil
   362  // })
   363  // }
   364  // ```
   365  // <!--End PulumiCodeChooser -->
   366  //
   367  // ### Enabling fine-grained access control on an existing domain
   368  //
   369  // This example shows two configurations: one to create a domain without fine-grained access control and the second to modify the domain to enable fine-grained access control. For more information, see [Enabling fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html).
   370  //
   371  // ### First apply
   372  //
   373  // <!--Start PulumiCodeChooser -->
   374  // ```go
   375  // package main
   376  //
   377  // import (
   378  //
   379  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
   380  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   381  //
   382  // )
   383  //
   384  //	func main() {
   385  //		pulumi.Run(func(ctx *pulumi.Context) error {
   386  //			_, err := opensearch.NewDomain(ctx, "example", &opensearch.DomainArgs{
   387  //				DomainName:    pulumi.String("ggkitty"),
   388  //				EngineVersion: pulumi.String("Elasticsearch_7.1"),
   389  //				ClusterConfig: &opensearch.DomainClusterConfigArgs{
   390  //					InstanceType: pulumi.String("r5.large.search"),
   391  //				},
   392  //				AdvancedSecurityOptions: &opensearch.DomainAdvancedSecurityOptionsArgs{
   393  //					Enabled:                     pulumi.Bool(false),
   394  //					AnonymousAuthEnabled:        pulumi.Bool(true),
   395  //					InternalUserDatabaseEnabled: pulumi.Bool(true),
   396  //					MasterUserOptions: &opensearch.DomainAdvancedSecurityOptionsMasterUserOptionsArgs{
   397  //						MasterUserName:     pulumi.String("example"),
   398  //						MasterUserPassword: pulumi.String("Barbarbarbar1!"),
   399  //					},
   400  //				},
   401  //				EncryptAtRest: &opensearch.DomainEncryptAtRestArgs{
   402  //					Enabled: pulumi.Bool(true),
   403  //				},
   404  //				DomainEndpointOptions: &opensearch.DomainDomainEndpointOptionsArgs{
   405  //					EnforceHttps:      pulumi.Bool(true),
   406  //					TlsSecurityPolicy: pulumi.String("Policy-Min-TLS-1-2-2019-07"),
   407  //				},
   408  //				NodeToNodeEncryption: &opensearch.DomainNodeToNodeEncryptionArgs{
   409  //					Enabled: pulumi.Bool(true),
   410  //				},
   411  //				EbsOptions: &opensearch.DomainEbsOptionsArgs{
   412  //					EbsEnabled: pulumi.Bool(true),
   413  //					VolumeSize: pulumi.Int(10),
   414  //				},
   415  //			})
   416  //			if err != nil {
   417  //				return err
   418  //			}
   419  //			return nil
   420  //		})
   421  //	}
   422  //
   423  // ```
   424  // <!--End PulumiCodeChooser -->
   425  //
   426  // ### Second apply
   427  //
   428  // Notice that the only change is `advanced_security_options.0.enabled` is now set to `true`.
   429  //
   430  // <!--Start PulumiCodeChooser -->
   431  // ```go
   432  // package main
   433  //
   434  // import (
   435  //
   436  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
   437  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   438  //
   439  // )
   440  //
   441  //	func main() {
   442  //		pulumi.Run(func(ctx *pulumi.Context) error {
   443  //			_, err := opensearch.NewDomain(ctx, "example", &opensearch.DomainArgs{
   444  //				DomainName:    pulumi.String("ggkitty"),
   445  //				EngineVersion: pulumi.String("Elasticsearch_7.1"),
   446  //				ClusterConfig: &opensearch.DomainClusterConfigArgs{
   447  //					InstanceType: pulumi.String("r5.large.search"),
   448  //				},
   449  //				AdvancedSecurityOptions: &opensearch.DomainAdvancedSecurityOptionsArgs{
   450  //					Enabled:                     pulumi.Bool(true),
   451  //					AnonymousAuthEnabled:        pulumi.Bool(true),
   452  //					InternalUserDatabaseEnabled: pulumi.Bool(true),
   453  //					MasterUserOptions: &opensearch.DomainAdvancedSecurityOptionsMasterUserOptionsArgs{
   454  //						MasterUserName:     pulumi.String("example"),
   455  //						MasterUserPassword: pulumi.String("Barbarbarbar1!"),
   456  //					},
   457  //				},
   458  //				EncryptAtRest: &opensearch.DomainEncryptAtRestArgs{
   459  //					Enabled: pulumi.Bool(true),
   460  //				},
   461  //				DomainEndpointOptions: &opensearch.DomainDomainEndpointOptionsArgs{
   462  //					EnforceHttps:      pulumi.Bool(true),
   463  //					TlsSecurityPolicy: pulumi.String("Policy-Min-TLS-1-2-2019-07"),
   464  //				},
   465  //				NodeToNodeEncryption: &opensearch.DomainNodeToNodeEncryptionArgs{
   466  //					Enabled: pulumi.Bool(true),
   467  //				},
   468  //				EbsOptions: &opensearch.DomainEbsOptionsArgs{
   469  //					EbsEnabled: pulumi.Bool(true),
   470  //					VolumeSize: pulumi.Int(10),
   471  //				},
   472  //			})
   473  //			if err != nil {
   474  //				return err
   475  //			}
   476  //			return nil
   477  //		})
   478  //	}
   479  //
   480  // ```
   481  // <!--End PulumiCodeChooser -->
   482  //
   483  // ## Import
   484  //
   485  // Using `pulumi import`, import OpenSearch domains using the `domain_name`. For example:
   486  //
   487  // ```sh
   488  // $ pulumi import aws:opensearch/domain:Domain example domain_name
   489  // ```
   490  type Domain struct {
   491  	pulumi.CustomResourceState
   492  
   493  	// IAM policy document specifying the access policies for the domain.
   494  	AccessPolicies pulumi.StringOutput `pulumi:"accessPolicies"`
   495  	// 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 OpenSearch domain on every apply.
   496  	AdvancedOptions pulumi.StringMapOutput `pulumi:"advancedOptions"`
   497  	// Configuration block for [fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html). Detailed below.
   498  	AdvancedSecurityOptions DomainAdvancedSecurityOptionsOutput `pulumi:"advancedSecurityOptions"`
   499  	// ARN of the domain.
   500  	Arn pulumi.StringOutput `pulumi:"arn"`
   501  	// Configuration block for the Auto-Tune options of the domain. Detailed below.
   502  	AutoTuneOptions DomainAutoTuneOptionsOutput `pulumi:"autoTuneOptions"`
   503  	// Configuration block for the cluster of the domain. Detailed below.
   504  	ClusterConfig DomainClusterConfigOutput `pulumi:"clusterConfig"`
   505  	// Configuration block for authenticating dashboard with Cognito. Detailed below.
   506  	CognitoOptions DomainCognitoOptionsPtrOutput `pulumi:"cognitoOptions"`
   507  	// Domain-specific endpoint for Dashboard without https scheme.
   508  	DashboardEndpoint pulumi.StringOutput `pulumi:"dashboardEndpoint"`
   509  	// Configuration block for domain endpoint HTTP(S) related options. Detailed below.
   510  	DomainEndpointOptions DomainDomainEndpointOptionsOutput `pulumi:"domainEndpointOptions"`
   511  	// Unique identifier for the domain.
   512  	DomainId pulumi.StringOutput `pulumi:"domainId"`
   513  	// Name of the domain.
   514  	//
   515  	// The following arguments are optional:
   516  	DomainName pulumi.StringOutput `pulumi:"domainName"`
   517  	// Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/opensearch-service/pricing/). Detailed below.
   518  	EbsOptions DomainEbsOptionsOutput `pulumi:"ebsOptions"`
   519  	// Configuration block for encrypt at rest options. Only available for [certain instance types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html). Detailed below.
   520  	EncryptAtRest DomainEncryptAtRestOutput `pulumi:"encryptAtRest"`
   521  	// Domain-specific endpoint used to submit index, search, and data upload requests.
   522  	Endpoint pulumi.StringOutput `pulumi:"endpoint"`
   523  	// Either `Elasticsearch_X.Y` or `OpenSearch_X.Y` to specify the engine version for the Amazon OpenSearch Service domain. For example, `OpenSearch_1.0` or `Elasticsearch_7.9`.
   524  	// See [Creating and managing Amazon OpenSearch Service domains](http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).
   525  	// Defaults to the lastest version of OpenSearch.
   526  	EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
   527  	// (**Deprecated**) Domain-specific endpoint for kibana without https scheme. Use the `dashboardEndpoint` attribute instead.
   528  	//
   529  	// Deprecated: use 'dashboard_endpoint' attribute instead
   530  	KibanaEndpoint pulumi.StringOutput `pulumi:"kibanaEndpoint"`
   531  	// 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.
   532  	LogPublishingOptions DomainLogPublishingOptionArrayOutput `pulumi:"logPublishingOptions"`
   533  	// Configuration block for node-to-node encryption options. Detailed below.
   534  	NodeToNodeEncryption DomainNodeToNodeEncryptionOutput `pulumi:"nodeToNodeEncryption"`
   535  	// Configuration to add Off Peak update options. ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html)). Detailed below.
   536  	OffPeakWindowOptions DomainOffPeakWindowOptionsOutput `pulumi:"offPeakWindowOptions"`
   537  	// Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running OpenSearch 5.3 and later, Amazon OpenSearch takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions, OpenSearch takes daily automated snapshots.
   538  	SnapshotOptions DomainSnapshotOptionsPtrOutput `pulumi:"snapshotOptions"`
   539  	// Software update options for the domain. Detailed below.
   540  	SoftwareUpdateOptions DomainSoftwareUpdateOptionsOutput `pulumi:"softwareUpdateOptions"`
   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 pulumi.StringMapOutput `pulumi:"tags"`
   543  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   544  	//
   545  	// Deprecated: Please use `tags` instead.
   546  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   547  	// Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html)). Detailed below.
   548  	VpcOptions DomainVpcOptionsPtrOutput `pulumi:"vpcOptions"`
   549  }
   550  
   551  // NewDomain registers a new resource with the given unique name, arguments, and options.
   552  func NewDomain(ctx *pulumi.Context,
   553  	name string, args *DomainArgs, opts ...pulumi.ResourceOption) (*Domain, error) {
   554  	if args == nil {
   555  		args = &DomainArgs{}
   556  	}
   557  
   558  	opts = internal.PkgResourceDefaultOpts(opts)
   559  	var resource Domain
   560  	err := ctx.RegisterResource("aws:opensearch/domain:Domain", name, args, &resource, opts...)
   561  	if err != nil {
   562  		return nil, err
   563  	}
   564  	return &resource, nil
   565  }
   566  
   567  // GetDomain gets an existing Domain resource's state with the given name, ID, and optional
   568  // state properties that are used to uniquely qualify the lookup (nil if not required).
   569  func GetDomain(ctx *pulumi.Context,
   570  	name string, id pulumi.IDInput, state *DomainState, opts ...pulumi.ResourceOption) (*Domain, error) {
   571  	var resource Domain
   572  	err := ctx.ReadResource("aws:opensearch/domain:Domain", name, id, state, &resource, opts...)
   573  	if err != nil {
   574  		return nil, err
   575  	}
   576  	return &resource, nil
   577  }
   578  
   579  // Input properties used for looking up and filtering Domain resources.
   580  type domainState struct {
   581  	// IAM policy document specifying the access policies for the domain.
   582  	AccessPolicies *string `pulumi:"accessPolicies"`
   583  	// 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 OpenSearch domain on every apply.
   584  	AdvancedOptions map[string]string `pulumi:"advancedOptions"`
   585  	// Configuration block for [fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html). Detailed below.
   586  	AdvancedSecurityOptions *DomainAdvancedSecurityOptions `pulumi:"advancedSecurityOptions"`
   587  	// ARN of the domain.
   588  	Arn *string `pulumi:"arn"`
   589  	// Configuration block for the Auto-Tune options of the domain. Detailed below.
   590  	AutoTuneOptions *DomainAutoTuneOptions `pulumi:"autoTuneOptions"`
   591  	// Configuration block for the cluster of the domain. Detailed below.
   592  	ClusterConfig *DomainClusterConfig `pulumi:"clusterConfig"`
   593  	// Configuration block for authenticating dashboard with Cognito. Detailed below.
   594  	CognitoOptions *DomainCognitoOptions `pulumi:"cognitoOptions"`
   595  	// Domain-specific endpoint for Dashboard without https scheme.
   596  	DashboardEndpoint *string `pulumi:"dashboardEndpoint"`
   597  	// Configuration block for domain endpoint HTTP(S) related options. Detailed below.
   598  	DomainEndpointOptions *DomainDomainEndpointOptions `pulumi:"domainEndpointOptions"`
   599  	// Unique identifier for the domain.
   600  	DomainId *string `pulumi:"domainId"`
   601  	// Name of the domain.
   602  	//
   603  	// The following arguments are optional:
   604  	DomainName *string `pulumi:"domainName"`
   605  	// Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/opensearch-service/pricing/). Detailed below.
   606  	EbsOptions *DomainEbsOptions `pulumi:"ebsOptions"`
   607  	// Configuration block for encrypt at rest options. Only available for [certain instance types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html). Detailed below.
   608  	EncryptAtRest *DomainEncryptAtRest `pulumi:"encryptAtRest"`
   609  	// Domain-specific endpoint used to submit index, search, and data upload requests.
   610  	Endpoint *string `pulumi:"endpoint"`
   611  	// Either `Elasticsearch_X.Y` or `OpenSearch_X.Y` to specify the engine version for the Amazon OpenSearch Service domain. For example, `OpenSearch_1.0` or `Elasticsearch_7.9`.
   612  	// See [Creating and managing Amazon OpenSearch Service domains](http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).
   613  	// Defaults to the lastest version of OpenSearch.
   614  	EngineVersion *string `pulumi:"engineVersion"`
   615  	// (**Deprecated**) Domain-specific endpoint for kibana without https scheme. Use the `dashboardEndpoint` attribute instead.
   616  	//
   617  	// Deprecated: use 'dashboard_endpoint' attribute instead
   618  	KibanaEndpoint *string `pulumi:"kibanaEndpoint"`
   619  	// 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.
   620  	LogPublishingOptions []DomainLogPublishingOption `pulumi:"logPublishingOptions"`
   621  	// Configuration block for node-to-node encryption options. Detailed below.
   622  	NodeToNodeEncryption *DomainNodeToNodeEncryption `pulumi:"nodeToNodeEncryption"`
   623  	// Configuration to add Off Peak update options. ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html)). Detailed below.
   624  	OffPeakWindowOptions *DomainOffPeakWindowOptions `pulumi:"offPeakWindowOptions"`
   625  	// Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running OpenSearch 5.3 and later, Amazon OpenSearch takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions, OpenSearch takes daily automated snapshots.
   626  	SnapshotOptions *DomainSnapshotOptions `pulumi:"snapshotOptions"`
   627  	// Software update options for the domain. Detailed below.
   628  	SoftwareUpdateOptions *DomainSoftwareUpdateOptions `pulumi:"softwareUpdateOptions"`
   629  	// 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.
   630  	Tags map[string]string `pulumi:"tags"`
   631  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   632  	//
   633  	// Deprecated: Please use `tags` instead.
   634  	TagsAll map[string]string `pulumi:"tagsAll"`
   635  	// Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html)). Detailed below.
   636  	VpcOptions *DomainVpcOptions `pulumi:"vpcOptions"`
   637  }
   638  
   639  type DomainState struct {
   640  	// IAM policy document specifying the access policies for the domain.
   641  	AccessPolicies pulumi.StringPtrInput
   642  	// 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 OpenSearch domain on every apply.
   643  	AdvancedOptions pulumi.StringMapInput
   644  	// Configuration block for [fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html). Detailed below.
   645  	AdvancedSecurityOptions DomainAdvancedSecurityOptionsPtrInput
   646  	// ARN of the domain.
   647  	Arn pulumi.StringPtrInput
   648  	// Configuration block for the Auto-Tune options of the domain. Detailed below.
   649  	AutoTuneOptions DomainAutoTuneOptionsPtrInput
   650  	// Configuration block for the cluster of the domain. Detailed below.
   651  	ClusterConfig DomainClusterConfigPtrInput
   652  	// Configuration block for authenticating dashboard with Cognito. Detailed below.
   653  	CognitoOptions DomainCognitoOptionsPtrInput
   654  	// Domain-specific endpoint for Dashboard without https scheme.
   655  	DashboardEndpoint pulumi.StringPtrInput
   656  	// Configuration block for domain endpoint HTTP(S) related options. Detailed below.
   657  	DomainEndpointOptions DomainDomainEndpointOptionsPtrInput
   658  	// Unique identifier for the domain.
   659  	DomainId pulumi.StringPtrInput
   660  	// Name of the domain.
   661  	//
   662  	// The following arguments are optional:
   663  	DomainName pulumi.StringPtrInput
   664  	// Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/opensearch-service/pricing/). Detailed below.
   665  	EbsOptions DomainEbsOptionsPtrInput
   666  	// Configuration block for encrypt at rest options. Only available for [certain instance types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html). Detailed below.
   667  	EncryptAtRest DomainEncryptAtRestPtrInput
   668  	// Domain-specific endpoint used to submit index, search, and data upload requests.
   669  	Endpoint pulumi.StringPtrInput
   670  	// Either `Elasticsearch_X.Y` or `OpenSearch_X.Y` to specify the engine version for the Amazon OpenSearch Service domain. For example, `OpenSearch_1.0` or `Elasticsearch_7.9`.
   671  	// See [Creating and managing Amazon OpenSearch Service domains](http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).
   672  	// Defaults to the lastest version of OpenSearch.
   673  	EngineVersion pulumi.StringPtrInput
   674  	// (**Deprecated**) Domain-specific endpoint for kibana without https scheme. Use the `dashboardEndpoint` attribute instead.
   675  	//
   676  	// Deprecated: use 'dashboard_endpoint' attribute instead
   677  	KibanaEndpoint pulumi.StringPtrInput
   678  	// 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.
   679  	LogPublishingOptions DomainLogPublishingOptionArrayInput
   680  	// Configuration block for node-to-node encryption options. Detailed below.
   681  	NodeToNodeEncryption DomainNodeToNodeEncryptionPtrInput
   682  	// Configuration to add Off Peak update options. ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html)). Detailed below.
   683  	OffPeakWindowOptions DomainOffPeakWindowOptionsPtrInput
   684  	// Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running OpenSearch 5.3 and later, Amazon OpenSearch takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions, OpenSearch takes daily automated snapshots.
   685  	SnapshotOptions DomainSnapshotOptionsPtrInput
   686  	// Software update options for the domain. Detailed below.
   687  	SoftwareUpdateOptions DomainSoftwareUpdateOptionsPtrInput
   688  	// 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.
   689  	Tags pulumi.StringMapInput
   690  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   691  	//
   692  	// Deprecated: Please use `tags` instead.
   693  	TagsAll pulumi.StringMapInput
   694  	// Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html)). Detailed below.
   695  	VpcOptions DomainVpcOptionsPtrInput
   696  }
   697  
   698  func (DomainState) ElementType() reflect.Type {
   699  	return reflect.TypeOf((*domainState)(nil)).Elem()
   700  }
   701  
   702  type domainArgs struct {
   703  	// IAM policy document specifying the access policies for the domain.
   704  	AccessPolicies *string `pulumi:"accessPolicies"`
   705  	// 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 OpenSearch domain on every apply.
   706  	AdvancedOptions map[string]string `pulumi:"advancedOptions"`
   707  	// Configuration block for [fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html). Detailed below.
   708  	AdvancedSecurityOptions *DomainAdvancedSecurityOptions `pulumi:"advancedSecurityOptions"`
   709  	// Configuration block for the Auto-Tune options of the domain. Detailed below.
   710  	AutoTuneOptions *DomainAutoTuneOptions `pulumi:"autoTuneOptions"`
   711  	// Configuration block for the cluster of the domain. Detailed below.
   712  	ClusterConfig *DomainClusterConfig `pulumi:"clusterConfig"`
   713  	// Configuration block for authenticating dashboard with Cognito. Detailed below.
   714  	CognitoOptions *DomainCognitoOptions `pulumi:"cognitoOptions"`
   715  	// Configuration block for domain endpoint HTTP(S) related options. Detailed below.
   716  	DomainEndpointOptions *DomainDomainEndpointOptions `pulumi:"domainEndpointOptions"`
   717  	// Name of the domain.
   718  	//
   719  	// The following arguments are optional:
   720  	DomainName *string `pulumi:"domainName"`
   721  	// Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/opensearch-service/pricing/). Detailed below.
   722  	EbsOptions *DomainEbsOptions `pulumi:"ebsOptions"`
   723  	// Configuration block for encrypt at rest options. Only available for [certain instance types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html). Detailed below.
   724  	EncryptAtRest *DomainEncryptAtRest `pulumi:"encryptAtRest"`
   725  	// Either `Elasticsearch_X.Y` or `OpenSearch_X.Y` to specify the engine version for the Amazon OpenSearch Service domain. For example, `OpenSearch_1.0` or `Elasticsearch_7.9`.
   726  	// See [Creating and managing Amazon OpenSearch Service domains](http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).
   727  	// Defaults to the lastest version of OpenSearch.
   728  	EngineVersion *string `pulumi:"engineVersion"`
   729  	// 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.
   730  	LogPublishingOptions []DomainLogPublishingOption `pulumi:"logPublishingOptions"`
   731  	// Configuration block for node-to-node encryption options. Detailed below.
   732  	NodeToNodeEncryption *DomainNodeToNodeEncryption `pulumi:"nodeToNodeEncryption"`
   733  	// Configuration to add Off Peak update options. ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html)). Detailed below.
   734  	OffPeakWindowOptions *DomainOffPeakWindowOptions `pulumi:"offPeakWindowOptions"`
   735  	// Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running OpenSearch 5.3 and later, Amazon OpenSearch takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions, OpenSearch takes daily automated snapshots.
   736  	SnapshotOptions *DomainSnapshotOptions `pulumi:"snapshotOptions"`
   737  	// Software update options for the domain. Detailed below.
   738  	SoftwareUpdateOptions *DomainSoftwareUpdateOptions `pulumi:"softwareUpdateOptions"`
   739  	// 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.
   740  	Tags map[string]string `pulumi:"tags"`
   741  	// Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html)). Detailed below.
   742  	VpcOptions *DomainVpcOptions `pulumi:"vpcOptions"`
   743  }
   744  
   745  // The set of arguments for constructing a Domain resource.
   746  type DomainArgs struct {
   747  	// IAM policy document specifying the access policies for the domain.
   748  	AccessPolicies pulumi.StringPtrInput
   749  	// 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 OpenSearch domain on every apply.
   750  	AdvancedOptions pulumi.StringMapInput
   751  	// Configuration block for [fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html). Detailed below.
   752  	AdvancedSecurityOptions DomainAdvancedSecurityOptionsPtrInput
   753  	// Configuration block for the Auto-Tune options of the domain. Detailed below.
   754  	AutoTuneOptions DomainAutoTuneOptionsPtrInput
   755  	// Configuration block for the cluster of the domain. Detailed below.
   756  	ClusterConfig DomainClusterConfigPtrInput
   757  	// Configuration block for authenticating dashboard with Cognito. Detailed below.
   758  	CognitoOptions DomainCognitoOptionsPtrInput
   759  	// Configuration block for domain endpoint HTTP(S) related options. Detailed below.
   760  	DomainEndpointOptions DomainDomainEndpointOptionsPtrInput
   761  	// Name of the domain.
   762  	//
   763  	// The following arguments are optional:
   764  	DomainName pulumi.StringPtrInput
   765  	// Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/opensearch-service/pricing/). Detailed below.
   766  	EbsOptions DomainEbsOptionsPtrInput
   767  	// Configuration block for encrypt at rest options. Only available for [certain instance types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html). Detailed below.
   768  	EncryptAtRest DomainEncryptAtRestPtrInput
   769  	// Either `Elasticsearch_X.Y` or `OpenSearch_X.Y` to specify the engine version for the Amazon OpenSearch Service domain. For example, `OpenSearch_1.0` or `Elasticsearch_7.9`.
   770  	// See [Creating and managing Amazon OpenSearch Service domains](http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).
   771  	// Defaults to the lastest version of OpenSearch.
   772  	EngineVersion pulumi.StringPtrInput
   773  	// 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.
   774  	LogPublishingOptions DomainLogPublishingOptionArrayInput
   775  	// Configuration block for node-to-node encryption options. Detailed below.
   776  	NodeToNodeEncryption DomainNodeToNodeEncryptionPtrInput
   777  	// Configuration to add Off Peak update options. ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html)). Detailed below.
   778  	OffPeakWindowOptions DomainOffPeakWindowOptionsPtrInput
   779  	// Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running OpenSearch 5.3 and later, Amazon OpenSearch takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions, OpenSearch takes daily automated snapshots.
   780  	SnapshotOptions DomainSnapshotOptionsPtrInput
   781  	// Software update options for the domain. Detailed below.
   782  	SoftwareUpdateOptions DomainSoftwareUpdateOptionsPtrInput
   783  	// 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.
   784  	Tags pulumi.StringMapInput
   785  	// Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html)). Detailed below.
   786  	VpcOptions DomainVpcOptionsPtrInput
   787  }
   788  
   789  func (DomainArgs) ElementType() reflect.Type {
   790  	return reflect.TypeOf((*domainArgs)(nil)).Elem()
   791  }
   792  
   793  type DomainInput interface {
   794  	pulumi.Input
   795  
   796  	ToDomainOutput() DomainOutput
   797  	ToDomainOutputWithContext(ctx context.Context) DomainOutput
   798  }
   799  
   800  func (*Domain) ElementType() reflect.Type {
   801  	return reflect.TypeOf((**Domain)(nil)).Elem()
   802  }
   803  
   804  func (i *Domain) ToDomainOutput() DomainOutput {
   805  	return i.ToDomainOutputWithContext(context.Background())
   806  }
   807  
   808  func (i *Domain) ToDomainOutputWithContext(ctx context.Context) DomainOutput {
   809  	return pulumi.ToOutputWithContext(ctx, i).(DomainOutput)
   810  }
   811  
   812  // DomainArrayInput is an input type that accepts DomainArray and DomainArrayOutput values.
   813  // You can construct a concrete instance of `DomainArrayInput` via:
   814  //
   815  //	DomainArray{ DomainArgs{...} }
   816  type DomainArrayInput interface {
   817  	pulumi.Input
   818  
   819  	ToDomainArrayOutput() DomainArrayOutput
   820  	ToDomainArrayOutputWithContext(context.Context) DomainArrayOutput
   821  }
   822  
   823  type DomainArray []DomainInput
   824  
   825  func (DomainArray) ElementType() reflect.Type {
   826  	return reflect.TypeOf((*[]*Domain)(nil)).Elem()
   827  }
   828  
   829  func (i DomainArray) ToDomainArrayOutput() DomainArrayOutput {
   830  	return i.ToDomainArrayOutputWithContext(context.Background())
   831  }
   832  
   833  func (i DomainArray) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput {
   834  	return pulumi.ToOutputWithContext(ctx, i).(DomainArrayOutput)
   835  }
   836  
   837  // DomainMapInput is an input type that accepts DomainMap and DomainMapOutput values.
   838  // You can construct a concrete instance of `DomainMapInput` via:
   839  //
   840  //	DomainMap{ "key": DomainArgs{...} }
   841  type DomainMapInput interface {
   842  	pulumi.Input
   843  
   844  	ToDomainMapOutput() DomainMapOutput
   845  	ToDomainMapOutputWithContext(context.Context) DomainMapOutput
   846  }
   847  
   848  type DomainMap map[string]DomainInput
   849  
   850  func (DomainMap) ElementType() reflect.Type {
   851  	return reflect.TypeOf((*map[string]*Domain)(nil)).Elem()
   852  }
   853  
   854  func (i DomainMap) ToDomainMapOutput() DomainMapOutput {
   855  	return i.ToDomainMapOutputWithContext(context.Background())
   856  }
   857  
   858  func (i DomainMap) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput {
   859  	return pulumi.ToOutputWithContext(ctx, i).(DomainMapOutput)
   860  }
   861  
   862  type DomainOutput struct{ *pulumi.OutputState }
   863  
   864  func (DomainOutput) ElementType() reflect.Type {
   865  	return reflect.TypeOf((**Domain)(nil)).Elem()
   866  }
   867  
   868  func (o DomainOutput) ToDomainOutput() DomainOutput {
   869  	return o
   870  }
   871  
   872  func (o DomainOutput) ToDomainOutputWithContext(ctx context.Context) DomainOutput {
   873  	return o
   874  }
   875  
   876  // IAM policy document specifying the access policies for the domain.
   877  func (o DomainOutput) AccessPolicies() pulumi.StringOutput {
   878  	return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.AccessPolicies }).(pulumi.StringOutput)
   879  }
   880  
   881  // 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 OpenSearch domain on every apply.
   882  func (o DomainOutput) AdvancedOptions() pulumi.StringMapOutput {
   883  	return o.ApplyT(func(v *Domain) pulumi.StringMapOutput { return v.AdvancedOptions }).(pulumi.StringMapOutput)
   884  }
   885  
   886  // Configuration block for [fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html). Detailed below.
   887  func (o DomainOutput) AdvancedSecurityOptions() DomainAdvancedSecurityOptionsOutput {
   888  	return o.ApplyT(func(v *Domain) DomainAdvancedSecurityOptionsOutput { return v.AdvancedSecurityOptions }).(DomainAdvancedSecurityOptionsOutput)
   889  }
   890  
   891  // ARN of the domain.
   892  func (o DomainOutput) Arn() pulumi.StringOutput {
   893  	return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   894  }
   895  
   896  // Configuration block for the Auto-Tune options of the domain. Detailed below.
   897  func (o DomainOutput) AutoTuneOptions() DomainAutoTuneOptionsOutput {
   898  	return o.ApplyT(func(v *Domain) DomainAutoTuneOptionsOutput { return v.AutoTuneOptions }).(DomainAutoTuneOptionsOutput)
   899  }
   900  
   901  // Configuration block for the cluster of the domain. Detailed below.
   902  func (o DomainOutput) ClusterConfig() DomainClusterConfigOutput {
   903  	return o.ApplyT(func(v *Domain) DomainClusterConfigOutput { return v.ClusterConfig }).(DomainClusterConfigOutput)
   904  }
   905  
   906  // Configuration block for authenticating dashboard with Cognito. Detailed below.
   907  func (o DomainOutput) CognitoOptions() DomainCognitoOptionsPtrOutput {
   908  	return o.ApplyT(func(v *Domain) DomainCognitoOptionsPtrOutput { return v.CognitoOptions }).(DomainCognitoOptionsPtrOutput)
   909  }
   910  
   911  // Domain-specific endpoint for Dashboard without https scheme.
   912  func (o DomainOutput) DashboardEndpoint() pulumi.StringOutput {
   913  	return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.DashboardEndpoint }).(pulumi.StringOutput)
   914  }
   915  
   916  // Configuration block for domain endpoint HTTP(S) related options. Detailed below.
   917  func (o DomainOutput) DomainEndpointOptions() DomainDomainEndpointOptionsOutput {
   918  	return o.ApplyT(func(v *Domain) DomainDomainEndpointOptionsOutput { return v.DomainEndpointOptions }).(DomainDomainEndpointOptionsOutput)
   919  }
   920  
   921  // Unique identifier for the domain.
   922  func (o DomainOutput) DomainId() pulumi.StringOutput {
   923  	return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.DomainId }).(pulumi.StringOutput)
   924  }
   925  
   926  // Name of the domain.
   927  //
   928  // The following arguments are optional:
   929  func (o DomainOutput) DomainName() pulumi.StringOutput {
   930  	return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput)
   931  }
   932  
   933  // Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/opensearch-service/pricing/). Detailed below.
   934  func (o DomainOutput) EbsOptions() DomainEbsOptionsOutput {
   935  	return o.ApplyT(func(v *Domain) DomainEbsOptionsOutput { return v.EbsOptions }).(DomainEbsOptionsOutput)
   936  }
   937  
   938  // Configuration block for encrypt at rest options. Only available for [certain instance types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html). Detailed below.
   939  func (o DomainOutput) EncryptAtRest() DomainEncryptAtRestOutput {
   940  	return o.ApplyT(func(v *Domain) DomainEncryptAtRestOutput { return v.EncryptAtRest }).(DomainEncryptAtRestOutput)
   941  }
   942  
   943  // Domain-specific endpoint used to submit index, search, and data upload requests.
   944  func (o DomainOutput) Endpoint() pulumi.StringOutput {
   945  	return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
   946  }
   947  
   948  // Either `Elasticsearch_X.Y` or `OpenSearch_X.Y` to specify the engine version for the Amazon OpenSearch Service domain. For example, `OpenSearch_1.0` or `Elasticsearch_7.9`.
   949  // See [Creating and managing Amazon OpenSearch Service domains](http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).
   950  // Defaults to the lastest version of OpenSearch.
   951  func (o DomainOutput) EngineVersion() pulumi.StringOutput {
   952  	return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput)
   953  }
   954  
   955  // (**Deprecated**) Domain-specific endpoint for kibana without https scheme. Use the `dashboardEndpoint` attribute instead.
   956  //
   957  // Deprecated: use 'dashboard_endpoint' attribute instead
   958  func (o DomainOutput) KibanaEndpoint() pulumi.StringOutput {
   959  	return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.KibanaEndpoint }).(pulumi.StringOutput)
   960  }
   961  
   962  // 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.
   963  func (o DomainOutput) LogPublishingOptions() DomainLogPublishingOptionArrayOutput {
   964  	return o.ApplyT(func(v *Domain) DomainLogPublishingOptionArrayOutput { return v.LogPublishingOptions }).(DomainLogPublishingOptionArrayOutput)
   965  }
   966  
   967  // Configuration block for node-to-node encryption options. Detailed below.
   968  func (o DomainOutput) NodeToNodeEncryption() DomainNodeToNodeEncryptionOutput {
   969  	return o.ApplyT(func(v *Domain) DomainNodeToNodeEncryptionOutput { return v.NodeToNodeEncryption }).(DomainNodeToNodeEncryptionOutput)
   970  }
   971  
   972  // Configuration to add Off Peak update options. ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html)). Detailed below.
   973  func (o DomainOutput) OffPeakWindowOptions() DomainOffPeakWindowOptionsOutput {
   974  	return o.ApplyT(func(v *Domain) DomainOffPeakWindowOptionsOutput { return v.OffPeakWindowOptions }).(DomainOffPeakWindowOptionsOutput)
   975  }
   976  
   977  // Configuration block for snapshot related options. Detailed below. DEPRECATED. For domains running OpenSearch 5.3 and later, Amazon OpenSearch takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions, OpenSearch takes daily automated snapshots.
   978  func (o DomainOutput) SnapshotOptions() DomainSnapshotOptionsPtrOutput {
   979  	return o.ApplyT(func(v *Domain) DomainSnapshotOptionsPtrOutput { return v.SnapshotOptions }).(DomainSnapshotOptionsPtrOutput)
   980  }
   981  
   982  // Software update options for the domain. Detailed below.
   983  func (o DomainOutput) SoftwareUpdateOptions() DomainSoftwareUpdateOptionsOutput {
   984  	return o.ApplyT(func(v *Domain) DomainSoftwareUpdateOptionsOutput { return v.SoftwareUpdateOptions }).(DomainSoftwareUpdateOptionsOutput)
   985  }
   986  
   987  // 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.
   988  func (o DomainOutput) Tags() pulumi.StringMapOutput {
   989  	return o.ApplyT(func(v *Domain) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   990  }
   991  
   992  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   993  //
   994  // Deprecated: Please use `tags` instead.
   995  func (o DomainOutput) TagsAll() pulumi.StringMapOutput {
   996  	return o.ApplyT(func(v *Domain) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   997  }
   998  
   999  // Configuration block for VPC related options. Adding or removing this configuration forces a new resource ([documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html)). Detailed below.
  1000  func (o DomainOutput) VpcOptions() DomainVpcOptionsPtrOutput {
  1001  	return o.ApplyT(func(v *Domain) DomainVpcOptionsPtrOutput { return v.VpcOptions }).(DomainVpcOptionsPtrOutput)
  1002  }
  1003  
  1004  type DomainArrayOutput struct{ *pulumi.OutputState }
  1005  
  1006  func (DomainArrayOutput) ElementType() reflect.Type {
  1007  	return reflect.TypeOf((*[]*Domain)(nil)).Elem()
  1008  }
  1009  
  1010  func (o DomainArrayOutput) ToDomainArrayOutput() DomainArrayOutput {
  1011  	return o
  1012  }
  1013  
  1014  func (o DomainArrayOutput) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput {
  1015  	return o
  1016  }
  1017  
  1018  func (o DomainArrayOutput) Index(i pulumi.IntInput) DomainOutput {
  1019  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Domain {
  1020  		return vs[0].([]*Domain)[vs[1].(int)]
  1021  	}).(DomainOutput)
  1022  }
  1023  
  1024  type DomainMapOutput struct{ *pulumi.OutputState }
  1025  
  1026  func (DomainMapOutput) ElementType() reflect.Type {
  1027  	return reflect.TypeOf((*map[string]*Domain)(nil)).Elem()
  1028  }
  1029  
  1030  func (o DomainMapOutput) ToDomainMapOutput() DomainMapOutput {
  1031  	return o
  1032  }
  1033  
  1034  func (o DomainMapOutput) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput {
  1035  	return o
  1036  }
  1037  
  1038  func (o DomainMapOutput) MapIndex(k pulumi.StringInput) DomainOutput {
  1039  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Domain {
  1040  		return vs[0].(map[string]*Domain)[vs[1].(string)]
  1041  	}).(DomainOutput)
  1042  }
  1043  
  1044  func init() {
  1045  	pulumi.RegisterInputType(reflect.TypeOf((*DomainInput)(nil)).Elem(), &Domain{})
  1046  	pulumi.RegisterInputType(reflect.TypeOf((*DomainArrayInput)(nil)).Elem(), DomainArray{})
  1047  	pulumi.RegisterInputType(reflect.TypeOf((*DomainMapInput)(nil)).Elem(), DomainMap{})
  1048  	pulumi.RegisterOutputType(DomainOutput{})
  1049  	pulumi.RegisterOutputType(DomainArrayOutput{})
  1050  	pulumi.RegisterOutputType(DomainMapOutput{})
  1051  }