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

network_interface_physical resource is not idempotent - terraform apply fails #238

Open
amehub opened this issue Oct 18, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@amehub
Copy link

amehub commented Oct 18, 2024

Terraform v1.9.6-dev
on linux_amd64

terraform {
required_providers {
maas = {
source = "maas/maas"
version = "~>2.0"
}
}
}

--

This network_interface_physical resource type is not idempotent. A terraform apply will recreate all network_interface_physical resources. But the kicker is when it tries to do it on interfaces attached to deployed machines it fails and terraform blows up so that resources later in the terraform tf files do not get appplied. End up with a half applied terraform :-( It is understandable that modifying interfaces on deployed machines is not allowed. However, this resource should not be recreating anything that has not changed.

Request
network_interface_physical resource to be idempotent and behave as one would expect of a terraform resource

If the machine datasource included the machine status; Ready, Deployed etc we could maybe work around this issue by checking machine status and conditionally applying the network_interface_physical resource.

@SK1Y101 SK1Y101 added bug Something isn't working enhancement New feature or request labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants