-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Allows setting the provider host and authorisation_token via CAPELLA prefixed environment variables #239
Conversation
…PELLA prefixed environment variables Signed-off-by: Chris Doyle <uk.chris.doyle+cdsre@gmail.com>
Signed-off-by: Chris Doyle <uk.chris.doyle+cdsre@gmail.com>
Also validated the Note that I added a debug statement to validate I tested the right build (it prints config:
run:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution !
@SaicharanCB my comment shows TF_VAR still works. so as long the env vars are set correctly and jenkins can get them I think should be fine. |
Jira
Description
Please include a summary of the fix/feature/change, including any relevant motivation and context.
Updates the provider to allow setting of the
host
andauthorisation_token
as environment variables prefixed withCAPELLA_
and removesauthorisation_token
as a required attribute in the configuration block as it can now be provided from an environment variableType of Change
Manual Testing Approach
How was this change tested and do you have evidence? (REQUIRED: Select at least 1)
Testing
Testing
Example terraform code
Execution
Without using a provider block in the terraform code and setting only the
CAPELLA_AUTHORISATION_TOKEN
the provider still successfully interacts with the API and retrieves project details.Required Checklist:
Further comments
The make fmt has formatted the
internal/schema/cluster.go
There is no functional change here other than the go formatter passing the spaces.