Closed cdino closed 1 year ago
Hi @cdino. Thank you for opening this issue and raising awareness.
With this PR https://github.com/maas/terraform-provider-maas/pull/92, the new version of gomaasclient
is used by the provider, which includes a fix on the parsing of field raids
among others.
Could you please try the new version of the provider 1.3.0
and let me know if the problem persists?
Hi, thanks for the update! Seems that the parsing issue is gone.. but now i have a permission error:
╷
│ Error: ServerError: 401 Unauthorized (Forbidden)
│
│ with maas_network_interface_physical.machine1_nic1,
│ on main.tf line 36, in resource "maas_network_interface_physical" "machine1_nic1":
│ 36: resource "maas_network_interface_physical" "machine1_nic1" {
│
╵
Here the code I'm using:
#
# Machine 1
#
resource "maas_machine" "machine1" {
power_type = "ipmi"
power_parameters = {
power_address = "x.y.z.k"
mac_address = "xx:xx:xx:xx:xx:xx"
power_user = "admin"
power_pass = "pass"
privilege_level = "ADMIN"
}
pxe_mac_address = "xx:xx:xx:xx:xx:xx"
hostname = "node018"
domain = "domain.com"
pool = "pool"
zone = "zone1"
}
resource "maas_network_interface_physical" "machine1_nic1" {
machine = maas_machine.machine1.id
mac_address = "xx:xx:xx:xx:xx:xx"
#name = "ens192"
vlan = 5006 #MAAS ID workaround... data is not working
}
resource "maas_network_interface_link" "machine1_nic1" {
machine = maas_machine.machine1.id
network_interface = maas_network_interface_physical.machine1_nic1.id
subnet = 4 #MAAS ID workaround... data is not working
mode = "STATIC"
ip_address = "x.y.z.k"
default_gateway = true
}
Hi @cdino. This new error appears to be a different one than the correct parsing. Could you please issue a new api_key
and retry? If you are still receiving it, please open a new issue so we can investigate further.
I'm testing Terraform with MAAS and I'm facing an issue:
Here is my code
provider.tf
:main.tf
:I'm getting these errors:
Terraform version:
and