-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* (feat) fix bug opensearch * (docs) change example
- Loading branch information
1 parent
83dc32c
commit d214837
Showing
14 changed files
with
151 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Change Log | ||
|
||
All notable changes to this module will be documented in this file. | ||
|
||
## [1.0.0] - 2022-09-08 | ||
|
||
### Added | ||
|
||
- init terraform-aws-opensearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_vpc"></a> [vpc](#module\_vpc) | git@github.com:oozou/terraform-aws-vpc.git | v1.1.6 | | ||
| <a name="module_vpn"></a> [vpn](#module\_vpn) | ../../ | n/a | | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
No inputs. | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_dns"></a> [dns](#output\_dns) | n/a | | ||
| <a name="output_efs_id"></a> [efs\_id](#output\_efs\_id) | n/a | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module "acm" { | ||
source = "oozou/acm/aws" | ||
version = "1.0.4" | ||
|
||
acms_domain_name = { | ||
opensearch = { | ||
domain_name = "opensearch.example.com" | ||
} | ||
} | ||
route53_zone_name = "example.com" | ||
is_automatic_verify_acms = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module "opensearch" { | ||
source = "../../" | ||
cluster_name = "opensearch" | ||
is_custom_endpoint_enabled = true | ||
cluster_domain = "example.com" # route53 hostzone domain | ||
cluster_version = "OpenSearch_1.1" | ||
subnets_ids = module.vpc.private_subnet_ids | ||
vpc_id = module.vpc.vpc_id | ||
prefix = "oozou" | ||
environment = "dev" | ||
hot_instance_count = 3 | ||
availability_zones = 3 | ||
is_master_instance_enabled = false | ||
is_warm_instance_enabled = false | ||
master_user_name = "admin" | ||
master_user_password = "AdminOpenSearchExample1@" #must be sensitive value | ||
acm_arn = module.acm.certificate_arns.opensearch | ||
bootstrap_config = { | ||
vpc_id = module.vpc.vpc_id | ||
subnet_id = module.vpc.private_subnet_ids[0] | ||
} | ||
additional_iam_roles = [] | ||
tags = var.tags | ||
depends_on = [ | ||
module.acm | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
output "custom_domain_endpoint" { | ||
description = "custom domain for opensearch" | ||
value = module.opensearch.custom_domain_endpoint | ||
} | ||
|
||
output "endpoint" { | ||
description = "endpoint for opensearch" | ||
value = module.opensearch.endpoint | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
variable "prefix" { | ||
description = "The prefix name of customer to be displayed in AWS console and resource" | ||
type = string | ||
} | ||
|
||
variable "environment" { | ||
description = "Environment Variable used as a prefix" | ||
type = string | ||
} | ||
|
||
variable "tags" { | ||
description = "Tags to add more; default tags contian {terraform=true, environment=var.environment}" | ||
type = map(string) | ||
default = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
terraform { | ||
required_version = ">= 1.0" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 4.9" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module "vpc" { | ||
source = "oozou/vpc/aws" | ||
version = "1.1.7" | ||
prefix = var.prefix | ||
environment = var.environment | ||
cidr = "10.105.0.0/16" | ||
private_subnets = ["10.105.60.0/22", "10.105.64.0/22", "10.105.68.0/22"] | ||
public_subnets = ["10.105.0.0/24", "10.105.1.0/24", "10.105.2.0/24"] | ||
database_subnets = ["10.105.20.0/23", "10.105.22.0/23", "10.105.24.0/23"] | ||
availability_zone = ["ap-southeast-1a", "ap-southeast-1b", "ap-southeast-1c"] | ||
is_enable_dns_hostnames = true | ||
is_enable_dns_support = true | ||
is_create_nat_gateway = true | ||
is_enable_single_nat_gateway = true | ||
account_mode = "hub" | ||
tags = var.tags | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
output "domain" { | ||
output "custom_domain_endpoint" { | ||
description = "custom domain for opensearch" | ||
value = format("%s.%s", var.cluster_name, data.aws_route53_zone.opensearch.name) | ||
value = format("%s.%s", var.cluster_name, var.cluster_domain) | ||
} | ||
|
||
output "endpoint" { | ||
description = "endpoint for opensearch" | ||
value = aws_opensearch_domain.this.endpoint | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ terraform { | |
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 4.0.0" | ||
version = ">= 4.9.0" | ||
} | ||
} | ||
} |