Software Architecture in Golang: Externalized Configuration Pattern



Software Architecture in Golang: Externalized Configuration Pattern

Software Architecture in Golang: Externalized Configuration Pattern

What is the Externalized Configuration Pattern? In simple terms the Externalized Configuration pattern consists of defining a dedicated secure data store in charge of handling of the values we need for our application in a secure way, those values typically include things such as credentials, keys or tokens that must not be made available in plain text.

In Go there are multiple ways to define configuration, some examples include:
■ Using CLI Parameters or Flags,
■ Using Property or Configuration Files, or
■ Using Environment Variables (my recommendation)

Using Environment Variables is the recommended way to define configuration values because it allows you to clearly separate the configuration from the application and the way it’s being executed.

== Relevant links

■ Blog Post: Secure Configuration with Environment Variables and AWS SSM: https://mariocarrion.com/2019/11/20/golang-aws-ssm-env-vars-package.html
■ Golang Microservices: Configuration, Environment Variables and Vault https://youtu.be/7UmJR0dOkjM
■ Example code: https://github.com/MarioCarrion/videos/tree/563e4bb95ba5a91c396c3e5e7163d1fd4047d79c/2022/08/26
■ Software Architecture in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_GCd12Lrv_evJ3Zhv1dl8B-
■ Golang Microservices: Events Streaming using Apache Kafka: https://youtu.be/jr7OULxYm0A

== All Go/Golang Playlists

■ Building Microservices in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_Fn8sAXIk0WyBfK_sT1pohu
■ Go/Golang Tools and Packages: https://www.youtube.com/playlist?list=PL7yAAGMOat_HEEOvH99agDs_5g51A0Ls3
■ Learning Concurrency Patterns in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_Fhj_px_DzNzTsXs-mRwv1t
■ Learning Go/Golang : https://www.youtube.com/playlist?list=PL7yAAGMOat_F7bOImcjx4ZnCtfyNEqzCy
■ Learning Relational Databases in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_EgwoQTvNUflrYL_4qzdB7f
■ Software Architecture in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_GCd12Lrv_evJ3Zhv1dl8B-
■ Testing in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_HSeW4zF0uRL9EaHadE4ZZq

== Socials

■ https://twitter.com/MarioCarrion
■ https://www.instagram.com/mario.carrion
■ https://linkedin.com/in/MarioCarrion

00:00 – Introduction to the Externalized Configuration Pattern in Golang
00:43 – Configuration using Parameters or Flags in Golang (Externalized Configuration Pattern)
02:24 – Configuration using Properties Files in Golang (Externalized Configuration Pattern)
04:15 – Configuration using Environment Variables in Golang (Externalized Configuration Pattern)
05:42 – Configuration using HashiCorp Vault in Golang (Externalized Configuration Pattern)
08:33 – External Layer Configuration in Golang (Externalized Configuration Pattern)
10:53 – Conclusion of the Externalized Configuration Pattern in Golang

=== Who am I?

Hello👋🏼! I’m Mario, a Hands-on Software Architect and Lead Backend Engineer with decades of professional experience building all kinds of software including on-premise Industrial Automation Systems, Linux Accessibility Desktop and Browser Components as well as Distributed Advertising Microservices.

The content I share includes different topics I’ve learned while working for small startups and large companies including the processes I’ve followed over the years for successfully delivering complex enterprise systems from start to end.

Subscribe if you like Software Development, Software Architecture and Systems Design!

Keep it up. Don’t give up!

#golang #tutorial #microservices

=== Our Vlog Channel

https://www.youtube.com/c/RubyCarrion/videos

=== Our affiliate links below

■ My Amazon Storefront: https://www.amazon.com/shop/rubycarrion
■ Shop my IG posts on my shopLTK page: https://www.shopltk.com/explore/RubyCarrion
■ Vlog camera: Sony RX100 VII https://amzn.to/3qQfvMc
■ Other vlog cameras and gear: https://rubycarrion.com/vlogcamerasandgear/
■ Shop through my links to support the channel: https://rubycarrion.com/shop-my-links/
■ Get a 30 day FREE Trial of Epidemic Sound: https://www.epidemicsound.com/referral/szx441/
■ Join Rakuten for FREE and get $30 when you spend $30: https://www.rakuten.com/r/RUBYRA132?eeid=28187

DISCLAIMER: Some of the links shared in the description are affiliate links. As a member of these affiliate programs, I earn a small commission from your purchases at no additional cost to you. I appreciate your support! 💖

Comments are closed.