cloudstack-terraform-provider icon indicating copy to clipboard operation
cloudstack-terraform-provider copied to clipboard

Cannot create acl_rule - Root resource was present, but now absent.

Open AlexanderKgr opened this issue 1 year ago • 3 comments

Trying to create some networks with acl rules When i run terraform plan everything is ok, but when i run terraform apply i have the following error.

image

Can you help me pinpoint the issue or it is a bug?

My VPC config image

My ACL config image

My ACL_rule config image

Thanks in advance

AlexanderKgr avatar Jul 02 '24 10:07 AlexanderKgr

@AlexanderKgr what is the Cloudstack version and Cloudstack terraform provider version you are using

I am not facing the issue with the latest terraform release of 0.5 release and cloudstack version 4.19


terraform {
  required_providers {
    cloudstack = {
      source = "cloudstack/cloudstack"
      version = "0.5.0"
    }
  }
}


resource "cloudstack_vpc" "default" {
  name         = "test-vpc"
  cidr         = "10.0.0.0/16"
  vpc_offering = "Default VPC Offering"
  zone         = "ref-trl-7435-k-Mol8-kiran-chavala"
  network_domain = "kirantest"
  project = "4f756ff5-25b8-4e0a-9b13-914bae550133"
}

output "vpc_id" {
   value= cloudstack_vpc.default.id
  
}


resource "cloudstack_network_acl" "default" {
  name   = "test-acl"
  vpc_id = cloudstack_vpc.default.id
}

output "acl_id" {
   value= cloudstack_network_acl.default.id   
}

resource "cloudstack_network_acl_rule" "default" {
  acl_id = cloudstack_network_acl.default.id

  rule {
    action       = "allow"
    cidr_list    = ["10.0.0.0/8"]
    protocol     = "tcp"
    ports        = ["80", "1000-2000"]
    traffic_type = "ingress"
  }
}

kiranchavala avatar Oct 03 '24 07:10 kiranchavala

@AlexanderKgr what is the Cloudstack version and Cloudstack terraform provider version you are using

I am not facing the issue with the latest terraform release of 0.5 release and cloudstack version 4.19


terraform {
  required_providers {
    cloudstack = {
      source = "cloudstack/cloudstack"
      version = "0.5.0"
    }
  }
}


resource "cloudstack_vpc" "default" {
  name         = "test-vpc"
  cidr         = "10.0.0.0/16"
  vpc_offering = "Default VPC Offering"
  zone         = "ref-trl-7435-k-Mol8-kiran-chavala"
  network_domain = "kirantest"
  project = "4f756ff5-25b8-4e0a-9b13-914bae550133"
}

output "vpc_id" {
   value= cloudstack_vpc.default.id
  
}


resource "cloudstack_network_acl" "default" {
  name   = "test-acl"
  vpc_id = cloudstack_vpc.default.id
}

output "acl_id" {
   value= cloudstack_network_acl.default.id   
}

resource "cloudstack_network_acl_rule" "default" {
  acl_id = cloudstack_network_acl.default.id

  rule {
    action       = "allow"
    cidr_list    = ["10.0.0.0/8"]
    protocol     = "tcp"
    ports        = ["80", "1000-2000"]
    traffic_type = "ingress"
  }
}

i am using cloudstack 4.19.1.1 and terraform 0.5. in next days i will try to deploy again and report again

AlexanderKgr avatar Oct 03 '24 07:10 AlexanderKgr

@AlexanderKgr what is the Cloudstack version and Cloudstack terraform provider version you are using I am not facing the issue with the latest terraform release of 0.5 release and cloudstack version 4.19


terraform {
  required_providers {
    cloudstack = {
      source = "cloudstack/cloudstack"
      version = "0.5.0"
    }
  }
}


resource "cloudstack_vpc" "default" {
  name         = "test-vpc"
  cidr         = "10.0.0.0/16"
  vpc_offering = "Default VPC Offering"
  zone         = "ref-trl-7435-k-Mol8-kiran-chavala"
  network_domain = "kirantest"
  project = "4f756ff5-25b8-4e0a-9b13-914bae550133"
}

output "vpc_id" {
   value= cloudstack_vpc.default.id
  
}


resource "cloudstack_network_acl" "default" {
  name   = "test-acl"
  vpc_id = cloudstack_vpc.default.id
}

output "acl_id" {
   value= cloudstack_network_acl.default.id   
}

resource "cloudstack_network_acl_rule" "default" {
  acl_id = cloudstack_network_acl.default.id

  rule {
    action       = "allow"
    cidr_list    = ["10.0.0.0/8"]
    protocol     = "tcp"
    ports        = ["80", "1000-2000"]
    traffic_type = "ingress"
  }
}

i am using cloudstack 4.19.1.1 and terraform 0.5. in next days i will try to deploy again and report again

@AlexanderKgr Were you able to deploy again and verify if this is still an issue for you or not?

CodeBleu avatar Dec 16 '24 15:12 CodeBleu

@AlexanderKgr I am closing the issue due to inactivity, and as the issue is not reproducible to me

Please be free to reopen the issue

kiranchavala avatar Aug 18 '25 16:08 kiranchavala