This is an automated email from the ASF dual-hosted git repository.

sunnianjun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git


The following commit(s) were added to refs/heads/main by this push:
     new d136f5a  chore(docs): update terraform modules structure for aws, and 
update (#163)
d136f5a is described below

commit d136f5a4ab515545196c15eb8e172c7edad448c5
Author: pierce <[email protected]>
AuthorDate: Fri Dec 30 09:49:31 2022 +0800

    chore(docs): update terraform modules structure for aws, and update (#163)
    
    docs
    
    Signed-off-by: xuanyuan300 <[email protected]>
    
    Signed-off-by: xuanyuan300 <[email protected]>
---
 terraform/amazon/README.md                         |  6 +--
 terraform/amazon/main.tf                           |  4 +-
 terraform/amazon/modules/shardingsphere/README.md  | 63 ++++++++++++++++++++++
 .../{ => modules}/shardingsphere/cloud-init.yml    |  0
 .../shardingsphere/cloudwatch-agent.json           |  0
 .../amazon/{ => modules}/shardingsphere/main.tf    |  0
 .../amazon/{ => modules}/shardingsphere/outputs.tf |  0
 .../{ => modules}/shardingsphere/variables.tf      |  0
 terraform/amazon/modules/zk/README.md              | 52 ++++++++++++++++++
 terraform/amazon/{ => modules}/zk/cloud-init.yml   |  0
 terraform/amazon/{ => modules}/zk/main.tf          |  0
 terraform/amazon/{ => modules}/zk/outputs.tf       |  0
 terraform/amazon/{ => modules}/zk/variables.tf     |  0
 13 files changed, 120 insertions(+), 5 deletions(-)

diff --git a/terraform/amazon/README.md b/terraform/amazon/README.md
index 4f901db..916aa97 100644
--- a/terraform/amazon/README.md
+++ b/terraform/amazon/README.md
@@ -1,4 +1,4 @@
-# Apache ShardingSphere Terraform Module
+# Terraform Module for Apache ShardingSphere-Proxy Cluster
 A terraform module to create an Apache ShardingSphere Proxy Cluster on AWS.
 
 Terraform will create a cluster with the following architecture:
@@ -33,7 +33,7 @@ provider "aws" {
 }
 
 module "zk" {
-  source              = "./zk"
+  source              = "./modules/zk"
   cluster_size        = 3
   key_name            = "test-tf"
   instance_type       = "t2.nano"
@@ -44,7 +44,7 @@ module "zk" {
 
 module "shardingsphere" {
   depends_on             = [module.zk]
-  source                 = "./shardingsphere"
+  source                 = "./modules/shardingsphere"
   cluster_size           = 3
   shardingsphere_version = "5.2.1"
   key_name               = "test-tf"
diff --git a/terraform/amazon/main.tf b/terraform/amazon/main.tf
index 5b51a90..16bf3c9 100644
--- a/terraform/amazon/main.tf
+++ b/terraform/amazon/main.tf
@@ -30,7 +30,7 @@ provider "aws" {
 }
 
 module "zk" {
-  source              = "./zk"
+  source              = "./modules/zk"
   cluster_size        = 3
   key_name            = "test-tf"
   instance_type       = "t2.nano"
@@ -41,7 +41,7 @@ module "zk" {
 
 module "shardingsphere" {
   depends_on                    = [module.zk]
-  source                        = "./shardingsphere"
+  source                        = "./modules/shardingsphere"
   cluster_size                  = 3
   shardingsphere_proxy_version  = "5.2.1"
   key_name                      = "test-tf"
diff --git a/terraform/amazon/modules/shardingsphere/README.md 
b/terraform/amazon/modules/shardingsphere/README.md
new file mode 100644
index 0000000..6b85a4a
--- /dev/null
+++ b/terraform/amazon/modules/shardingsphere/README.md
@@ -0,0 +1,63 @@
+# Terraform Module for Apache ShardingSphere-Proxy Cluster
+
+## Requirements
+| Name | Version |
+|------|---------|
+| <a name="requirement_aws"></a> [aws](#requirement\_aws) | 4.37.0 |
+
+
+## Providers
+
+| Name | Version |
+|------|---------|
+| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.37.0 |
+
+## Modules
+
+No modules.
+
+## Resources
+
+| Name | Type |
+|------|------|
+| 
[aws_autoscaling_attachment.asg_attachment_lb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_attachment)
 | resource |
+| 
[aws_autoscaling_group.ss](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group)
 | resource |
+| 
[aws_iam_instance_profile.ss](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile)
 | resource |
+| 
[aws_iam_role.sts](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role)
 | resource |
+| 
[aws_iam_role_policy.ss](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy)
 | resource |
+| 
[aws_launch_template.ss](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template)
 | resource |
+| 
[aws_lb.ss](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb)
 | resource |
+| 
[aws_lb_listener.ss](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener)
 | resource |
+| 
[aws_lb_target_group.ss_tg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group)
 | resource |
+| 
[aws_network_interface.ss](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_interface)
 | resource |
+| 
[aws_route53_record.ss](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record)
 | resource |
+| 
[aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones)
 | data source |
+| 
[aws_route53_zone.zone](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone)
 | data source |
+| 
[aws_vpc.vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc)
 | data source |
+
+## Inputs
+
+| Name | Description | Type | Default | Required |
+|------|-------------|------|---------|:--------:|
+| <a name="input_cluster_size"></a> [cluster\_size](#input\_cluster\_size) | 
The cluster size that same size as available\_zones | `number` | n/a | yes |
+| <a name="input_hosted_zone_name"></a> 
[hosted\_zone\_name](#input\_hosted\_zone\_name) | The name of the hosted 
private zone | `string` | `"shardingsphere.org"` | no |
+| <a name="input_image_id"></a> [image\_id](#input\_image\_id) | The AMI id | 
`string` | n/a | yes |
+| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) 
| The EC2 instance type | `string` | n/a | yes |
+| <a name="input_key_name"></a> [key\_name](#input\_key\_name) | the ssh 
keypair for remote connection | `string` | n/a | yes |
+| <a name="input_lb_listener_port"></a> 
[lb\_listener\_port](#input\_lb\_listener\_port) | lb listener port | `string` 
| n/a | yes |
+| <a name="input_security_groups"></a> 
[security\_groups](#input\_security\_groups) | List of The Security group IDs | 
`list(string)` | `[]` | no |
+| <a name="input_shardingsphere_proxy_asg_desired_capacity"></a> 
[shardingsphere\_proxy\_asg\_desired\_capacity](#input\_shardingsphere\_proxy\_asg\_desired\_capacity)
 | The desired capacity is the initial capacity of the Auto Scaling group at 
the time of its creation and the capacity it attempts to maintain. see 
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacitytype,
 The default value is 3 | `string` | `"3"` | no |
+| <a name="input_shardingsphere_proxy_asg_healthcheck_grace_period"></a> 
[shardingsphere\_proxy\_asg\_healthcheck\_grace\_period](#input\_shardingsphere\_proxy\_asg\_healthcheck\_grace\_period)
 | The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before 
checking the health status of an EC2 instance that has come into service and 
marking it unhealthy due to a failed health check. see 
https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html
 | `nu [...]
+| <a name="input_shardingsphere_proxy_asg_max_size"></a> 
[shardingsphere\_proxy\_asg\_max\_size](#input\_shardingsphere\_proxy\_asg\_max\_size)
 | The maximum size of ShardingSphere Proxy Auto Scaling Group. The default 
values is 6 | `string` | `"6"` | no |
+| <a name="input_shardingsphere_proxy_version"></a> 
[shardingsphere\_proxy\_version](#input\_shardingsphere\_proxy\_version) | The 
shardingsphere proxy version | `string` | n/a | yes |
+| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | List of 
subnets sorted by availability zone in your VPC | `list(string)` | n/a | yes |
+| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The id of your VPC 
| `string` | n/a | yes |
+| <a name="input_zk_servers"></a> [zk\_servers](#input\_zk\_servers) | The 
Zookeeper servers | `list(string)` | n/a | yes |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| <a name="output_shardingsphere_domain"></a> 
[shardingsphere\_domain](#output\_shardingsphere\_domain) | The domain name of 
the ShardingSphere Proxy Cluster for use by other services |
+
+
diff --git a/terraform/amazon/shardingsphere/cloud-init.yml 
b/terraform/amazon/modules/shardingsphere/cloud-init.yml
similarity index 100%
rename from terraform/amazon/shardingsphere/cloud-init.yml
rename to terraform/amazon/modules/shardingsphere/cloud-init.yml
diff --git a/terraform/amazon/shardingsphere/cloudwatch-agent.json 
b/terraform/amazon/modules/shardingsphere/cloudwatch-agent.json
similarity index 100%
rename from terraform/amazon/shardingsphere/cloudwatch-agent.json
rename to terraform/amazon/modules/shardingsphere/cloudwatch-agent.json
diff --git a/terraform/amazon/shardingsphere/main.tf 
b/terraform/amazon/modules/shardingsphere/main.tf
similarity index 100%
rename from terraform/amazon/shardingsphere/main.tf
rename to terraform/amazon/modules/shardingsphere/main.tf
diff --git a/terraform/amazon/shardingsphere/outputs.tf 
b/terraform/amazon/modules/shardingsphere/outputs.tf
similarity index 100%
rename from terraform/amazon/shardingsphere/outputs.tf
rename to terraform/amazon/modules/shardingsphere/outputs.tf
diff --git a/terraform/amazon/shardingsphere/variables.tf 
b/terraform/amazon/modules/shardingsphere/variables.tf
similarity index 100%
rename from terraform/amazon/shardingsphere/variables.tf
rename to terraform/amazon/modules/shardingsphere/variables.tf
diff --git a/terraform/amazon/modules/zk/README.md 
b/terraform/amazon/modules/zk/README.md
new file mode 100644
index 0000000..a06de0d
--- /dev/null
+++ b/terraform/amazon/modules/zk/README.md
@@ -0,0 +1,52 @@
+# Terraform Module for ZooKeeper Cluster
+
+## Requirements
+
+## Requirements
+| Name | Version |
+|------|---------|
+| <a name="requirement_aws"></a> [aws](#requirement\_aws) | 4.37.0 |
+
+
+## Providers
+
+| Name | Version |
+|------|---------|
+| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.37.0 |
+
+## Modules
+
+No modules.
+
+## Resources
+
+| Name | Type |
+|------|------|
+| 
[aws_instance.zk](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance)
 | resource |
+| 
[aws_network_interface.zk](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_interface)
 | resource |
+| 
[aws_route53_record.zk](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record)
 | resource |
+| 
[aws_ami.base](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami)
 | data source |
+| 
[aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones)
 | data source |
+| 
[aws_route53_zone.zone](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone)
 | data source |
+
+## Inputs
+
+| Name | Description | Type | Default | Required |
+|------|-------------|------|---------|:--------:|
+| <a name="input_cluster_size"></a> [cluster\_size](#input\_cluster\_size) | 
The cluster size that same size as available\_zones | `number` | n/a | yes |
+| <a name="input_hosted_zone_name"></a> 
[hosted\_zone\_name](#input\_hosted\_zone\_name) | The name of the hosted 
private zone | `string` | `"shardingsphere.org"` | no |
+| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) 
| The EC2 instance type | `string` | n/a | yes |
+| <a name="input_key_name"></a> [key\_name](#input\_key\_name) | The ssh 
keypair for remote connection | `string` | n/a | yes |
+| <a name="input_security_groups"></a> 
[security\_groups](#input\_security\_groups) | List of the Security Group, it 
must be allow access 2181, 2888, 3888 port | `list(string)` | `[]` | no |
+| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | List of 
subnets sorted by availability zone in your VPC | `list(string)` | n/a | yes |
+| <a name="input_tags"></a> [tags](#input\_tags) | A map of zk instance 
resource, the default tag is Name=zk-${count.idx} | `map(any)` | `{}` | no |
+| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The id of VPC | 
`string` | n/a | yes |
+| <a name="input_zk_config"></a> [zk\_config](#input\_zk\_config) | The 
default config of zookeeper server | `map` | <pre>{<br>  "client_port": 
2181,<br>  "zk_heap": 1024<br>}</pre> | no |
+| <a name="input_zk_version"></a> [zk\_version](#input\_zk\_version) | The 
zookeeper version | `string` | `"3.7.1"` | no |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| <a name="output_zk_node_domain"></a> 
[zk\_node\_domain](#output\_zk\_node\_domain) | The private domain names of 
zookeeper instances for use by ShardingSphere Proxy |
+| <a name="output_zk_node_private_ip"></a> 
[zk\_node\_private\_ip](#output\_zk\_node\_private\_ip) | The private ips of 
zookeeper instances |
diff --git a/terraform/amazon/zk/cloud-init.yml 
b/terraform/amazon/modules/zk/cloud-init.yml
similarity index 100%
rename from terraform/amazon/zk/cloud-init.yml
rename to terraform/amazon/modules/zk/cloud-init.yml
diff --git a/terraform/amazon/zk/main.tf b/terraform/amazon/modules/zk/main.tf
similarity index 100%
rename from terraform/amazon/zk/main.tf
rename to terraform/amazon/modules/zk/main.tf
diff --git a/terraform/amazon/zk/outputs.tf 
b/terraform/amazon/modules/zk/outputs.tf
similarity index 100%
rename from terraform/amazon/zk/outputs.tf
rename to terraform/amazon/modules/zk/outputs.tf
diff --git a/terraform/amazon/zk/variables.tf 
b/terraform/amazon/modules/zk/variables.tf
similarity index 100%
rename from terraform/amazon/zk/variables.tf
rename to terraform/amazon/modules/zk/variables.tf

Reply via email to