Skip to content

Incorrect variable values being passed to modules #42

Closed

Description

@btromanova

Expected behavior

Module is planned with variable values defined in the module config

Actual behavior

Module is planned with some variable values defined for the current module and some for the next one

Steps to reproduce

astro.yaml

---

terraform:
      version: 0.11.7

modules:
  - name: bar 
    path: ./bar
    remote:
      backend: local
      backend_config:
        path: /tmp/terraform-tests/bar-{{.environment}}.tfstate
    variables:
      - name: environment
        values: [dev, staging, prod]

  - name: foo 
    path: ./foo
    remote:
      backend: local
      backend_config:
        path: /tmp/terraform-tests/foo-{{.environment}}.tfstate
    variables:
      - name: environment
        values: [mgmt]

foo/terraform.tf

terraform {
  backend "local" {}
}

resource "null_resource" "foo" {}

bar/terraform.tf

terraform {
  backend "local" {}
}

resource "null_resource" "bar" {}

astro plan

foo-mgmt: OK Changes (0s)

  + null_resource.foo
      id: <computed>


bar-mgmt: OK Changes (0s)

  + null_resource.bar
      id: <computed>


bar-dev: OK Changes (0s)

  + null_resource.bar
      id: <computed>


bar-prod: OK Changes (0s)

  + null_resource.bar
      id: <computed>


Done

bar-mgmt is planned instead of bar-staging in the plan above.

Activity

  1. added a commit that references this issue on Sep 24, 2019
    1c1f98c
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