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/18 20:43:32 UTC
[GitHub] [cloudstack-terraform-provider] hrak opened a new issue #16: How to get the source nat ip address from a network?
hrak opened a new issue #16:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/16
Not so much an issue but a question. In an effort to save IP address usage i want to use the source NAT IP of a network as my public IP instead of requesting another IP through `cloudstack_ipaddress` (and thus wasting a pub IP for every source NAT network).
My network definition:
```
resource "cloudstack_network" "k3s" {
name = "k3s-1"
display_text = "k3s-1"
cidr = "192.168.11.0/24"
network_offering = "e1d6efb7-86a0-443a-afdf-a7a786d75b5f"
zone = "${var.cs_zone}"
source_nat_ip = true
}
```
Now i want to use the source NAT IP as the host in a `provisioner "file"` block, but that doesn't seem to work:
```
provisioner "file" {
source = "stuff/importantfile"
destination = "~/importantfile"
connection {
host = "${cloudstack_network.k3s.source_nat_ip_id.ip_address}"
user = "root"
agent = true
}
}
```
throws a
```
╷
│ Error: Unsupported attribute
│
│ on k3s-master.tf line 67, in resource "null_resource" "provision_master":
│ 67: host = "${cloudstack_network.k3s.source_nat_ip_id.ip_address}"
│
│ Can't access attributes on a primitive-typed value (string).
╵
```
Is there any way to get the source NAT IP address? (not the ID of the source NAT IP address)
--
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] hrak commented on issue #16: How to get the source nat ip address from a network?
Posted by GitBox <gi...@apache.org>.
hrak commented on issue #16:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/16#issuecomment-973846197
If there is no way to transform the source_nat_ip_id into the actual IP address, then i guess there is no way around the additional IP for now. Thanks for your quick reply!
--
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 #16: How to get the source nat ip address from a network?
Posted by GitBox <gi...@apache.org>.
harikrishna-patnala closed issue #16:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/16
--
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 #16: How to get the source nat ip address from a network?
Posted by GitBox <gi...@apache.org>.
harikrishna-patnala commented on issue #16:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/16#issuecomment-987622642
Great, thanks
--
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 #16: How to get the source nat ip address from a network?
Posted by GitBox <gi...@apache.org>.
harikrishna-patnala commented on issue #16:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/16#issuecomment-987601245
Hi @hrak, can we close this issue if there are no further questons
--
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 #16: How to get the source nat ip address from a network?
Posted by GitBox <gi...@apache.org>.
harikrishna-patnala commented on issue #16:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/16#issuecomment-973828682
Network resource does not contain the source nat IP address, so we cannot fetch it from network resource. Terraform provider currently have only one data source for the template, using which we can list a template https://registry.terraform.io/providers/cloudstack/cloudstack/latest/docs/data-sources/template. So I suppose we cannot list public IP addresses.
--
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] hrak commented on issue #16: How to get the source nat ip address from a network?
Posted by GitBox <gi...@apache.org>.
hrak commented on issue #16:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/16#issuecomment-987617391
Yes, it can be closed, thanks.
--
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