Open powellquiring opened 2 years ago
Happened again, I think the instance the floating ip was connected to did not get created on the previous run.
I'm working around this problem, maybe that is contributing, let me look a little harder: https://github.com/IBM-Cloud/terraform-provider-ibm/issues/3740
I was able to reproduce with 1.41, fixed in 1.40
cd /tmp
git clone https://github.com/powellquiring/tfbugs
cd tfbugs/bug-vpc-fip-panic
cp template.local.env local.env
vi local.env; # edit it
terraform init
terraform apply
# panic
See the version.tf to make it work for older releases:
bug-vpc-fip-panic $ cat version.tf
terraform {
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
#version = "< 1.41.0"
version = "= 1.41.0"
}
}
required_version = "= 1.1.9"
}
I have a similar bug with my script. Just try to retrieve my floating IP existing.
data "ibm_is_floating_ip" "front_fip" {
name = local.FLOATING_IP_FRONT_NAME
}
version.tf
terraform {terraform {
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "1.42.0"
}
}
required_version = ">= 1.2.2"
}
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "1.42.0"
}
}
required_version = ">= 1.2.2"
}
_Error: The terraform-provider-ibmv1.42.0 plugin crashed!
I have another problem linked to floating IP. I would like to associate my flooting IP existing to an "ibm_is_public_gateway" or "ibm_is_instance.primary_network_interface" But it doesn't work, even with v1.40
data "ibm_is_floating_ip" "gw_fip" {
name = local.FLOATING_IP_GATEWAY_NAME
}
resource "ibm_is_public_gateway" "maintenance_gateway" {
name = "${local.VPC_ZONE_PREFIX}-gw"
resource_group = data.ibm_resource_group.rg.id
tags = local.TAG
vpc = ibm_is_vpc.vpc.id
zone = var.zone1
--> floating_ip = data.ibm_is_floating_ip.gw_fip or floating_ip = { "id"=data.ibm_is_floating_ip.gw_fip.id }
}
_Tag attribut missing error or existing floating IP don't be associate
and for second try
data "ibm_is_floating_ip" "front_fip" {
name = local.FLOATING_IP_FRONT_NAME
}
resource "ibm_is_instance_network_interface" "front_nic" {
instance = ibm_is_instance.dm-front.id
subnet = ibm_is_subnet.front_subnet.id
security_groups = [ibm_is_security_group.z1_maintenance_sg.id, ibm_is_security_group.z1_front_sg.id]
allow_ip_spoofing = false
floating_ip = data.ibm_is_floating_ip.front_fip.id
name = "eth1"
}
_Error I can create a new nic with existing floating ip but I can't replace with the primary_network_interface of my ibm_isinstance_
Community Note
Terraform CLI and Terraform IBM Provider Version
Running in schematics:
Affected Resource(s)