Terraform v1.5.3
on linux_arm64
+ provider registry.terraform.io/hashicorp/google v4.73.1
resource "google_compute_router" "myvpc-router" {
bgp {
advertise_mode = "CUSTOM"
advertised_ip_ranges {
range = "10.161.0.0/16"
}
asn = "0"
keepalive_interval = "20"
}
encrypted_interconnect_router = "false"
name = "myvpc-router"
network = data.terraform_remote_state.common.outputs.network_myvpc_link
project = var.project
region = var.region
}
╷
│ Error: expected "bgp.0.asn" to be a RFC6996-compliant Local ASN:
│ must be either in the private ASN ranges: [64512..65534], [4200000000..4294967294];
│ or be the value of [16550], got 0
│
│ with module.routers.google_compute_router.myvpc-router,
│ on google/routers/compute_router.tf line 9, in resource "google_compute_router" "myvpc-router":
│ 9: asn = "0"
│
╵
Terraform throws an error.
Community Note
modular-magicianuser, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Output
Expected Behavior
tf planshould accept the router definition in the tf code, because the router exists, exactly as described by the TF code:Actual Behavior
Terraform throws an error.
Steps to Reproduce
terraform planto check against actual definition beforeterraform importImportant Factoids
References