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

[Feature Request] Add more supported settings for jsonData in grafana_data_source resource #124

Closed
justinb100 opened this issue Oct 13, 2020 · 1 comment

Comments

@justinb100
Copy link

We have connections to PostgreSQL databases that have SSL Mode set to disabled, and we would like to be able to set this in the jsonData of the grafana_data_source resource. Currently, after the resource is created or modified we have to go in manually to the connection settings and disable it:

Screen Shot 2020-10-13 at 2 45 01 PM

It would be nice if more jsonData settings listed here could be set in the grafana_data_source resource: https://grafana.com/docs/grafana/latest/administration/provisioning/#example-data-source-config-file

Affected Resource(s)

  • grafana_data_source

Terraform Configuration Files

Here is an example of a postgres data source we're using that we would like to work with the json_data support. Currently we're omitting the json_data setting with ssl_mode since it's not supported:

  resource "grafana_data_source" "windb2" {
    type          = "postgres"
    name          = "windb2"
    url           = module.secret.windb2_pghost_kubernetes_secret
    username      = module.secret.windb2_pguser_kubernetes_secret
    password      = module.secret.windb2_pgpassword_kubernetes_secret
    database_name = module.secret.windb2_pgdatabase_kubernetes_secret
    json_data {
      ssl_mode = "disable"
    }
  } 

Expected Behavior

The SSL Mode in the PostgreSQL connection should be set to disable.

Actual Behavior

Terraform plan results in:

Error: Unsupported argument

  on grafana.tf line 113, in resource "grafana_data_source" "windb2":
 113:     ssl_mode = "disable"

An argument named "ssl_mode" is not expected here.
@justinb100
Copy link
Author

Closing because I just saw this was released in 1.6.0, tested it works well, thanks!

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

No branches or pull requests

1 participant