runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.66k stars 1.04k forks source link

Dynamic key for every state #1211

Open Dani-Ionescu opened 3 years ago

Dani-Ionescu commented 3 years ago

Hello,

Is there any possibility to have a dynamic state for every terraform entity? I mean dynamodb and the key. Is a bit weird to change manually the key for every entity. Is there any setting for atlantis to generate a random one or something like that?

terraform {
  backend "s3" {
    bucket         = "terraform-dev"
    encrypt        = true
    key            = "???"
    dynamodb_table = "???"
    region         = "eu-west-1"
    profile        = "dev"
  }
} 
lkysow commented 3 years ago

Usually you'd set this yourself otherwise you wouldn't be able to run terraform locally. Perhaps you could do something with a custom workflow.