Skip to content

Commit e3beb68

Browse files
Rahul-4480vjdhama
authored andcommitted
add: images related to terraform secrets management section in blog
1 parent b6b97f6 commit e3beb68

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

content/blog/terraform_secrets_management_guide.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ featured: true
77
weight: 1
88
---
99

10-
When working with Terraform, managing credentials and secrets securely is crucial. In this blog, we'll explore several methods for managing secrets and credentials securely, including environment variables, GitHub Secrets, encrypted files with AWS KMS, and AWS Secrets Manager. We’ll also compare these methods to help you choose the best approach for your needs.
10+
Imagine you're working on a project where you need to deploy resources to aws using terraform. In a rush to get things done, you decide to hard-code your AWS credentials directly into your Terraform files. Everything works fine at first, and your resources are successfully deployed. But a few weeks later, you discover that your Terraform repository was accidentally made public. Suddenly, your AWS credentials are exposed to the entire internet. Exposing your credentials can lead to unauthorized access to your AWS account, leading to serious security problems.
11+
12+
This scenario highlights why it's essential to manage secrets and credentials securely. Hard-coding sensitive information in your codebase is risky. To avoid such issues, it's crucial to explore secure methods for managing secrets and credentials in Terraform.
13+
14+
In this blog, we'll explore several methods for managing secrets and credentials securely, including environment variables, GitHub Secrets, encrypted files with AWS KMS, and AWS Secrets Manager. We’ll also compare these methods to help you choose the best approach for your needs.
1115

1216
### Method 1: Environment Variables
1317

@@ -73,6 +77,10 @@ terraform apply
7377

7478
Using encrypted files to manage secrets in Terraform is a robust approach that enhances security by leveraging AWS Key Management Service (KMS). This method ensures that sensitive information is stored in an encrypted format and decrypted only when needed by Terraform.
7579

80+
<p align="center">
81+
<img src="/images/blog/terraform-secrets-management/encrypted-files-kms.webp" alt="Encrypted Files (KMS)" style="border-radius: 10px; width: 300; height: 500;">
82+
</p>
83+
7684
#### Step-by-Step Guide
7785

7886
Imagine you need to create an AWS RDS instance, and you want to keep the database username and password secure by storing them in an encrypted file.
@@ -202,6 +210,10 @@ terraform apply
202210

203211
AWS Secrets Manager provides a secure way to store and manage sensitive information such as database credentials, API keys, and other secrets. This method allows you to retrieve secrets dynamically within your Terraform configuration, ensuring that sensitive data is never hard-coded in your Terraform files.
204212

213+
<p align="center">
214+
<img src="/images/blog/terraform-secrets-management/secrets-manager.webp" alt="AWS Secrets Manager" style="border-radius: 10px; width: 300; height: 500;">
215+
</p>
216+
205217
#### Step-by-Step Guide
206218

207219
Here’s how you can manage your database credentials using AWS Secrets Manager:
@@ -305,6 +317,10 @@ For projects managed with GitHub, using GitHub Secrets is a convenient way to st
305317

306318
and manage secrets securely within GitHub Actions workflows. This method is particularly useful for CI/CD pipelines where you need to keep sensitive data safe while automating deployments.
307319

320+
<p align="center">
321+
<img src="/images/blog/terraform-secrets-management/github-actions-workflow.png" alt="GitHub Secrets" height="300" width="500" style="border-radius: 10px;">
322+
</p>
323+
308324
#### Step-by-Step Guide
309325

310326
Here’s how you can manage your database credentials using GitHub Secrets:
27 KB
Loading
16.4 KB
Loading
39.6 KB
Loading

0 commit comments

Comments
 (0)