Skip to content

Commit e6f52e7

Browse files
authored
Add iot_endpoint variable for DR setups (#31)
Signed-off-by: peterdeme <[email protected]>
1 parent 269238f commit e6f52e7

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ locals {
55
mqtt_port = var.mqtt_broker_endpoint != null ? tonumber(split(":", var.mqtt_broker_endpoint)[2]) : 0
66

77
mqtt_broker_type = var.mqtt_broker_type
8-
mqtt_broker_endpoint = var.mqtt_broker_type == "iotcore" ? data.aws_iot_endpoint.iot[0].endpoint_address : var.mqtt_broker_endpoint
8+
mqtt_broker_endpoint = var.mqtt_broker_type == "iotcore" ? coalesce(var.iot_endpoint, data.aws_iot_endpoint.iot[0].endpoint_address) : var.mqtt_broker_endpoint
99

1010
sqs_queues = var.sqs_queues != null ? {
1111
deadletter = data.aws_sqs_queue.deadletter[0].arn

modules/ecs/iam_submodule.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "iam_roles_and_policies" {
2-
source = "github.com/spacelift-io/terraform-aws-iam-spacelift-selfhosted?ref=v1.2.1"
2+
source = "github.com/spacelift-io/terraform-aws-iam-spacelift-selfhosted?ref=v1.2.2"
33

44
write_as_files = false
55
aws_partition = var.aws_partition

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,12 @@ variable "sqs_queues" {
400400
default = null
401401
}
402402

403+
variable "iot_endpoint" {
404+
type = string
405+
description = "The endpoint of the IoT Core service. This only needs to be specified if not using the default endpoint but a custom DNS name."
406+
default = null
407+
}
408+
403409
variable "mqtt_broker_type" {
404410
type = string
405411
description = "The type of MQTT broker to use. Can be 'builtin' or 'iotcore'."

0 commit comments

Comments
 (0)