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 2022/04/25 00:59:38 UTC

[GitHub] [cloudstack-terraform-provider] kohrar commented on issue #32: network_id remains empty after creating IP address resource

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

   Hi @Damans227 -- Thanks for looking into this issue.
   
   > removed the conditional ...
   > `d.Set("network_id", ip.Associatednetworkid)`
   
   Yup, that's exactly what I did. 
   
   Would the network resource I specify make a difference? This is what I do and that also includes the zone and VPC.
   
   ```
   # Create a new VPC 
   resource "cloudstack_vpc" "default" { 
     name = "leo-vpc" 
     display_text = "leo-vpc" 
     cidr = "192.168.0.0/16" 
     vpc_offering = "Default VPC offering" 
     zone = "zone1" 
   } 
    
   # Create a new network in the VPC 
   resource "cloudstack_network" "leosnet" { 
       name = "leo-net" 
       display_text = "leo-net" 
       cidr = "192.168.1.0/24" 
       network_offering = "UnrestrictedIsolatedNetworkOfferingForVpcNetworks" 
       acl_id = "${cloudstack_network_acl.default.id}" 
       vpc_id = "${cloudstack_vpc.default.id}" 
       zone = "zone1" 
   } 
   
   # Create a new public IP address for this network 
   resource "cloudstack_ipaddress" "public_ip" { 
       count = "1" 
    
       vpc_id = "${cloudstack_vpc.default.id}" 
       network_id = "${cloudstack_network.leosnet.id}" 
   } 
   ```
   
   Are you also using the latest version of cloudstack-go when compiling the terraform provider? At the time of my original testing, I had to use https://github.com/tetra12/cloudstack-go as a replacement since the API changed in 4.16 broke a few things. I noticed that the PR was merged last week and I can re-test in the next few days with the latest version of cloudstack-go and see if the behavior remains the same.


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