AWS Dynamic Provider Credentials


The dynamic provider credential setup in AWS can be done with the Terrraform code available in the following link:

The code will also create a sample workspace with all the require environment variables that can be used to test the functionality using the CLI driven workflow.

Make sure to mount your public and private key to the API container as explained here

Mare sure the private key is in "pkcs8" format

Validate the following terrakube api endpoints are working:

Set terraform variables using: ""

terrakube_api_hostname = "TERRAKUBE-API.MYCLUSTER.COM"
terrakube_workspace_name = "dynamic-workspace-aws"
aws_region = "us-east-1"

To generate the API token check here

Run Terraform apply to create all the federated credential setup in AWS and a sample workspace in terrakube for testing

To test the following terraform code can be used:

terraform {

  cloud {
    organization = "terrakube_organization_name"
    hostname = ""

    workspaces {
      name = "terrakube_workspace_name"

provider "aws" {


resource "aws_s3_bucket" "example" {
  bucket = "my-tf-superbucket-awerqerq"

  tags = {
    Name        = "My bucket"
    Environment = "Dev"

Last updated