<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ram</title>
    <description>The latest articles on DEV Community by Ram (@ramparamhansa).</description>
    <link>https://dev.to/ramparamhansa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2921190%2F06479055-963e-4fa9-b9a5-4ef616d4253b.png</url>
      <title>DEV Community: Ram</title>
      <link>https://dev.to/ramparamhansa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ramparamhansa"/>
    <language>en</language>
    <item>
      <title>Using AWS Secret Manager to store credentials</title>
      <dc:creator>Ram</dc:creator>
      <pubDate>Wed, 12 Mar 2025 20:43:29 +0000</pubDate>
      <link>https://dev.to/ramparamhansa/using-aws-secret-manager-to-store-credentials-and-retrieve-it-in-terraform-module-4ofk</link>
      <guid>https://dev.to/ramparamhansa/using-aws-secret-manager-to-store-credentials-and-retrieve-it-in-terraform-module-4ofk</guid>
      <description>&lt;h6&gt;
  
  
  AWS Secret Manager is an AWS service that stores and rotate application credentials, database credentials, and API keys and other secrets throughout their lifecycle.
&lt;/h6&gt;

&lt;p&gt;AWS Secret Manager is like Vault service that provides storage and rotates the important credentials. &lt;/p&gt;

&lt;p&gt;Here is an example Using CLI to create a Database secret using secret Manager. &lt;/p&gt;

&lt;h1&gt;
  
  
  Create AWS Secret using CLI
&lt;/h1&gt;

&lt;p&gt;aws secretsmanager create-secret \&lt;br&gt;
    --name my-database-password \&lt;br&gt;
    --description "My database secret created with the CLI." \&lt;br&gt;
    --secret-string "\"password\":\"YourSecurePassword\"}"&lt;/p&gt;

&lt;h1&gt;
  
  
  Below code retrieve secret from secret manager
&lt;/h1&gt;

&lt;p&gt;data "aws_secretmanager_secret_version" "my_secret" {&lt;br&gt;
    secret_id = "my_secret_name"&lt;br&gt;
}&lt;/p&gt;

&lt;h1&gt;
  
  
  following code fetch secret from Secret manager and insert in the resource config
&lt;/h1&gt;

&lt;p&gt;resource "aws_db_instance" "my_database" {&lt;br&gt;
    # other DB configuration&lt;br&gt;
    password = data.aws_secretmanager_secret_version.mysecret.secretstring &lt;br&gt;
}&lt;/p&gt;

</description>
      <category>aws</category>
      <category>kms</category>
      <category>secretmanager</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
