Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google_compute_instance nat_ip #189

Open
FredericHeem opened this issue Jun 25, 2021 · 1 comment
Open

google_compute_instance nat_ip #189

FredericHeem opened this issue Jun 25, 2021 · 1 comment
Labels
Type: Bug Something isn't working

Comments

@FredericHeem
Copy link

General information:

  • Terracognita version / tag:
$ terracognita version
The current version is: v0.6.4
  • Did you build Terracognita from sources or did you use the Docker image:
    brew install terracognita

Describe the bug:

The generated code for google_compute_instance contains the extraneous field networkInterfaces[0].accessConfigs[0].natIP which causes an issue when deploying

Log message

Error: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0].accessConfigs[0].natIP': '34.91.94.74'. The specified external IP address '34.91.94.74' was not found in region 'europe-west4'., invalid

  on resources.tf line 25, in resource "google_compute_instance" "ZipaG":
  25: resource "google_compute_instance" "ZipaG" {

When this field is removed, terraform apply is successful.

@FredericHeem FredericHeem added the Type: Bug Something isn't working label Jun 25, 2021
@xescugc
Copy link
Member

xescugc commented Jul 9, 2021

For what I can see this is "valid", you can set that value https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#nat_ip so it's not an issue that we are setting an Attribute(https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#attributes-reference). I was just checking and discarding things hehe.

The issue is that the value is "invalid" but that value was returned from the API so it was read from Google. IDK how we are reading a value that is "invalid", is it possible that something else is invalid/missing on the google_compute_instance so terraform apply cannot make the right link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants