Hi Brad

I am not facing the issue , here is the terraform config that I have used

screenshot


https://prnt.sc/8FOLXkgwmYWm

---------

resource "cloudstack_ipaddress" "bastion" {
  vpc_id = "b12facb3-5787-4ce9-bee2-0ea8d676e26d"
  zone   = "fe54a4ca-6ca8-4ac9-9769-dbc1244f138b"
}

resource "cloudstack_port_forward" "bastion" {
  ip_address_id = cloudstack_ipaddress.bastion.id

  forward {
    protocol           = "tcp"
    private_port       = 22
    public_port        = 5022
    virtual_machine_id = "92e55318-2ae3-457c-811a-d6885efb381c"
  }
  depends_on = [
    cloudstack_ipaddress.bastion
  ]
}



terraform apply

Terraform used the selected providers to generate the following execution plan. 
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # cloudstack_ipaddress.bastion will be created
  + resource "cloudstack_ipaddress" "bastion" {
      + id            = (known after apply)
      + ip_address    = (known after apply)
      + is_portable   = false
      + is_source_nat = (known after apply)
      + project       = (known after apply)
      + tags          = (known after apply)
      + vpc_id        = "b12facb3-5787-4ce9-bee2-0ea8d676e26d"
      + zone          = "fe54a4ca-6ca8-4ac9-9769-dbc1244f138b"
    }

  # cloudstack_port_forward.bastion will be created
  + resource "cloudstack_port_forward" "bastion" {
      + id            = (known after apply)
      + ip_address_id = (known after apply)
      + managed       = false

      + forward {
          + private_end_port   = (known after apply)
          + private_port       = 22
          + protocol           = "tcp"
          + public_end_port    = (known after apply)
          + public_port        = 5022
          + uuid               = (known after apply)
          + virtual_machine_id = "92e55318-2ae3-457c-811a-d6885efb381c"
            # (1 unchanged attribute hidden)
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

cloudstack_ipaddress.bastion: Creating...
cloudstack_ipaddress.bastion: Creation complete after 1s 
[id=ae73e8e4-93ea-46de-95ff-eece5828cdb5]
cloudstack_port_forward.bastion: Creating...
cloudstack_port_forward.bastion: Creation complete after 5s 
[id=ae73e8e4-93ea-46de-95ff-eece5828cdb5]




Regards
kiran



 

From: Brad House <[email protected]>
Date: Tuesday, 30 September 2025 at 10:42 PM
To: [email protected] <[email protected]>
Subject: Re: [VOTE] Release Apache CloudStack Terraform Provider v0.6.0 RC-2
It appears port forwarding is still broken even though this discussion
indicated it was fixed:

https://github.com/apache/cloudstack-terraform-provider/issues/227

$ terraform init -upgrade
...
Initializing provider plugins...
- Finding cloudstack/cloudstack versions matching "0.6.0-rc2"...
- Installing cloudstack/cloudstack v0.6.0-rc2...
- Installed cloudstack/cloudstack v0.6.0-rc2 (self-signed, key ID
7B3F1C5E93F97FAB)



Terraform will perform the following actions:

   # cloudstack_port_forward.bastion will be created
   + resource "cloudstack_port_forward" "bastion" {
       + id            = (known after apply)
       + ip_address_id = "02aae2fe-ae43-4030-8123-8967931fd7e1"
       + managed       = false

       + forward {
           + private_end_port   = (known after apply)
           + private_port       = 22
           + protocol           = "tcp"
           + public_end_port    = (known after apply)
           + public_port        = 5022
           + uuid               = (known after apply)
           + virtual_machine_id = "bebcac94-65f5-4c73-8586-e6e860bcc17e"
             # (1 unchanged attribute hidden)
         }
     }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
   Terraform will perform the actions described above.
   Only 'yes' will be accepted to approve.

   Enter a value: yes

cloudstack_port_forward.bastion: Creating...
cloudstack_port_forward.bastion: Still creating... [00m10s elapsed]
cloudstack_port_forward.bastion: Still creating... [00m20s elapsed]
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to cloudstack_port_forward.bastion, provider
"provider[\"registry.terraform.io/cloudstack/cloudstack\"]" produced an
unexpected new value: Root object
│ was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the
provider's own issue tracker.
╵

On 9/30/25 5:30 AM, Kiran Chavala wrote:
> Hi ALL
>
> I've created a CloudStack Terraform Provider release candidate for version
> 0.6.0, with the following artefacts up for a vote:
>
> Git Branch and Commit SH:
>
> https://github.com/cloudstack/terraform-provider-cloudstack
>
> Commit: 919a358fcc951724c2364ee363a9a055258b1fc3
>
> Source release (checksums and signatures are available at the same
> location):
>
> https://dist.apache.org/repos/dist/dev/cloudstack/cloudstack-terraform-provider-0.6.0/
>
> PGP release keys (signed using E03379CB066175FAC2BC9E027B3F1C5E93F97FAB):
>
> https://dist.apache.org/repos/dist/release/cloudstack/KEYS
>
> For testing/voting purposes, you can use the provider
>
> terraform {
>    required_providers {
>      cloudstack = {
>        source = "cloudstack/cloudstack"
>        version = "0.6.0-rc2"
>      }
>    }
> }
>
>
>
> Vote will be open for 72 hours.
>
> For sanity in tallying the vote, can PMC members please be sure to indicate
> "(binding)" with their vote?
>
> [ ] +1  approve
> [ ] +0  no opinion
> [ ] -1  disapprove (and reason why)
>

Reply via email to