Skip to content

Race condition, when replacing a network range. #492

@SirTeddy99

Description

@SirTeddy99

I get race condition when trying to delete a network ["10.0.0.0/24"] and create a network ["10.0.0.0/28"]

# infoblox_ipv4_network.infoblox_subnet["10.0.0.0/24"] will be destroyed
# infoblox_ipv4_network.infoblox_subnet["10.0.0.0/28"] will be created

What happens now is when apply runs: the network ["10.0.0.0/28"] will be created first, and while doing that the network ["10.0.0.0/24"] will be promoted to network container, making it jump out of terraform state and when it then tries to destroy it, it cant be found...

│ Error: Deletion of Network block failed from network view(example): WAPI request error: 404('404 Not Found')
│ Contents:
│ { "Error": "AdmConDataNotFoundError: Reference network/<refcode>:10.0.0.0/24/example not found", 
│   "code": "Client.Ibap.Data.NotFound", 
│   "text": "Reference network/<refcode>:10.0.0.0/24/example not found"
│ }

I then need to go in and manually delete the promoted network container["10.0.0.0/24"] in infoblox in order to make terraform happy again

What I would hope to happen is terraform provider destroy before creating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions