You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/11/29 00:40:25 UTC
[GitHub] [cloudstack-terraform-provider] synergiator opened a new issue #21: Can't create port forwarding rule
synergiator opened a new issue #21:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/21
With this code fragment,
```
resource "cloudstack_port_forward" "default" {
ip_address_id = cloudstack_ipaddress.my_ip.id
forward {
protocol = "tcp"
private_port = 22
public_port = 22
virtual_machine_id = cloudstack_instance.my_vm.id
}
}
```
I constantly get this error (API 4.11)
```
module.vpc01.cloudstack_network.private[0]: Refreshing state... [id=fbc1a148-d2e3-4b35-ae1c-1ed8c4973829]
module.vpc01.cloudstack_ipaddress.my_ip: Refreshing state... [id=65231fc6-97a4-4370-9f65-59b38de81cdb]
module.vpc01.cloudstack_instance.my_vm: Refreshing state... [id=1d25e677-47d6-484e-a3c9-c1a54b5cfe42]
╷
│ Error: insufficient items for attribute "forward"; must have at least 1
│
│ with module.vpc01.cloudstack_port_forward.default,
│ on ../modules/core/customvpc/main.tf line 55, in resource "cloudstack_port_forward" "default":
│ 55: resource "cloudstack_port_forward" "default" {
│
```
Which item is meant to be missing here - the VM ID? Could it be some synchronization problem? - but, the IDs of the VM and the IP are actually there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack-terraform-provider] harikrishna-patnala commented on issue #21: Can't create port forwarding rule
Posted by GitBox <gi...@apache.org>.
harikrishna-patnala commented on issue #21:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/21#issuecomment-981411662
@synergiator on the first try of creating port forwarding rule, I did not find any issue it got successfully created.
Then I tried few more scenarios to purposefully make it fail, so I have applied static nat on the IP and applied PF again then it failed with proper error "loudStack API error 431 (CSExceptionErrorCode: 4350): Unable to create port forwarding rule; ip id=6 has static nat enabled"
Upon retry of apply PF rule I've faced the issue that you reported which is "Error: insufficient items for attribute "forward"; must have at least 1". Then I found the issue.
The issue issue is, upon PF rule creation failure, provider is adding the details to terraform state. So upon retry it is not finding any difference since terraform state already has it. I'll work on this to fix the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack-terraform-provider] harikrishna-patnala commented on issue #21: Can't create port forwarding rule
Posted by GitBox <gi...@apache.org>.
harikrishna-patnala commented on issue #21:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/21#issuecomment-987779393
Closing this issue as the related PR is merged
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack-terraform-provider] harikrishna-patnala closed issue #21: Can't create port forwarding rule
Posted by GitBox <gi...@apache.org>.
harikrishna-patnala closed issue #21:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/21
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org