-
Notifications
You must be signed in to change notification settings - Fork 30
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
Error on plan after migration v1.0.0 on link public IP #469
Comments
Hi @sylvain987, sed -i '/"link_public_ip": {/, /},/d' terraform.tfstate
sed -i '/"link_nic": {/, /},/d' terraform.tfstate Have a look on terraform-provider-outscale Readme for migration |
Hello, This is the sed commands that I applied on all configurations and check on your migration guide :
On all configurations, Terraform create a parameter call link_public_ip with a empty content on NIC resource. If I apply again the 2 sed commands and make a plan, I have the same result :
|
Hi @sylvain987, After
you will still get # module.VM["VM-PPROD-FRONT-PRE-AZa-NGINX-01"].outscale_nic.NIC-VM will be updated in-place
~ resource "outscale_nic" "NIC-VM" {
id = "eni-dcc8df38"
+ link_public_ip = (known after apply)
# (14 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# module.VM["VM-PPROD-FRONT-PRE-AZb-NGINX-02"].outscale_nic.NIC-VM will be updated in-place
~ resource "outscale_nic" "NIC-VM" {
id = "eni-9e3e7a9e"
+ link_public_ip = (known after apply)
# (14 unchanged attributes hidden)
# (1 unchanged block hidden)
} But it will be OK after In the state of terraform-plugin under ....
link_nic = {
"delete_on_vm_deletion" = "false"
"device_number" = "0"
"link_nic_id" = null
"state" = null
"vm_account_id" = null
"vm_id" = null
}
link_public_ip = {
"link_public_ip_id" = null
"public_dns_name" = null
"public_ip" = null
"public_ip_account_id" = null
"public_ip_id" = null
}
..... In ....
link_nic = []
link_public_ip = []
.... Best Regards, |
Hi, I make a terraform refresh before terraform plan but I have the same error :
By default, the state is on Gitlab. So my migration procedure is a little bit different :
I can restore a old version of the state before the sed commands. Regards. |
@sylvain987 With your migration procedure, is the refresh/plan working correctly now ? |
Hi, No. I have the same error. Regards. |
Ok, thank you. We are not able to reproduce the issue. Do you have the possibility to test your configuration without using GitLab, just to be sure it is not the cause? |
Hello, I tested without Gitlab (on a local state file). I have the same error (to make the test without Gitlab, I create a POC VM) : Planning failed. Terraform encountered an error while generating this plan. ╷ Do you want to check the state file without the secrets of course to continue the debug ? Regards. |
Yes, state file will be useful. Thank you for your patience. |
Hello, This is the state : terraform.tfstate.txt I add again the error after the plan :
Regards. |
Hi @sylvain987, We found the error: Thanks a lot. Best Regards, |
Hello, |
Hello @sylvain987 , |
Nice, thank you. |
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
Expected Behavior
After the migration and make a plan, no error.
Actual Behavior
After the migration and make a plan on a VM with public IP, error.
Steps to Reproduce
I make the migration procedure in "https://github.com/outscale/terraform-provider-outscale" on the chapter "Migration to v1"
Additional Context
Before to migrate on 1.0.0, if needed, we connected public IP through the tag osc.fcu.eip.auto-attach. All plans has even if no public IP. SInce the migration, if the VM has no public IP, no problem. But if the VM has a public IP connected, there is the error in the Crash Output.
References
conf-main.tf.txt
conf-variables.tf.txt
conf-vm.auto.tfvars.txt
module-data.tf.txt
module-locals.tf.txt
module-main.tf.txt
module-variables.tf.txt
The text was updated successfully, but these errors were encountered: