Terragrunt gitlab ci + Initial configuration of the requested backend

terragrunt gitlab ci + Initial configuration of the requested backend

I need to setup a pipleine to run a terrgrunt project. I’ve created a stage where I add a terragrunt init --terragrunt-non-interactive for testing and added another line in the script section where I add terragrunt plan

But this results in:

=> init => terragrunt init --terragrunt-non-interactive
Initializing provider plugins...
- Finding hashicorp/aws versions matching "3.71.0"...
- Installing hashicorp/aws v3.71.0...
- Installed hashicorp/aws v3.71.0 (signed by HashiCorp)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
=> terragrunt plan
Initializing provider plugins...
- Reusing previous version of hashicorp/aws from the dependency lock file
- Using previously-installed hashicorp/aws v3.71.0
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
╷
│ Error: Backend initialization required, please run "terraform init"
│ 
│ Reason: Initial configuration of the requested backend "s3"
│ 
│ The "backend" is the interface that Terraform uses to store state,
│ perform operations, etc. If this message is showing up, it means that the
│ Terraform configuration you're using is using a custom configuration for
│ the Terraform backend.
│ 
│ Changes to backend configurations require reinitialization. This allows
│ Terraform to set up the new configuration, copy existing state, etc. Please
│ run
│ "terraform init" with either the "-reconfigure" or "-migrate-state" flags
│ to
│ use the current configuration.
│ 
│ If the change reason above is incorrect, please verify your configuration
│ hasn't changed and try again. At this point, no changes to your existing
│ configuration or state have been made.
╵
time=2022-02-09T14:42:43+01:00 level=error msg=1 error occurred:
	* exit status 1
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

I have absolutly now idea how to get rid of this.

The init created the .terragrunt-cachefolder and .terraform.lock.hcl as expected.

I use
terragrunt version v0.36.1
Terraform v1.1.5