AWS secret Manager integration with terraform

Hello,
I am trying to use AWS secret manager with terraform. Aim is to store access_id and secret access id in AWS secret manager and get these values in the “provider” section of the terraform script to avoid hardcoding or securoty gap.

I keep getting error stating that the data module is not defined in the root module.

It will be of grrat help if someone can please help and provide clear approach and statements to be used so that - access key and secret key can be populated from AWS secret manager in provider section.

Many thanks.

Hi there,

We recently published a Learn tutorial, Inject secrets into Terraform using the Vault provider, that guides you through using Vault’s AWS Secret Manager in a Terraform configuration.

Let me know if that helps or if you have any additional questions!