Hello,
I am trying to get the AWS Credentials already stored in my SSM Parameter Store and call them in my Terraform Provider so that i can Plan, Apply my terraform code.
i have tried the following code…
in variables i have:
variable “tf_access_key” {
default = “tf_access_key”
}
data “aws_ssm_parameter” “tf_access_key” {
name = var.tf_access_key
}
and then in Version.tf i have.
.
.
access_key = data.aws_ssm_parameter.tf_access_key.value
.
.
.
i am not sure if this is the correct way. i need suggestions how to get my correct credentials from the Parameter store and then us it in my provider. the access key and the secret key.
kindly help and suggest.
thanks in advance.
P.S. i need to do this because my ultimate goal is to run my code using CI CD Pipeline in aws.