Skip to content

Adds script to import dashboards to terraform#73

Merged
greatestusername-splunk merged 3 commits into
splunk:mainfrom
jinja2:tf-dashboard-scripts
Sep 15, 2025
Merged

Adds script to import dashboards to terraform#73
greatestusername-splunk merged 3 commits into
splunk:mainfrom
jinja2:tf-dashboard-scripts

Conversation

@jinja2

@jinja2 jinja2 commented Jan 31, 2025

Copy link
Copy Markdown
Contributor

This PR is to add a tool which can enable users to import existing SignalFx dashboards to Terraform.

@github-actions

github-actions Bot commented Jan 31, 2025

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@jinja2

jinja2 commented Jan 31, 2025

Copy link
Copy Markdown
Contributor Author

I have read the Code of Conduct and I hereby accept the Terms

@greatestusername-splunk

Copy link
Copy Markdown
Collaborator

Wow thank you for contributing this!! I'm going to give it a once over test then we can get this merged.

Again thank you @jinja2 🖖

@greatestusername-splunk greatestusername-splunk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple comments on the docs otherwise lgtm! Thank you so much for contributing this!

Comment thread import-dashboards-terraform/README.md Outdated
```sh
cd ${REPO_ROOT}
docker run -v $(pwd):/app import-tf-script \
--auth-token <TOKEN> \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind taking another look at this block?
Does group-ids Does it need a list [id1,id2,id3] or id1,id2,id3?
<id1,id2> does not appear to be valid syntax

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this has some variable names that need changing. This worked:

docker run -v $(pwd):/main import-tf-script \
--api-token mytokentokentoken \
--api-url https://api.us1.signalfx.com \
--groups GJsIuOtA4Ag \
--dir /beep

so --groups instead of --group-ids and --api-token instead of auth-token

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have fixed the readme.

Comment thread import-dashboards-terraform/README.md Outdated
For a quick start cmd to generate terraform code for dashboard group, run the following make command:

```sh
SIGNALFX_AUTH_TOKEN=<SIGNALFX API TOKEN> GROUP_IDS=<ID1,ID2> RELATIVE_DIR_PATH=resources/Synthetics-Dashboards make import-dashboard-group

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add SIGNALFX_API_URL here for clarity in case folks not on us1 use this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

docker buildx build -t $(IMAGE_NAME) .

.PHONY: import-dashboard-group
import-dashboard-group: clean build

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth listing out in the readme what env vars users have available for setting things like their url (realm) and token and so forth?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a section for this

@greatestusername-splunk

Copy link
Copy Markdown
Collaborator

Could we possibly list in the README what chart types are NOT supported? I imagine log query charts but to your knowledge is anything else not supported?

@technimad-splunk

Copy link
Copy Markdown
Contributor

Can this PR get some love? Content looks very usefull, what is needed to move forward?

@jinja2

jinja2 commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

Ah, forgot about this PR. I'll try to address the comments when I have some free time to move this forward.

@jinja2 jinja2 force-pushed the tf-dashboard-scripts branch from 3bffd91 to d93d1d8 Compare September 8, 2025 23:30
@jinja2

jinja2 commented Sep 8, 2025

Copy link
Copy Markdown
Contributor Author

@greatestusername-splunk thanks for the review! I have made the requested changes to the readme and updated pkg versions.

@greatestusername

Copy link
Copy Markdown
Contributor

@greatestusername-splunk thanks for the review! I have made the requested changes to the readme and updated pkg versions.

Oh thank you! Will take a look today. Really appreciate you circling back!!

@greatestusername-splunk greatestusername-splunk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY for adding these changes and updates! Much appreciated!!

@greatestusername-splunk greatestusername-splunk merged commit 1ae33da into splunk:main Sep 15, 2025
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 15, 2025
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.

4 participants