https://infracost.io logo
#contributors
Title
# contributors
a

agreeable-twilight-86711

09/10/2021, 5:59 PM
Hi everyone, relative Golang beginner here but trying to hack away at https://github.com/infracost/infracost/issues/941. I'm expecting to need some help figuring out where to make all of the updates but I'll post some comments about my progress in the thread to avoid cluttering the channel.
This is my WIP branch: https://github.com/njculver/infracost/tree/feat/tls-configuration So far I've added flags to
cmd/infracost/run.go
, updated the
Config
struct in
internal/config/config.go
, added an
[]*Config
to the
ConfigFileSpec
struct in
internal/config/config_file.go
and I know that
doRequest
in
internal/apiclient/client.go
is where I need to add in the TLS configuration for the API calls but I think there's some intermediate plumbing that I'm still trying to sort out.
l

little-author-61621

09/10/2021, 9:01 PM
Thanks @agreeable-twilight-86711 🙌 . If you add a comment to the GH issue we can assign it to you. What's the reasoning for adding 
[]*Config
 to the 
ConfigFileSpec
 struct?
a

agreeable-twilight-86711

09/10/2021, 9:10 PM
I was thinking that it could be helpful to include the TLS settings into the config file (or part of
infracost configure
) so you could specify them once in a local usage scenario rather than continuously flagging or setting environment variables.
l

little-author-61621

09/11/2021, 7:11 AM
Ok makes sense. The
ConfigFileSpec
is for a per-run config. I think this makes more sense as a global configuration, so we should add it to here. Initially, though I think just getting the env variables in is a great start.
👍 1
7 Views