You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a terragrunt configuration that deploys a terraform module I built for dataform (using the Google cloud beta provider). When I attempt to run terragrunt apply on the configuration it fails with the error:
DEBU[0009] Variables passed to terraform are located in "/Users/markpevec/Eshyft/infra/envs/data/dataform/terragrunt-debug.tfvars.json" prefix=[/Users/markpevec/Eshyft/infra/envs/data/dataform]
DEBU[0009] Run this command to replicate how terraform was invoked: prefix=[/Users/markpevec/Eshyft/infra/envs/data/dataform]
DEBU[0009] terraform -chdir="/Users/markpevec/Eshyft/infra/envs/data/dataform/.terragrunt-cache/MeNHnUQtAFOc3wsY088_yVP6PAk/OwWZsN3z3TVN3gYjx26q-qeGwp4/modules/dataform" apply -var-file="/Users/markpevec/Eshyft/infra/envs/data/dataform/terragrunt-debug.tfvars.json" prefix=[/Users/markpevec/Eshyft/infra/envs/data/dataform]
DEBU[0010] Running command: terraform apply prefix=[/Users/markpevec/Eshyft/infra/envs/data/dataform]
╷
│ Error: Variables not allowed
│
│ on <value for var.repositories> line 1:
│ (source code not available)
│
│ Variables may not be used here.
╵
ERRO[0012] terraform invocation failed in /Users/markpevec/Eshyft/infra/envs/data/dataform/.terragrunt-cache/MeNHnUQtAFOc3wsY088_yVP6PAk/OwWZsN3z3TVN3gYjx26q-qeGwp4/modules/dataform prefix=[/Users/markpevec/Eshyft/infra/envs/data/dataform]
ERRO[0012] 1 error occurred:
* [/Users/markpevec/Eshyft/infra/envs/data/dataform/.terragrunt-cache/MeNHnUQtAFOc3wsY088_yVP6PAk/OwWZsN3z3TVN3gYjx26q-qeGwp4/modules/dataform] exit status 1
When I run the debug command it completes/applies successfully:
markpevec@Marks-Mac-mini dataform % terraform -chdir="/Users/markpevec/Eshyft/infra/envs/data/dataform/.terragrunt-cache/MeNHnUQtAFOc3wsY088_yVP6PAk/OwWZsN3z3TVN3gYjx26q-qeGwp4/modules/dataform" apply -var-file="/Users/markpevec/Eshyft/infra/envs/data/dataform/terragrunt-debug.tfvars.json"
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# google_dataform_repository.repositories["main"] will be created
+ resource "google_dataform_repository" "repositories" {
+ display_name = "Main Dataform repository"
+ effective_labels = (known after apply)
+ id = (known after apply)
+ name = "main"
+ project = "eshyft-data"
+ region = "us-east4"
+ service_account = "[email protected]"
+ terraform_labels = (known after apply)
+ git_remote_settings {
+ default_branch = "dev"
+ token_status = (known after apply)
+ url = "[email protected]:leverage-it/dataform.git"
+ ssh_authentication_config {
+ host_public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUO"
+ user_private_key_secret_version = "projects/710596952899/secrets/dataform-repo-ssh-private-key/versions/1"
}
}
+ workspace_compilation_overrides {
+ default_database = "eshyft-data"
+ schema_suffix = "${workspaceName}"
}
}
# google_dataform_repository_release_config.releases["main:dev"] will be created
+ resource "google_dataform_repository_release_config" "releases" {
+ cron_schedule = "0 4 * * *"
+ git_commitish = "dev"
+ id = (known after apply)
+ name = "dev"
+ project = "eshyft-data"
+ recent_scheduled_release_records = (known after apply)
+ region = "us-east4"
+ repository = "main"
+ code_compilation_config {
+ assertion_schema = "dataform_dev"
+ default_database = "eshyft-data"
+ default_schema = "dataform_dev"
}
}
# google_dataform_repository_release_config.releases["main:prod"] will be created
+ resource "google_dataform_repository_release_config" "releases" {
+ cron_schedule = "0 4 * * *"
+ git_commitish = "main"
+ id = (known after apply)
+ name = "prod"
+ project = "eshyft-data"
+ recent_scheduled_release_records = (known after apply)
+ region = "us-east4"
+ repository = "main"
+ code_compilation_config {
+ assertion_schema = "dataform_prod"
+ default_database = "eshyft-data"
+ default_schema = "dataform_prod"
}
}
# google_dataform_repository_workflow_config.workflows["main:dev:main"] will be created
+ resource "google_dataform_repository_workflow_config" "workflows" {
+ cron_schedule = "0 5 * * *"
+ id = (known after apply)
+ name = "dev_main"
+ project = "eshyft-data"
+ recent_scheduled_execution_records = (known after apply)
+ region = "us-east4"
+ release_config = (known after apply)
+ repository = "main"
+ invocation_config {
+ fully_refresh_incremental_tables_enabled = true
+ service_account = "[email protected]"
+ transitive_dependencies_included = true
+ transitive_dependents_included = true
}
}
# google_dataform_repository_workflow_config.workflows["main:prod:main"] will be created
+ resource "google_dataform_repository_workflow_config" "workflows" {
+ cron_schedule = "0 5 * * *"
+ id = (known after apply)
+ name = "prod_main"
+ project = "eshyft-data"
+ recent_scheduled_execution_records = (known after apply)
+ region = "us-east4"
+ release_config = (known after apply)
+ repository = "main"
+ invocation_config {
+ fully_refresh_incremental_tables_enabled = true
+ service_account = "[email protected]"
+ transitive_dependencies_included = true
+ transitive_dependents_included = true
}
}
Plan: 5 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ release_config_ids = {
+ "main:dev" = (known after apply)
+ "main:prod" = (known after apply)
}
+ repository_ids = {
+ main = (known after apply)
}
+ workflow_config_ids = {
+ "main:dev:main" = (known after apply)
+ "main:prod:main" = (known after apply)
}
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
google_dataform_repository.repositories["main"]: Creating...
google_dataform_repository.repositories["main"]: Creation complete after 0s [id=projects/eshyft-data/locations/us-east4/repositories/main]
google_dataform_repository_release_config.releases["main:dev"]: Creating...
google_dataform_repository_release_config.releases["main:prod"]: Creating...
google_dataform_repository_release_config.releases["main:prod"]: Creation complete after 1s [id=projects/eshyft-data/locations/us-east4/repositories/main/releaseConfigs/prod]
google_dataform_repository_release_config.releases["main:dev"]: Creation complete after 1s [id=projects/eshyft-data/locations/us-east4/repositories/main/releaseConfigs/dev]
google_dataform_repository_workflow_config.workflows["main:dev:main"]: Creating...
google_dataform_repository_workflow_config.workflows["main:prod:main"]: Creating...
google_dataform_repository_workflow_config.workflows["main:dev:main"]: Creation complete after 0s [id=projects/eshyft-data/locations/us-east4/repositories/main/workflowConfigs/dev_main]
google_dataform_repository_workflow_config.workflows["main:prod:main"]: Creation complete after 0s [id=projects/eshyft-data/locations/us-east4/repositories/main/workflowConfigs/prod_main]
Releasing state lock. This may take a few moments...
Apply complete! Resources: 5 added, 0 changed, 0 destroyed.
Outputs:
release_config_ids = {
"main:dev" = "projects/eshyft-data/locations/us-east4/repositories/main/releaseConfigs/dev"
"main:prod" = "projects/eshyft-data/locations/us-east4/repositories/main/releaseConfigs/prod"
}
repository_ids = {
"main" = "projects/eshyft-data/locations/us-east4/repositories/main"
}
workflow_config_ids = {
"main:dev:main" = "projects/eshyft-data/locations/us-east4/repositories/main/workflowConfigs/dev_main"
"main:prod:main" = "projects/eshyft-data/locations/us-east4/repositories/main/workflowConfigs/prod_main"
}
Terragrunt should not be throwing the error as the terraform completes successfully and creates the intended resources
Nice to haves
Terminal output
Screenshots
Versions
Terragrunt version: 0.58.9
OpenTofu/Terraform version: TF 1.8.4
Environment details (Ubuntu 20.04, Windows 10, etc.): Mac OS Monterey 12.7.5 on Mac mini (intel i7 chip). Google terraform providers (main and beta) 5.34.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
yes, that was the issue, by changing that line to schema_suffix = "$$${workspaceName}" the problem disappears. I'm not sure if that is the intended escape sequence, if so it should be documented somewhere (I found it mentinoed in a github issue by searching on similar bugs)
Describe the bug
I have a terragrunt configuration that deploys a terraform module I built for dataform (using the Google cloud beta provider). When I attempt to run terragrunt apply on the configuration it fails with the error:
When I run the debug command it completes/applies successfully:
Steps To Reproduce
Run terragrunt in debug mode
It errors, with output as shown above, then run the terraform debug command
and it completes successfully with the output show above
Expected behavior
Terragrunt should not be throwing the error as the terraform completes successfully and creates the intended resources
Nice to haves
Versions
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: