Testing - passing input variables to a module

Found the answer here: How do I pass provider information to tests?

run "default_location" {
  command = plan

  module {
      source = "../../module/resource"
    }

    variables {
      # Module Input variables
      environment  =  "sand"
      costCentre = "123456"
      application = "myapp"
      resourceName = "rg-sand-myapp"
    }

  assert { .....
1 Like