Тёмный

How to Manage Secrets in Terraform? 

Anton Putra
Подписаться 67 тыс.
Просмотров 28 тыс.
50% 1

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 79   
@AntonPutra
@AntonPutra Год назад
🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com
@dmitrikonnov922
@dmitrikonnov922 Год назад
This video is PURE GOLD.
@AntonPutra
@AntonPutra Год назад
Thanks =)
@yasharsultanov1749
@yasharsultanov1749 Год назад
Антон, вы даже не сможете представить, как сильно вы помогли мне. Спасибо!
@AntonPutra
@AntonPutra Год назад
rad pomoch!
@ThomasFerguson-x4v
@ThomasFerguson-x4v Год назад
Another cool way is to store the sensitive values in SSM parameter store and then using the data source to pull it into your terraform.
@AntonPutra
@AntonPutra Год назад
yeap
@yogithakakarla1716
@yogithakakarla1716 Год назад
Could u please share us how to do this please
@yogithakakarla1716
@yogithakakarla1716 Год назад
Pls let us know how to do this @anton putra
@puttenicole
@puttenicole Год назад
@@yogithakakarla1716 data "aws_ssm_parameter" "token" { name = "/mysecret/token" } data.aws_ssm_parameter.token.value
@George-mk7lp
@George-mk7lp Год назад
@@puttenicole thanks!
@kruchkov.alexandr
@kruchkov.alexandr Год назад
Спасибо, очень полезный урок, я даже сохранил в закладках.
@AntonPutra
@AntonPutra Год назад
Spasibo
@karthikreddy6638
@karthikreddy6638 Год назад
Hi Anton, As usual really great content. Kudos to you for putting such high quality content everytime. May be you can do playlist on central Logging solutions for k8s pods. Just a suggestion for future videos. Thanks again. Appreciate the effort you put behind these vidoes. 🎉
@AntonPutra
@AntonPutra Год назад
Thanks for the suggestion, will do in the future!
@gorandev
@gorandev 3 месяца назад
Very informative video, I didn't know about the "pass" password manager. Thank you.
@AntonPutra
@AntonPutra 3 месяца назад
thanks!
@prashlovessamosa
@prashlovessamosa Год назад
Awesomely Explained.
@AntonPutra
@AntonPutra Год назад
appreciate it!
@azerbaijan50
@azerbaijan50 Год назад
Thank you for this great video. You do priceless things here.
@AntonPutra
@AntonPutra Год назад
appreciate it!
@suoncha
@suoncha Год назад
Awsome! Btw, i’m using Vault hosting on an EC2 for storing secrets recently. What ur opinion abt its downsides when compare to managed services? Beside having to manage it urself lol
@AntonPutra
@AntonPutra Год назад
I would personally prefer to use self managed services like vault, well partially because we use multiple clouds.
@Wzooff
@Wzooff Год назад
Due to recent aws provider changes we can get rid of passwords for rds using manage_master_user_password attribute :) Databases for me was the last thing that required creating passwords. Everything else can be managed with iam roles without passwords/keys at all
@aminniktash9006
@aminniktash9006 Год назад
great video especially the second part, Thanks in advance, Would you please explain after securing the secrets with the latest method, are we still have them as plain text on the state file or not? you didn't demo that part and the end of your video
@AntonPutra
@AntonPutra Год назад
Thank you! Yes, unfortunately, in the Terraform state, you'll find those secrets in plain text. It's a well-known issue that HashiCorp didn't want to resolve. They want everybody to migrate to Terraform Cloud. Now, after the fork "OpenTF," they immediately implemented encryption of those secrets. We may need to wait a few more weeks until they officially release it.
@kelvinonuchukwu8215
@kelvinonuchukwu8215 Год назад
Superb!!
@AntonPutra
@AntonPutra Год назад
thanks!
@bobrt3739
@bobrt3739 4 месяца назад
Great
@AntonPutra
@AntonPutra 4 месяца назад
thanks
@scottamolinari
@scottamolinari 11 месяцев назад
A very k8s-centric (i.e. the private key stays inside the cluster) method to encrypting secrets and being able to save them external to the cluster is via Bitnami's sealed secrets.
@AntonPutra
@AntonPutra 11 месяцев назад
Yes, but it's hard to rotate and quickly revoke, unless you have a script that pulls the secrets and creates sealed secret out of it.
@scottamolinari
@scottamolinari 11 месяцев назад
@@AntonPutra- Um, no matter what system you use, you always have to have some process to generate the secret, encrypt it and save it.
@AntonPutra
@AntonPutra 11 месяцев назад
@@scottamolinari Sure, I've been using Sealed Secrets in production for the last 5 years and have never had any issues. The only exception was with GKE, where you need to open an additional port between the master and nodes to pull the public cert for encrypting your secrets, because it uses kubectl proxy.
@diegonayalazo
@diegonayalazo 4 месяца назад
@AntonPutra
@AntonPutra 4 месяца назад
🙏
@GunShot109
@GunShot109 4 месяца назад
very informative
@AntonPutra
@AntonPutra 4 месяца назад
thanks!
@samratchaudhary8511
@samratchaudhary8511 Год назад
Sir, can you teach us how to create cross-account deployment using terraform module in jenkins CI/CD pipeline?
@AntonPutra
@AntonPutra Год назад
Do you mean hep to setup IAM roles for terraform?
@samratchaudhary8511
@samratchaudhary8511 Год назад
@@AntonPutra Yes, sir! Usin'g IAM roles to deploy to dev, staging and production steps and strategy!
@YordisPrieto
@YordisPrieto Год назад
What about the usage of random_password resource? Would you recommend to remove it? Or is there anyway to leverage random_password resource securely? I am in DigitalOcean so I do not have KMS or something alike at the moment.
@AntonPutra
@AntonPutra Год назад
you can use it for testing =) basically you use state to store your secret
@NeimorJeck
@NeimorJeck Год назад
It's not the most convenient option. Instead of managed SMs from public cloud providers you can use the vault as self hosted solution and get sensitive data to terraform using the same approach.
@YordisPrieto
@YordisPrieto Год назад
Definitely just for testing 😛 I did deployed Vault but I have a cyclical dependency since I use terraform to deploy Vault so at some point in the infra I don’t have Vault available 🥲
@lakshayarora3935
@lakshayarora3935 Год назад
Great video. I would like to know why pass doesn't pops up again to enter the passphrase (to retrieve the password ) once we have got the password. So, every time we need the password, it should ask for the passphrase everytime
@AntonPutra
@AntonPutra Год назад
it does only if you enter it initially
@lakshayarora3935
@lakshayarora3935 Год назад
@@AntonPutra But that will not work in Production environments.
@AntonPutra
@AntonPutra Год назад
@@lakshayarora3935 I would use cloud secret managers for prod
@SANTOSHSINGH4U
@SANTOSHSINGH4U 5 месяцев назад
is there a way to extract credentials from azure vault and run terraform and pass these values to azure pipeline solutions..I m looking for similar solution in azure around service principle
@AntonPutra
@AntonPutra 5 месяцев назад
i assume it's posible, but you or your role need to have permissions for that vault secret
@kruchkov.alexandr
@kruchkov.alexandr Год назад
Am I understanding correctly that the combination of sops+kms is not the best choice because the password is stored in the state? So, from the perspective of GIT + CI/CD, it's beautiful and protected, but the state itself contains passwords and tokens.
@AntonPutra
@AntonPutra Год назад
Whatever option you choose, secrets will also be stored in plain text in the Terraform state. In my opinion, cloud-managed services (secrets managers) are more convenient in the long run than SOPs, etc.
@biLLie_wiLLie
@biLLie_wiLLie Год назад
nice video! Are you devops?
@AntonPutra
@AntonPutra Год назад
sre if you ask my manager lol
@yogithakakarla1716
@yogithakakarla1716 Год назад
Show us how to do using hashicorp vault
@AntonPutra
@AntonPutra Год назад
Ok, there are so many different integrations.. I'll make one soon
@biscuithammer
@biscuithammer 13 дней назад
anybody getting the error when decrypting the yml file?: Error: decrypting secret (db): InvalidCiphertextException. I'm on Windows powershell
@AntonPutra
@AntonPutra 13 дней назад
it's hard to debug that way
@degeneric9618
@degeneric9618 5 месяцев назад
4:20 for future reference
@AntonPutra
@AntonPutra 5 месяцев назад
sure :)
@YordisPrieto
@YordisPrieto Год назад
Second
@domw2391
@domw2391 Год назад
looks like AWS secret manager is the easiest way
@AntonPutra
@AntonPutra Год назад
💯 or vault
@George-mk7lp
@George-mk7lp Год назад
using secret manager will it still store secret value in state file?
@H4KnSL4K
@H4KnSL4K 9 месяцев назад
Ugh. Why are you using MacOS? With your knowledge, I was assuming you'd be running Linux...
@AntonPutra
@AntonPutra 9 месяцев назад
Well, 90% of the software engineers in the Bay Area use MacOS, mostly because companies provide it. Some startups use Linux, but to be compliant, I guess they force us to use Mac.
@AntonPutra
@AntonPutra 9 месяцев назад
Also, Adobe won't run on Linux, so I don't want to be constantly switching between two laptops.
@redfox6179
@redfox6179 Год назад
Hi, do you have telegram?
@AntonPutra
@AntonPutra Год назад
I do, also I have email me@antonputra.com =)
@Alex-tv1fp
@Alex-tv1fp Год назад
The only one thing I am not like on this video that you are reading text instead of real “explanation”.
@shantipahari
@shantipahari Год назад
db_creds = jsondecode( │ 7: data.aws_secretsmanager_secret_version.creds.secret_string │ 8: ) │ ├──────────────── │ │ while calling jsondecode(str) │ │ Call to function "jsondecode" failed: invalid character '"' after object key:value pair.
@shantipahari
@shantipahari Год назад
i tried to follow this but i got the following error
@kurtcobain5294
@kurtcobain5294 Год назад
so you cant read? @@shantipahari
Далее
How to manage Terraform State?
51:02
Просмотров 10 тыс.
WHICH SODA CAN FLY THE HIGHEST?
00:48
Просмотров 7 млн
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
Просмотров 116 тыс.
The 4  Primary Vault Use Cases
22:55
Просмотров 17 тыс.
How To Structure Terraform Project (3 Levels)
41:21
Просмотров 11 тыс.
DynamoDB Encryption with AWS KMS Using Terraform
10:20
Просмотров 1,2 тыс.
IaC on AWS with Terraform: HashiCorp Vault
26:48
Просмотров 4,5 тыс.
An Introduction to Terraform
53:27
Просмотров 12 тыс.
WHICH SODA CAN FLY THE HIGHEST?
00:48
Просмотров 7 млн