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

Grafana Datasource Cloudwatch ARN missing attributes #14

Closed
fotto1 opened this issue Jan 30, 2018 · 6 comments
Closed

Grafana Datasource Cloudwatch ARN missing attributes #14

fotto1 opened this issue Jan 30, 2018 · 6 comments

Comments

@fotto1
Copy link

fotto1 commented Jan 30, 2018

Terraform Version

Terraform v0.11.2

  • provider.grafana v1.0.1

Affected Resource(s)

  • grafana_data_source

Terraform Configuration Files

resource "grafana_data_source" "dev_datasourcees" {

  name = "terraform-test"
  type = "cloudwatch"
  url = "arn:aws:iam:::role/myrole"
  access_mode = "proxy"

  basic_auth_enabled = false
  is_default = false

  json_data {
    auth_type = "arn"
    default_region = "eu-central-1"
  }

}

The code is working and the grafana datasource will be created but I'm not able to set the following parameters:

  • assumeRoleARN - Role which should be used
  • orgId - ID of the Organisation in Grafana
  • customMetrics - Namespaces of the Custom Metrics

image

I use a grafana version 4.6.3

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. create a provider with Grafana and credentials
  2. terraform apply
@fotto1
Copy link
Author

fotto1 commented Mar 21, 2018

Any progress?

@pearkes
Copy link
Contributor

pearkes commented Mar 24, 2018

There is a PR over on #16 that is looking good to resolve this.

@fotto1
Copy link
Author

fotto1 commented Mar 26, 2018

Sounds good - I keep that ticket open until PR16 is closed https://github.com/terraform-providers/terraform-provider-grafana/pull/16

@pearkes
Copy link
Contributor

pearkes commented Apr 16, 2018

@pearkes pearkes closed this as completed Apr 16, 2018
@jsboeve
Copy link

jsboeve commented Feb 21, 2023

For anyone else who stumbles on this looking for a solution: json_data was deprecated and replaced with json_data_encoded which seems to require camel case to work properly.

If you want to use assume_role_arn you need to use camel case "assumeRoleArn" within the json_data_encoded field:

json_data_encoded = jsonencode({ assumeRoleArn = {arn}})

@LuisRodri21
Copy link

I think the documentation is not updated with this change.

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

4 participants