-
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.
Merge pull request #1 from RohitSquareops/main
updated module structure, review and tested
- Loading branch information
Showing
9 changed files
with
132 additions
and
133 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 |
---|---|---|
|
@@ -91,4 +91,3 @@ rule "terraform_standard_module_structure" { | |
rule "terraform_workspace_remote" { | ||
enabled = 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 |
---|---|---|
|
@@ -75,4 +75,4 @@ The Policy required is: | |
|
||
|
||
``` | ||
<!-- END OF PRE-COMMIT-PIKE DOCS HOOK --> | ||
<!-- END OF PRE-COMMIT-PIKE DOCS HOOK --> |
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,3 +1,13 @@ | ||
## RabbitMQ Example | ||
![squareops_avatar] | ||
|
||
[squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png | ||
|
||
### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey. | ||
<br> | ||
|
||
This example will be very useful for users who are new to a module and want to quickly learn how to use it. By reviewing the examples, users can gain a better understanding of how the module works, what features it supports, and how to customize it to their specific needs. | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
|
@@ -14,7 +24,7 @@ No providers. | |
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_rabbitmq"></a> [rabbitmq](#module\_rabbitmq) | ../../ | n/a | | ||
| <a name="module_rabbitmq_broker"></a> [rabbitmq\_broker](#module\_rabbitmq\_broker) | [email protected]:sq-ia/terraform-aws-rabbitmq.git | n/a | | ||
|
||
## Resources | ||
|
||
|
@@ -28,8 +38,10 @@ No inputs. | |
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_broker-arn"></a> [broker-arn](#output\_broker-arn) | ARN of the RabbitMQ broker. | | ||
| <a name="output_broker-console_url"></a> [broker-console\_url](#output\_broker-console\_url) | The URL of the broker's RabbitMQ Web Console | | ||
| <a name="output_broker-endpoint"></a> [broker-endpoint](#output\_broker-endpoint) | Broker's wire-level protocol endpoint | | ||
| <a name="output_broker-id"></a> [broker-id](#output\_broker-id) | ID of the RabbitMQ broker. | | ||
| <a name="output_broker-arn"></a> [broker-arn](#output\_broker-arn) | The Amazon Resource Name (ARN) of the RabbitMQ broker. | | ||
| <a name="output_broker-console_url"></a> [broker-console\_url](#output\_broker-console\_url) | The URL of the RabbitMQ Web Console for managing the broker. | | ||
| <a name="output_broker-endpoint"></a> [broker-endpoint](#output\_broker-endpoint) | The wire-level protocol endpoint of the RabbitMQ broker. | | ||
| <a name="output_broker-id"></a> [broker-id](#output\_broker-id) | The unique identifier of the RabbitMQ broker. | | ||
| <a name="output_rabbitmq_password"></a> [rabbitmq\_password](#output\_rabbitmq\_password) | The password for accessing the RabbitMQ cluster. Note that Terraform does not track this password after initial creation. | | ||
| <a name="output_security_group"></a> [security\_group](#output\_security\_group) | The security group ID associated with the RabbitMQ cluster. | | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
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,28 +1,30 @@ | ||
locals { | ||
name = "skaf" | ||
region = "us-east-2" | ||
environment = "production" | ||
name = "skaf" | ||
region = "us-east-1" | ||
environment = "production" | ||
engine_version = "3.10.20" | ||
host_instance_type = "mq.m5.large" | ||
vpc_id = "vpc-069a755f3a7" | ||
subnet_ids = ["subnet-0bb23128ab"] | ||
kms_key_arn = "arn:aws:kms:us-east-1:2222222222:key/bcfdc1c5-241e467d90" | ||
allowed_security_groups = ["sg-0e8d8b08e40"] | ||
} | ||
|
||
module "rabbitmq_broker" { | ||
source = "../../" | ||
environment = local.environment | ||
name = local.name | ||
engine_type = "RabbitMQ" | ||
engine_version = "3.8.23" | ||
storage_type = "ebs" | ||
host_instance_type = "mq.m5.large" | ||
authentication_strategy = "simple" | ||
deployment_mode = "SINGLE_INSTANCE" | ||
apply_immediately = true | ||
auto_minor_version_upgrade = false | ||
publicly_accessible = false | ||
vpc_id = "vpc-xyz5ed733e273skaf" | ||
subnet_ids = ["subnet-xyz35ec60335fskaf"] | ||
allowed_cidr_blocks = [] | ||
allowed_security_groups = ["sg-xyzf8bdc01fd9skaf"] | ||
port = 5671 | ||
username = "admin" | ||
source = "[email protected]:sq-ia/terraform-aws-rabbitmq.git" | ||
name = local.name | ||
username = "admin" | ||
storage_type = "ebs" | ||
engine_version = local.engine_version | ||
host_instance_type = local.host_instance_type | ||
environment = local.environment | ||
vpc_id = local.vpc_id | ||
subnet_ids = local.subnet_ids | ||
deployment_mode = "SINGLE_INSTANCE" | ||
apply_immediately = true | ||
publicly_accessible = false | ||
authentication_strategy = "simple" | ||
allowed_security_groups = local.allowed_security_groups | ||
maintenance_window_start_time = { | ||
day_of_week = "SUNDAY" | ||
time_of_day = "00:30" | ||
|
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,30 +1,30 @@ | ||
output "broker-arn" { | ||
description = "ARN of the RabbitMQ broker." | ||
description = "The Amazon Resource Name (ARN) of the RabbitMQ broker." | ||
value = module.rabbitmq_broker.rabbitmq_broker_arn | ||
} | ||
|
||
output "broker-id" { | ||
description = "ID of the RabbitMQ broker." | ||
description = "The unique identifier of the RabbitMQ broker." | ||
value = module.rabbitmq_broker.rabbitmq_broker_id | ||
} | ||
|
||
output "broker-console_url" { | ||
description = "The URL of the broker's RabbitMQ Web Console" | ||
description = "The URL of the RabbitMQ Web Console for managing the broker." | ||
value = module.rabbitmq_broker.rabbitmq_broker_console_url | ||
} | ||
|
||
output "broker-endpoint" { | ||
description = "Broker's wire-level protocol endpoint" | ||
description = "The wire-level protocol endpoint of the RabbitMQ broker." | ||
value = module.rabbitmq_broker.rabbitmq_broker_endpoint | ||
} | ||
|
||
output "security_group" { | ||
description = "The security group ID of the cluster" | ||
description = "The security group ID associated with the RabbitMQ cluster." | ||
value = module.rabbitmq_broker.rabbitmq_security_group | ||
} | ||
|
||
output "rabbitmq_password" { | ||
description = "The Rabbitmq password (this password may be old, because Terraform doesn't track it after initial creation)" | ||
description = "The password for accessing the RabbitMQ cluster. Note that Terraform does not track this password after initial creation." | ||
value = module.rabbitmq_broker.rabbitmq_password | ||
|
||
} |
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,30 +1,30 @@ | ||
output "rabbitmq_broker_arn" { | ||
description = "ARN of the RabbitMQ broker." | ||
description = "The Amazon Resource Name (ARN) of the RabbitMQ broker." | ||
value = aws_mq_broker.amazonmq.arn | ||
} | ||
|
||
output "rabbitmq_broker_id" { | ||
description = "ID of the RabbitMQ broker." | ||
description = "The unique identifier of the RabbitMQ broker." | ||
value = aws_mq_broker.amazonmq.id | ||
} | ||
|
||
output "rabbitmq_broker_console_url" { | ||
description = "The URL of the broker's RabbitMQ Web Console" | ||
description = "The URL of the RabbitMQ Web Console for managing the broker." | ||
value = aws_mq_broker.amazonmq.instances[0].console_url | ||
} | ||
|
||
output "rabbitmq_broker_endpoint" { | ||
description = "Broker's wire-level protocol endpoint" | ||
description = "The wire-level protocol endpoint of the RabbitMQ broker." | ||
value = aws_mq_broker.amazonmq.instances[0].endpoints | ||
} | ||
|
||
|
||
output "rabbitmq_security_group" { | ||
description = "The security group ID of the cluster" | ||
description = "The security group ID associated with the RabbitMQ cluster." | ||
value = module.security_group_mq.security_group_id | ||
} | ||
|
||
output "rabbitmq_password" { | ||
description = "The Rabbitmq password (this password may be old, because Terraform doesn't track it after initial creation)" | ||
description = "The password for accessing the RabbitMQ cluster. Note that Terraform does not track this password after initial creation." | ||
value = nonsensitive(random_password.password.result) | ||
} |
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