AR
Size: a a a
AR
S
module.zabbixdb.module.db_parameter_group.aws_db_parameter_group.this[0]: Creating...
Error: Error modifying DB Parameter Group: InvalidParameterCombination: cannot use immediate apply method for static parameter
status code: 400, request id: 5ca2fa8f-5989-40be-94cf-ab9fc086b77a
on .terraform/modules/zabbixdb/modules/db_parameter_group/main.tf line 33, in resource "aws_db_parameter_group" "this":
33: resource "aws_db_parameter_group" "this" {
z
terraform {
backend "gcs" {
credentials = var.credentials
bucket = var.backet
prefix = var.prefix
}
}
Error: Variables not allowed
z
VT
terraform {
backend "gcs" {
credentials = var.credentials
bucket = var.backet
prefix = var.prefix
}
}
Error: Variables not allowed
z
VT
VT
Hi all,
Terraform cannot support arbitrary expressions in the backend block because the configuration inside it must be processed to even retrieve the latest state snapshot, and the latest state snapshot is required in order to evaluate expressions.
If you are using Terraform in an environment where statically configuring the location of your workspaces is not appropriate or where the location can be determined systematically by some transform from some other known value, you can omit the settings in question from the Terraform configuration altogether and provide them on the terraform init command line using the -backend-config argument. By running Terraform in automation you can put the logic for determining those settings in an external script and make it do whatever you want using information locally available on the system.
We have no plan to support arbitrary expressions in the backend block because it is technically impossible: the backend stores the state and the state is needed to evaluate expressions, so something has to be statically configured in order to give Terraform a starting point to fetch the data it needs for the rest of the work.
VT
VT
z
DK
DK
i
i
z
terraform init -backend-config settings/production/backend.tf
Warning: Missing backend configuration
-backend-config was used without a "backend" block in the configuration.
backend.tf
terraform {
backend "gcs" {
credentials = "production.json"
bucket = "tf-state-production"
prefix = "production/state"
}
}
AC
AC
i
i