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

Input doesn't match output of databases connection config #2962

Open
LinusU opened this issue Jul 3, 2017 · 2 comments
Open

Input doesn't match output of databases connection config #2962

LinusU opened this issue Jul 3, 2017 · 2 comments

Comments

@LinusU
Copy link

LinusU commented Jul 3, 2017

When configuring a database backend you are giving it a connection_url, e.g.

{
  "allowed_roles": ["*"],
  "connection_url": "postgresql://user:[email protected]:5432/db",
  "plugin_name": "postgresql-database-plugin"
}

But when reading the same path out, the following is returned:

{
  "allowed_roles": ["*"],
  "connection_details": {
    "connection_url": "postgresql://user:[email protected]:5432/db"
  },
  "plugin_name": "postgresql-database-plugin"
}

Trying to set the second structure directly results in the error:

* error creating database object: connection_url cannot be empty

This is a problem because Terraform thinks that it needs to update the value every time I run terraform plan. Would it be possible to either accept both as input, switching the input to the second, or switching the output to the first format?

@jefferai
Copy link
Member

jefferai commented Jul 3, 2017

The reason for the output being this way is sensible but I think we could add a check that would allow reading the url from the connection details struct.

@jefferai jefferai assigned jefferai and briankassouf and unassigned jefferai Jul 3, 2017
@LinusU
Copy link
Author

LinusU commented Jul 3, 2017

Sounds very good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants