kohrar commented on issue #32:
URL: 
https://github.com/apache/cloudstack-terraform-provider/issues/32#issuecomment-2000422662

   @vishesh92 I don't think that's a valid solution. There are cases where I 
need to specify both VPC and network ID. For instance, when I need to assign a 
public IP address to a specific network within a specific VPC.
   
   Not specifying both results in an error. Here's an example:
   
   ```
   │ Error: Error associating a new IP address: Undefined error: 
{"errorcode":431,"errortext":"Can't assign ip to the network directly when 
network belongs to VPC.Specify vpcId to associate ip address to VPC"}
   │
   │   with cloudstack_ipaddress.test_public_ip,
   │   on guacamole.tf line 151, in resource "cloudstack_ipaddress" 
"test_public_ip":
   │  151: resource "cloudstack_ipaddress" "test_public_ip" {
   │
   ```
   
   This is what I'm using:
   
   ```
   resource "cloudstack_ipaddress" "test_public_ip" {
       # vpc_id = "${cloudstack_vpc.default.id}"
       network_id = "${cloudstack_network.guacamole-net.id}"
       zone = "zone1"
   
       project = "${var.cloudstack_project_id}"
   }
   ```


-- 
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-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to