Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
81549d8
Initialize feat/update_terraform_module_template
VishwajitNagulkar Nov 12, 2024
064e651
updated code
Nov 13, 2024
dd4fe04
updated code
Nov 13, 2024
5dcdd53
updated code
rakeshclouddevops Nov 14, 2024
2c6c534
updated code
Nov 14, 2024
254e93f
updated code
Nov 14, 2024
0d7d1e7
update tf version
rakeshclouddevops Nov 14, 2024
13f4de0
updated description
rakeshclouddevops Nov 14, 2024
260011f
update tfchecks
rakeshclouddevops Nov 14, 2024
bdc72dd
test
rakeshclouddevops Nov 14, 2024
9be2349
updated code
Nov 14, 2024
bea2cc6
Merged master into feat/amazon-mq and resolved conflicts
Nov 14, 2024
1451c98
Fix Terraform formatting
Nov 14, 2024
ade0dfa
updated sg
Nov 14, 2024
f5e44f5
updated sg
Nov 14, 2024
708b9b7
updated sg
Nov 14, 2024
478e000
updated sg
Nov 14, 2024
cd2d60a
updated sg
Nov 14, 2024
dff32c2
updated sg
Nov 14, 2024
2619a15
updated sg
Nov 14, 2024
e187b34
ran fmt
Nov 14, 2024
7accb46
fix: added public_inbound_acl in public subnet
Nov 14, 2024
4ad3a24
fix: added private_inbound_acl in public subnet
Nov 14, 2024
a0f4fda
RUN: terraform fmt
Nov 14, 2024
0bd8fac
change: rule action in inbound
Nov 14, 2024
2bc5953
change: remove acl rules from public subnet
Nov 14, 2024
bec1348
change: change the cidr block in inblound rules
Nov 14, 2024
861c709
change: make changes in inblound rules
Nov 14, 2024
97c3239
fix: indentation
Nov 14, 2024
23007b0
fix: change the cidr_block in acl rule in public subnet
Nov 14, 2024
965721c
fix: remove duplicate example directory
Nov 14, 2024
9557c19
feat: updated readme configuration
VishwajitNagulkar Nov 14, 2024
7b2098e
update: add logic for setup hardcoded secrets in main module
Nov 14, 2024
1241264
Merge branch 'feat/amazon-mq' of https://github.com/clouddrove/terraf…
Nov 14, 2024
57fcabc
update: add lifecycle to control how resourese created and destroyed …
Nov 14, 2024
2ce4986
remove: remove tf-checks.yml from the github workflow
Nov 14, 2024
5cfd01b
Feat: updated trigger
VishwajitNagulkar Nov 15, 2024
df63802
fix: test the code that hardcoded user name pass are used if set secr…
Nov 15, 2024
ae80db4
Merge branch 'feat/amazon-mq-testing' of https://github.com/clouddrov…
Nov 15, 2024
5e6d24b
fix: Resolved merge conflicts between feat/amazon-mq-testing and master
Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: 'Create README.md file'
on:

# push:

# push:

# branches:
# - master
# paths-ignore:
Expand Down
14 changes: 13 additions & 1 deletion examples/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ variable "maintenance_day_of_week" {
default = "Sunday" # Example default value, modify based on your need
}

variable "use_hardcoded_values" {
description = "Flag to decide whether to use hardcoded credentials or not."
type = bool
default = true # Set to `true` if you want hardcoded values to be used by default
}



# Declare variable for use_aws_owned_key
variable "use_aws_owned_key" {
description = "Boolean flag to use AWS owned KMS key for MQ encryption."
Expand Down Expand Up @@ -244,7 +252,11 @@ variable "cloudwatch_log_retention_days" {
variable "use_secrets_manager" {
description = "Flag to determine if Secrets Manager should be used for storing passwords."
type = bool
default = true # Default to true, to use Secrets Manager

default = false # Default to true, to use Secrets Manager

# default = true # Default to true, to use Secrets Manager

}

variable "secret_manager_key_prefix" {
Expand Down
9 changes: 5 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

# Call the Clouddrove KMS module to create the KMS key if enabled
module "kms" {

Check warning on line 30 in main.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

module "kms" should specify a version
source = "clouddrove/kms/aws"
enabled = var.kms_key_enabled
description = "KMS key for MQ"
Expand Down Expand Up @@ -119,7 +119,6 @@
# Fallback to SSM if not using Secrets Manager
resource "aws_ssm_parameter" "mq_master_username_ssm" {
count = var.mq_admin_user != "" && !var.use_secrets_manager ? 1 : 0

name = format("%s%s",
replace(trimspace(var.ssm_path), "/$", ""),
var.mq_admin_user_ssm_parameter_name
Expand All @@ -139,7 +138,6 @@

resource "aws_ssm_parameter" "mq_master_password_ssm" {
count = var.mq_admin_password != "" && !var.use_secrets_manager ? 1 : 0

name = "kms-alias"
value = var.mq_admin_password != "" ? var.mq_admin_password : "default_password"
description = "MQ Password for the admin user"
Expand Down Expand Up @@ -206,8 +204,8 @@
resource "aws_mq_broker" "default" {
count = var.mq_broker_name != "" ? 1 : 0
broker_name = var.mq_broker_name
deployment_mode = var.deployment_mode

Check failure on line 207 in main.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

"" is an invalid value as deployment_mode
engine_type = var.engine_type

Check failure on line 208 in main.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

engine_type is not a valid value
engine_version = var.engine_version
host_instance_type = var.host_instance_type
auto_minor_version_upgrade = var.auto_minor_version_upgrade
Expand Down Expand Up @@ -267,11 +265,14 @@
console_access = var.console_access
}
}

lifecycle {
prevent_destroy = false
create_before_destroy = true
ignore_changes = [value]
}

depends_on = [aws_ssm_parameter.mq_application_username_ssm, aws_ssm_parameter.mq_master_username_ssm]
depends_on = [
aws_ssm_parameter.mq_application_username_ssm,
aws_ssm_parameter.mq_master_username_ssm
]
}
12 changes: 10 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}

# The name of the broker
variable "broker_name" {

Check warning on line 18 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "broker_name" is declared but not used
description = "The name of the broker."
type = string
default = ""
Expand Down Expand Up @@ -85,7 +85,7 @@
}

# Subnet CIDR block for the broker
variable "subnet_cidr_block" {

Check warning on line 88 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "subnet_cidr_block" is declared but not used
description = "CIDR block for the subnet."
type = string
default = ""
Expand All @@ -99,7 +99,7 @@
}

# Port for STOMP SSL
variable "stomp_ssl_port" {

Check warning on line 102 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "stomp_ssl_port" is declared but not used
description = "Port for STOMP SSL."
type = number
default = 0
Expand Down Expand Up @@ -196,7 +196,7 @@
}

# VPC ID for the broker
variable "vpc_id" {

Check warning on line 199 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "vpc_id" is declared but not used
description = "The ID of the VPC to create the broker in."
type = string
default = ""
Expand Down Expand Up @@ -273,14 +273,14 @@
}

# Flag to use AWS owned KMS CMK for MQ encryption
variable "use_aws_owned_key" {

Check warning on line 276 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "use_aws_owned_key" is declared but not used
description = "Boolean to enable an AWS owned Key Management Service (KMS) Customer Master Key (CMK) for Amazon MQ encryption."
type = bool
default = false
}

# List of allowed TCP ports for ingress traffic
variable "allowed_ingress_ports" {

Check warning on line 283 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "allowed_ingress_ports" is declared but not used
description = "List of TCP ports to allow access to in the created security group."
type = list(number)
default = []
Expand All @@ -293,7 +293,7 @@
}

# List of additional security group IDs to associate with the broker
variable "additional_security_group_ids" {

Check warning on line 296 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "additional_security_group_ids" is declared but not used
description = "List of additional security group IDs to associate with the broker."
type = list(string)
default = []
Expand Down Expand Up @@ -349,7 +349,7 @@
}

# Variable for the Customer Master Key (CMK) spec (e.g., ECC, RSA, etc.)
variable "customer_master_key_spec" {

Check warning on line 352 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "customer_master_key_spec" is declared but not used
description = "The customer master key (CMK) spec for KMS key."
type = string
default = "SYMMETRIC_DEFAULT"
Expand Down Expand Up @@ -377,7 +377,7 @@
}

# Variable for the description of the KMS key
variable "description" {

Check warning on line 380 in variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "description" is declared but not used
description = "Description of the KMS key."
type = string
default = "Default KMS Key"
Expand Down Expand Up @@ -418,7 +418,11 @@
variable "use_secrets_manager" {
description = "Flag to determine if Secrets Manager should be used for storing passwords."
type = bool
default = true # Set to true if you want to use Secrets Manager

default = false # Set to true if you want to use Secrets Manager

# default = true # Set to true if you want to use Secrets Manager

}

variable "secret_manager_key_prefix" {
Expand Down Expand Up @@ -454,5 +458,9 @@
variable "use_hardcoded_values" {
description = "Flag to decide whether to use hardcoded credentials or not."
type = bool
default = false # Set to `true` if you want hardcoded values to be used by default

default = true # Set to `true` if you want hardcoded values to be used by default

# default = false # Set to `true` if you want hardcoded values to be used by default

}
Loading