Hi,
I have built out all my architecture and it is breaking when I try run mwaa with terraform on Localstack pro. I have followed the guidelines in creating a mwaa environment with no vpn according to this github link (GitHub - claudiobizzotto/aws-mwaa-terraform: AWS MWAA Quick Start With Terraform.). I get the error
Put “ht://api.localhost:4566/environments/spark-app-demo-mwaa-environment-dev”: dial tcp: lookup api.localhost: no such host
Please assist me in solving this or should I be using the aws-mwaa-local-runner as a docker container seperately?
I have created an endpoint in my main.tf for mwaa with the localhost:4566:
The module for the mwaa looks like below:
locals {
common_tags = {
Terraform = true
Environment = "${var.environment}"
Project = "${var.project}"
Region = "${var.region}"
}
}
###had a circular dependency so need to add this here
resource "aws_mwaa_environment" "mwaa_environment" {
source_bucket_arn = "${var.airflow_s3_bucket_arn}"
dag_s3_path = "dags"
#requirements_s3_path = "${var.requirements_s3_path}" #dont need to use this as the requirments is not set by default
execution_role_arn = "${var.airflow_iam_role}"
name = "${var.name}-${var.project}-mwaa-environment-${var.environment}"
min_workers = 1
max_workers = "${var.mwaa_max_workers}"
#vpc_id = "${var.vpc_id}"
#private_subnet_ids = "${var.airflow_mwaa_subnets}" #dont need this
#changing to work with public airflow URL
webserver_access_mode = "PUBLIC_ONLY"
network_configuration {
security_group_ids = [var.emr_mwaa_security_group]
subnet_ids = var.private_subnets_ids #$"{var.mwaa_subnets}" need this as they
}
#airflow example shows empty configuration for this
#network_configuration{
#
#}
logging_configuration {
dag_processing_logs {
enabled = true
log_level = "INFO"
}
scheduler_logs {
enabled = true
log_level = "INFO"
}
task_logs {
enabled = true
log_level = "INFO"
}
webserver_logs {
enabled = true
log_level = "INFO"
}
worker_logs {
enabled = true
log_level = "INFO"
}
}
tags = merge(
local.common_tags,
{
"Name" = "${var.name}-${var.project}-mwaa-environment-${var.environment}"
}
)
}
All my variables are there.