outerbounds / terraform-aws-metaflow

Deploy production-grade Metaflow cloud infrastructure on AWS
https://registry.terraform.io/modules/outerbounds/metaflow/aws/latest
Apache License 2.0
56 stars 48 forks source link

METAFLOW_SERVICE_URL is empty in the metaflow_profile.json #53

Open aimran-adroll opened 1 year ago

aimran-adroll commented 1 year ago

I use this minimal terraform to spin up infra with an existing vpc. I set metadata_service_enable_api_gateway = false. Unfortunately, the resulting metaflow_profile.json file had METAFLOW_SERVICE_URL set to "".

Is this expected? The METAFLOW_SERVICE_INTERNAL_URL was filled with the internal nlb url so thats okay.

Not surprisingly, i could not communicate with the metadata service. To fix it I had to manually fill it in.


locals {
  subnet_ids = ["foo","bar"]
}

data "aws_vpc" "main" {
  tags = {
    Name = "my-super-precious-vpc"
  }
}

module "metaflow" {
  source = "outerbounds/metaflow/aws"
  version = "0.9.2"

  resource_prefix = "metaflow"
  resource_suffix = "random"

  enable_step_functions = true
  subnet1_id            = local.subnet_ids[0]
  subnet2_id            = local.subnet_ids[1]
  vpc_cidr_blocks       = [data.aws_vpc.main.cidr_block]
  vpc_id                = data.aws_vpc.main.id
  with_public_ip        = true

  metadata_service_enable_api_gateway = false
  batch_type = "fargate"

  tags = {}
}