Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform_remote_state is typecasting string to bool #9647

Closed
fmasuhr opened this issue Oct 27, 2016 · 2 comments
Closed

terraform_remote_state is typecasting string to bool #9647

fmasuhr opened this issue Oct 27, 2016 · 2 comments

Comments

@fmasuhr
Copy link

fmasuhr commented Oct 27, 2016

Terraform Version

v0.7.8

Affected Resource(s)

  • terraform_remote_state

Terraform Configuration Files

maint.tf:

data "terraform_remote_state" "remote" {
  backend = "local"
  config {
    path = "${path.module}/remote/terraform.tfstate"
  }
}

output "test" {
  value = "${data.terraform_remote_state.remote.foo["bar"]}"
}

./remote/terraform.tfstate:

{
    "version": 3,
    "terraform_version": "0.7.8",
    "serial": 1,
    "lineage": "",
    "modules": [
        {
            "path": [
                "root"
            ],
            "outputs": {
                "foo": {
                    "sensitive": false,
                    "type": "map",
                    "value": {
                        "bar": "true"
                    }
                }
            },
            "resources": {},
            "depends_on": []
        }
    ]
}

Expected Behavior

When running terraform apply i would expect the output test to be equal string true

Actual Behavior

When running terraform apply the output test is equal 1

Steps to Reproduce

run terraform apply for main.tf

@apparentlymart
Copy link
Contributor

Hi @fmasuhr! Sorry for this strange behavior.

I strongly suspect that this is the same issue as #13512. Although you got there first, I ended up digging into that one and making some notes there, so I'm going to close this one just to consolidate any ongoing discussion over there. Thanks for reporting this, and sorry we let it sit here for so long.

@ghost
Copy link

ghost commented Apr 13, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants