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

Remote State Backend for TFE is completely broken #18734

Closed
charles-d-burton opened this issue Aug 24, 2018 · 4 comments
Closed

Remote State Backend for TFE is completely broken #18734

charles-d-burton opened this issue Aug 24, 2018 · 4 comments

Comments

@charles-d-burton
Copy link

charles-d-burton commented Aug 24, 2018

Terraform Version

11.8

...

Terraform Configuration Files

data "terraform_remote_state" "vpc" { 
backend = "remote"

config { 
organization = "mindflash"

workspaces { 
name = "vpc-ops-us-east-1" 
} 
} 
}

Crash Output

Terraform v0.11.8

Configuring remote state backend...
Initializing Terraform configuration...
2018/08/24 16:16:29 [DEBUG] Using modified User-Agent: Terraform/0.11.8 TFE/d5556bf

Error: data.terraform_remote_state.vpc: config (workspaces): '' expected type 'string', got unconvertible type '[]map[string]interface {}'

Expected Behavior

It should pull in the remote state

Actual Behavior

It fails

Steps to Reproduce

Easy, with a terraform enterprise account create two resources using the "remote" backend. Try referencing one with the other.

Additional Context

References

I know where your bug is in the code,
https://github.com/hashicorp/terraform/blob/master/backend/remote/backend_state.go

If you look at the struct you have it set to a string rather than a map. But I'm not familiar enough with how that all shakes out to patch it. There are not circumstances where this works either. I I set the wrokspaces parameter in HCL to a string I get a runtime panic.

EDIT: changed hcl to reflect expected config.

@charles-d-burton
Copy link
Author

Upon further investigation I think the problem is actually right here:
https://github.com/hashicorp/terraform/blob/master/backend/remote/backend.go

At line 53 and 96. On 53 you have the type as a string but at 96 you're unmarshaling it to a schema.TypeSet.

@iniinikoski
Copy link

Hi,

I guess this is still open...? Bumped into this when using TFE as well - a huge blocker...

Any comment from Hashicorp? :)

@hashibot
Copy link
Contributor

Hello! 🤖

This issue relates to an older version of Terraform that is no longer in active development, and because the area of Terraform it relates to has changed significantly since the issue was opened we suspect that the issue is either fixed or that the circumstances around it have changed enough that we'd need an updated issue report in order to reproduce and address it.

If you're still seeing this or a similar issue in the latest version of Terraform, please do feel free to open a new bug report! Please be sure to include all of the information requested in the template, even if it might seem redundant with the information already shared in this issue, because the internal details relating to this problem are likely to be different in the current version of Terraform.

Thanks!

@ghost
Copy link

ghost commented Sep 27, 2019

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 Sep 27, 2019
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

4 participants