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

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

Open
AlexanderKgr opened this issue Jul 2, 2024 · 3 comments
Open
Assignees
Labels
question Further information is requested
Milestone

Comments

@AlexanderKgr
Copy link

AlexanderKgr commented Jul 2, 2024

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

@kiranchavala
Copy link
Collaborator

@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 kiranchavala self-assigned this Oct 3, 2024
@kiranchavala kiranchavala added the question Further information is requested label Oct 3, 2024
@AlexanderKgr
Copy link
Author

@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

@rohityadavcloud rohityadavcloud added this to the v0.6.0 milestone Oct 20, 2024
@CodeBleu
Copy link
Collaborator

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants