Closed tightly-clutched closed 2 years ago
Hi @tightly-clutched! Can you remove the =
sign after bgp
and see if that works?
I tried the suggestion and terraform plan
still failed. The documentation seems to clearly be wrong.
% terraform plan
Running plan in the remote backend. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the plan running remotely.
Preparing the remote plan...
The remote workspace is configured to work with configuration at
vpc/stage relative to the target repository.
Terraform will upload the contents of the following directory,
excluding files or directories as defined by a .terraformignore file
at /Users/mike.james/Github/terraformCloudGCP/.terraformignore (if it is present),
in order to capture the filesystem context the remote workspace expects:
/Users/mike.james/Github/terraformCloudGCP
Waiting for the plan to start...
Terraform v0.13.5
Configuring remote state backend...
Initializing Terraform configuration...
Error: Unsupported block type
on main.tf line 208, in module "cloud_router-ue4":
208: bgp {
Blocks of type "bgp" are not expected here. Did you mean to define argument
"bgp"? If so, use the equals sign to assign it a value.
Hey @tightly-clutched. Sorry for the late reply. Can you try adding =
after both bgp
and advertised_ip_ranges
and see if that works.
bgp = {
asn = 65000
advertise_mode = "CUSTOM"
advertised_groups = ["ALL_SUBNETS"]
advertised_ip_ranges = {
description = "aws subnets"
range = "10.0.0.0/16"
}
}
Sorry that I missed the fact that you were using modules. Our documentation provides the examples of configuration using resources. So sometimes the format of it may be a little different from using modules, depends on how modules define. It looks like that https://github.com/terraform-google-modules/terraform-google-cloud-router does not provide an example of how to use advertised_ip_ranges
. If adding =
is not working in your case, I would suggest you file an issue against https://github.com/terraform-google-modules/terraform-google-cloud-router to ask for example/clarification of how to configure advertised_ip_ranges
.
Hi, @shuyama1 . I tried it with and without the "=" signs and I can't get the advertised_ip_ranges to configure correctly. I'm taking your suggestion to file and issue with the module maintainers. I appreciate your help!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
modular-magician
user, 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
% terraform -v Terraform v0.13.5
Affected Resource(s)
google_compute_router
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
I expected that the advertised_ip_ranges would be included in the plan, since I'm following the example shown on the module page here: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_router which does not have an "=" sign.
Actual Behavior
Steps to Reproduce
I remove
advertised_ip_ranges
and plan works without error. Re-inserting it produces the same error.Important Factoids
I guess I wonder if this is version-dependent and if advertised_ip_ranges was not supported in my configuration?
References