terragrunt-non-interactive not answering yes to all prompts in Jenkins pipeline #3528
Labels
awaiting response
Waiting for a response or more data from issue reporter
bug
Something isn't working
Describe the bug
When running terragrunt init --terragrunt-non-interactive in a Jenkins pipeline, Terragrunt still asks for a yes/no confirmation:
"Do you want to copy existing state to the new backend?" Pre-existing state was found while migrating the previous local backend to newly configured "s3" backend. No existing state was found in the newly configured "s3" backend. Do you want to copy this state to the new "s3" backend? Enter "yes" to copy and "no" to start with an empty state.
Steps To Reproduce
Create a Jenkins pipeline with the following stage:
stage("Initialize terraform") {
steps {
script {
dir("terraform") {
sh "terragrunt init --terragrunt-non-interactive"
}
}
}
// paste code snippets here
remote_state {
backend = "s3"
generate = {
path = "backend.tf"
if_exists = "overwrite"
}
config = {
bucket = "jenkins-ansible-demo-tf-state"
key = "ansible/terraform.tfstate"
region = "us-east-1"
encrypt = true
dynamodb_table = "jenkins-ansible-demo-lock-table"
}
}
Expected behavior
The terragrunt init --terragrunt-non-interactive command should answer yes to all prompts.
Nice to haves
Versions
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: