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/terraform_remote_state: accept complex configs #18759

Merged
merged 2 commits into from
Aug 30, 2018

Conversation

svanharmelen
Copy link
Contributor

@svanharmelen svanharmelen commented Aug 29, 2018

The remote backend config contains an attribute that is defined as a *schema.Set, but currently only string values are accepted as the config attribute is defined as a schema.TypeMap.

Additionally the b.Validate() method wasn’t called to prevent a possible panic in case of unexpected configurations being passed to b.Configure().

This commit is a bit of a hack to be able to support this in the 0.11 series. The 0.12 series will have proper support, so when merging 0.12 this should be reverted again.

The additional change to the manta backend was needed to (next to making it consistent as its the only attribute name that uses camelcase) because passing that attribute objectName ended up giving me this error:

return fmt.Errorf("%s: Field name may only contain lowercase alphanumeric characters & underscores.", k)

Sander van Harmelen added 2 commits August 29, 2018 20:21
The `remote` backend config contains an attribute that is defined as a `*schema.Set`, but currently only `string` values are accepted as the `config` attribute is defined as a `schema.TypeMap`.

Additionally the `b.Validate()` method wasn’t called to prevent a possible panic in case of unexpected configurations being passed to `b.Configure()`.

This commit is a bit of a hack to be able to support this in the 0.11 series. The 0.12 series will have proper support, so when merging 0.12 this should be reverted again.
This change is needed (next to making it consistent as its the only attribute name that uses camelcase) because passing that attribute objectName in the update `terraform_remote_state` resource, ended up giving me this error: https://github.com/hashicorp/terraform/blob/master/helper/schema/schema.go#L736
@apparentlymart apparentlymart requested a review from a team August 29, 2018 21:11
@svanharmelen svanharmelen merged commit b591cb6 into master Aug 30, 2018
@svanharmelen svanharmelen deleted the b-terraform-remote-state branch August 30, 2018 09:16
@ghost
Copy link

ghost commented Apr 2, 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 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants