Error 142 when default labels are applied
bjtox opened this issue · 3 comments
bjtox commented
TL;DR
i have set provider google to use default labels
when i try to appli it on module i receive this error
Error: Error updating VpnTunnel "xxx": googleapi: Error 412: Labels fingerprint either invalid or resource labels have changed, conditionNotMet
Expected behavior
i will expect vpn tunnel must be labeled with correct labels
Observed behavior
No response
Terraform Configuration
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~>5"
}
}
}
provider "google" {
project = var.gcp_project_id
region = var.gcp_region
credentials = var.gcp_credentials_local_path
default_labels = module.labels.default_labels
}
provider "google-beta" {
project = var.gcp_project_id
region = var.gcp_region
credentials = var.gcp_credentials_local_path
default_labels = module.labels.default_labels
}
module "vpn-static" {
source = "terraform-google-modules/vpn/google"
version = "~> 4"
project_id = var.gcp_project_id
network = var.vpc_id
region = var.gcp_region
gateway_name = format("%s-%s-%s",local.gcp_resources_prefix,var.vpn_gateway_name,"vpn-classic-gtw")
tunnel_name_prefix = format("%s-%s",local.gcp_resources_prefix,var.vpn_gateway_name)
shared_secret = random_password.password.result
tunnel_count = 1
ike_version = 2
peer_ips = var.vpn_external_gateway_ips
local_traffic_selector = var.vpn_local_subnet_cidrs
route_priority = 900
remote_subnet = var.vpn_remote_subnets
}
Terraform Version
1.4.5
Additional information
No response
joelsdc commented
This is also happening with:
Terraform v1.6.2
+ provider registry.terraform.io/hashicorp/google v5.10.0
joelsdc commented
I think this could be related: hashicorp/terraform-provider-google#16661
github-actions commented
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days