Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Support env vars in provider #149

Merged
merged 1 commit into from
Jul 19, 2023
Merged

Conversation

mzwennes
Copy link

@mzwennes mzwennes commented Jul 16, 2023

In CICD pipelines it can be useful to inject certain values such as secrets or endpoints (when using multiple environments). This change allows a user to set an environment variable instead of hard-coding the api_token and endpoint in the provider block.

How to test

export INSTANA_API_TOKEN="<TOKEN>"
export INSTANA_ENDPOINT="<ENDPOINT_URL>"
terraform plan

Provider block can be empty when the above two env vars are set:

provider "instana" {}

Copy link
Owner

@gessnerfl gessnerfl left a comment

Choose a reason for hiding this comment

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

Much appreciate this change. Again thanks for your contribution @mzwennes

@gessnerfl gessnerfl merged commit 5ae3e47 into gessnerfl:main Jul 19, 2023
@mzwennes mzwennes deleted the support_env_vars branch July 20, 2023 11:50
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.

2 participants