Skip to content

Instantly share code, notes, and snippets.

@mhmdio
Created July 28, 2021 13:02
Show Gist options
  • Save mhmdio/c2f8e7671bf43dadfd41d0e0d35d22d4 to your computer and use it in GitHub Desktop.
Save mhmdio/c2f8e7671bf43dadfd41d0e0d35d22d4 to your computer and use it in GitHub Desktop.
terraform cloudformation stack
resource "aws_cloudformation_stack" "mq01" {
name = "${var.name}-mq01"
tags = var.tags
disable_rollback = false
template_body = file("${path.module}/cfn/mq.yaml")
parameters = {
AmazonMQBrokerName = "${var.name}-mq01"
AmazonMQHostInstanceType = "mq.t3.micro"
AmazonMQBrokerUser = "Admin"
AmazonMQBrokerPassword = random_password.password.result
AmazonMQSecurityGroup = module.rabbitmq_sg.this_security_group_id
AmazonMQSubnet = data.aws_subnet.private_a.id
}
lifecycle { # keep it stable for No changes. Infrastructure is up-to-date.
ignore_changes = [
parameters,
outputs
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment