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

[Bug]: vapp_network failed after first create #812

Closed
o-presentini opened this issue Nov 6, 2024 · 0 comments · Fixed by #813
Closed

[Bug]: vapp_network failed after first create #812

o-presentini opened this issue Nov 6, 2024 · 0 comments · Fixed by #813
Assignees
Labels
bug Something isn't working community

Comments

@o-presentini
Copy link

o-presentini commented Nov 6, 2024

Terraform Core Version

1.5.7

Cloud Avenue Provider Version

0.20.2

Affected Resource(s)

cloudavenue_vapp_isolated_network

Expected Behavior

Update vapp_network (new static_ip_pool)

Actual Behavior

terraform failed (plan or refresh do the same output error)

Relevant Error/Panic Output Snippet

Failed with error:

│ Error: vApp not found
│ 
│   with module.build_vapps.cloudavenue_vapp_isolated_network.main["opr-vapp-cluster-ceph"],
│   on ../../modules/vapps/main.tf line 23, in resource "cloudavenue_vapp_isolated_network" "main":
│   23: resource "cloudavenue_vapp_isolated_network" "main" {
│ 
│ [ENF] entity not found

Terraform Configuration Files

terraform {
  required_providers {
    cloudavenue = {
      source = "orange-cloudavenue/cloudavenue"
      version = "0.20.2"
    }
    vcd = {
      source = "vmware/vcd"
      version = "3.14.0"
    }
  }
  required_version = ">=1.0"
}

isolated_networks = [
        {
          name                  = "opr-vapp-cluster-ceph"
          cidr                  = "192.168.5.0/24"
          static_ip_pools       = ["192.168.5.20|192.168.5.50","192.168.5.100|192.168.5.150","192.168.5.200|192.168.5.250"]
        }
  ]

resource "cloudavenue_vapp_isolated_network" "main" {

  vdc       = var.vdc_name
  vapp_name   = cloudavenue_vapp.main.name

  for_each = { for net in var.isolated_networks : net.name => net }

  name                  = each.value.name
  gateway               = cidrhost(each.value.cidr, 1)
  netmask               = cidrnetmask(each.value.cidr)
  dns1                  = each.value.dns1
  dns2                  = each.value.dns2
  dns_suffix            = each.value.dns_suffix
  guest_vlan_allowed    = each.value.guest_vlan_allowed
  retain_ip_mac_enabled = each.value.retain_ip_mac_enabled

  static_ip_pool = local.static_ip_pool[each.key]
}

Steps to Reproduce

  1. Create vApp and Networks
  2. Change value in configuration
  3. terraform plan

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@o-presentini o-presentini added the bug Something isn't working label Nov 6, 2024
@azrod azrod added the community label Nov 6, 2024
@azrod azrod self-assigned this Nov 6, 2024
@azrod azrod linked a pull request Nov 6, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community
Projects
None yet
2 participants