Skip to content

Don't pass variables into modules that don't declare them #39

Closed

Description

@btromanova

If I have the following astro config

---

modules:
  - name: foo
    path: ./foo 
    remote:
      backend: local
      backend_config:
        path: /tmp/terraform-tests/foo.tfstate

  - name: bar
    path: ./bar
    remote:
      backend: local
      backend_config:
        path: /tmp/terraform-tests/bar.tfstate
    variables:
      - name: region

and run astro plan --region us-west-1 I'll get an error in Terraform 0.12 saying Error: Value for undeclared variable, because region variables will be passed to the foo module that doesn't declare it.

This is related to hashicorp/terraform#19424. Passing undeclared variables through -var arguments is no longer allowed in Terraform 0.12.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions