tryretool / terraform-retool-modules

MIT License
23 stars 40 forks source link

Incorrect/outdated documentation for required vars #44

Open crrobinson14 opened 6 months ago

crrobinson14 commented 6 months ago

The documentation for this module at https://docs.retool.com/self-hosted/quickstarts/ecs-fargate/terraform provides a sample code block but it doesn't appear to be valid. For instance, subnet_ids is marked as a required field, and is listed in the documentation. But using this module, private_subnet_ids and public_subnet_ids are also marked required, but are not referred to in the documentation. I can take a guess at what private_subnet_ids and public_subnet_ids should be, but their presence makes the function of subnet_ids unclear.

Can you please provide a known-working config example here? Other settings like aws_ecs_capacity_provider_name are unclear because they're marked required but are not required fields in ECS itself, so it's not clear whether this module will only work with one made.

chorsnell commented 3 weeks ago

it looks like you just need to replace:

subnet_ids = []

with:

  public_subnet_ids = [
      "public-subnet-1",
      "public-subnet-2"
  ]
  private_subnet_ids = [
      "private-subnet-1",
      "private-subnet-1"
  ]

then make sure you have a default provider in the main.tf

provider "aws" {
  region = "us-west-1"
  profile = "default"
  shared_config_files      = ["~/.aws/config"]
  shared_credentials_files = ["~/.aws/credentials"]
}