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

Allow multiple providers of the same kind in a JSON tf #2015

Closed

Conversation

sparkprime
Copy link
Contributor

This is probably not the correct way to do this, but it allows accepting JSON of the form:

"provider": [
    {
        "google": {
            "alias": "us-central1",
            "account_file": "../service_account_key.json",
            "project": "abiding-truth-649",
            "region": "us-central1"
        }
    },
    {
        "google": {
            "alias": "europe-west1",
            "account_file": "../service_account_key.json",
            "project": "abiding-truth-649",
            "region": "europe-west1"
        }
    }
],

@sparkprime
Copy link
Contributor Author

I personally no-longer need this, as I am now generating 1 tf file per provider (and letting Terraform merge the tfs internally).

@mitchellh
Copy link
Contributor

If we can add a test for this this LGTM. If you don't need it anymore @sparkprime then we'll do it.

@sparkprime
Copy link
Contributor Author

Yeah I'm neck deep in something else right now. I'm also not sure if special-casing the provider is a very good idea.

@sparkprime sparkprime changed the title Accept JSON by testing if it is an array or not Allow multiple providers of the same kind in a JSON tf Jun 15, 2015
@phinze
Copy link
Contributor

phinze commented Dec 9, 2015

Working on cleaning up some old issues and PRs here - going to close this for now, you're welcome to resubmit if you'd like! 👍

@phinze phinze closed this Dec 9, 2015
@devth
Copy link

devth commented Mar 7, 2016

So what happened here? This isn't supported?

@phinze
Copy link
Contributor

phinze commented Mar 24, 2016

@devth Sounds like it wasn't supported last May, and the workaround was to write one JSON file per provider. The HCL loading code has changed pretty significantly since then, so it's entirely possible that it works now. Feel free to open a fresh issue if something is not working for you! 👍

@ddimitrioglo
Copy link

Confirm that it works, at least for terraform v0.11.7 😉

@ghost
Copy link

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

Successfully merging this pull request may close these issues.

5 participants