Closed displague closed 2 weeks ago
A few CI failures here related to VLAN attachment:
Error: POST https://api.equinix.com/metal/v1/ports/b6ade5c2-966a-4707-98b0-e4fea402ffd9/assign: 422 Can't assign vlan, the port is configured for Layer 3
on .terraform/modules/vsphere/main.tf line 98, in resource "metal_port_vlan_attachment" "router_priv_vlan_attach":
98: resource "metal_port_vlan_attachment" "router_priv_vlan_attach" ***
Error: POST https://api.equinix.com/metal/v1/ports/b6ade5c2-966a-4707-98b0-e4fea402ffd9/assign: 422 Can't assign vlan, the port is configured for Layer 3
on .terraform/modules/vsphere/main.tf line 105, in resource "metal_port_vlan_attachment" "router_pub_vlan_attach":
105: resource "metal_port_vlan_attachment" "router_pub_vlan_attach" ***
rerunning test after failure due to no c3.smalls in sv15
It appears that reserved_ip_count
is present in the subnet dictionary, when it previously was not:
https://github.com/equinix/terraform-metal-anthos-on-vsphere/pull/127/checks#step:14:1260
I'm thinking that the typed variable changes here are leading to {"reserved_ip_count": null}
in the json.
https://github.com/equinix/terraform-metal-anthos-on-vsphere/blob/vsphere-module-3.0.0/variables.tf#L49
I'll update the PR to check for if subnet.get("reserved_ip_count") is not None:
at https://github.com/equinix/terraform-metal-vsphere/blob/v3.0.0/templates/pre_reqs.py#L117
We'll need to use https://registry.terraform.io/providers/hashicorp/local/latest/docs/data-sources/file rather that file(some_user_variable)
.
╷
│ Error: Invalid function argument
│
│ on 32-anthos-pre-reqs.tf line 16, in resource "null_resource" "anthos_pre_reqs":
│ 16: private_key = file(module.vsphere.ssh_key_path)
│ ├────────────────
│ │ module.vsphere.ssh_key_path is "$HOME/.ssh/marques-anthos-project-9wtgd-key"
│
│ Invalid value for "path" parameter: no file exists at $HOME/.ssh/marques-anthos-project-9wtgd-key; this function works only with files that are distributed as part of the
│ configuration source code, so if this file will be created by a resource in this configuration you must instead obtain this result from an attribute of that resource.
╵
╷
│ Error: Invalid function argument
│
│ on 33-anthos-deploy-admin-workstation.tf line 67, in resource "null_resource" "anthos_deploy_workstation":
│ 67: private_key = file(module.vsphere.ssh_key_path)
│ ├────────────────
│ │ module.vsphere.ssh_key_path is "$HOME/.ssh/marques-anthos-project-9wtgd-key"
│
│ Invalid value for "path" parameter: no file exists at $HOME/.ssh/marques-anthos-project-9wtgd-key; this function works only with files that are distributed as part of the
│ configuration source code, so if this file will be created by a resource in this configuration you must instead obtain this result from an attribute of that resource.
╵
Signed-off-by: Marques Johansson mjohansson@equinix.com