Skip to content

Support Certs via Environement Variable#479

Open
Issacwww wants to merge 1 commit into
aws:mainfrom
Issacwww:cetsViaEnvVar
Open

Support Certs via Environement Variable#479
Issacwww wants to merge 1 commit into
aws:mainfrom
Issacwww:cetsViaEnvVar

Conversation

@Issacwww

@Issacwww Issacwww commented Sep 13, 2024

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:
The approach in #478 may be the best way to proceed. Open another PR to solve the same issue.

Testing:
Build image and pass the correct certs, the original CFN creation issue was resolved.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.


func withCertsEnv() func(*config.LoadOptions) error {
return func(lo *config.LoadOptions) error {
certs := os.Getenv("CERTS_CONTENT")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit on naming:

Suggested change
certs := os.Getenv("CERTS_CONTENT")
certs := os.Getenv("ADDITIONAL_CA")

}
transport := &http.Transport{
TLSClientConfig: &tls.Config{
RootCAs: pool,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we be merging the additional CA's into the default pool instead of the pool only containing the one passed in env?

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

Successfully merging this pull request may close these issues.

2 participants