Comments (5)
If you look closely you see that vpc_offering
of myvpc
is causing the VPC to be recreated. You would also get this without changing your config (so without adding newnetwork
), and just running another apply
after your initial deployment.
The problem is that CloudStack accepts the name Default VPC Offering
, but the actual name of the offering is Default VPC offering
(notice that offering
starts with a small caps o
). So every next time you compare the actual state against your config, Terraform will see this as a diff (as they are actually different strings) of a field that you cannot update so it will recreate the resource.
If you change the o
in your config, your problem should be gone...
from terraform-provider-cloudstack.
@snooops I cannot reproduce this. Would it be possible that you add the output of terraform show
after creating the vpc, public and network1 networks and before adding the newnetwork?
And then please also add the output of terraform plan
, just after adding the newnetwork config to your main.tf (so before running terraform apply
).
Hopefully that will give me some insights to work with...
from terraform-provider-cloudstack.
Here is the output of terraform plan
-/+ cloudstack_network.network1 (new resource required)
acl_id: "ebefcc96-75f5-11e7-adb3-e2bd27d4977e" => "ebefcc96-75f5-11e7-adb3-e2bd27d4977e"
cidr: "10.230.1.0/24" => "10.230.1.0/24"
display_text: "network1" => "<computed>"
endip: "" => "<computed>"
gateway: "10.230.1.1" => "10.230.1.1"
name: "network1" => "network1"
network_domain: "cs1ecloud.internal" => "<computed>"
network_offering: "VPC Default Network" => "VPC Default Network"
project: "Meyer_TF" => "Meyer_TF"
startip: "" => "<computed>"
tags.%: "0" => "<computed>"
vpc_id: "3aca8fdf-147f-4d41-ac3b-ed92b2641531" => "${cloudstack_vpc.myvpc.id}" (forces new resource)
zone: "Germany" => "Germany"
+ cloudstack_network.newnetwork
acl_id: "ebefcc96-75f5-11e7-adb3-e2bd27d4977e"
cidr: "10.230.1.0/24"
display_text: "<computed>"
endip: "<computed>"
gateway: "10.230.1.1"
name: "network1"
network_domain: "<computed>"
network_offering: "VPC Default Network"
project: "Meyer_TF"
startip: "<computed>"
tags.%: "<computed>"
vpc_id: "${cloudstack_vpc.myvpc.id}"
zone: "Germany"
-/+ cloudstack_network.public (new resource required)
acl_id: "ebefcc96-75f5-11e7-adb3-e2bd27d4977e" => "ebefcc96-75f5-11e7-adb3-e2bd27d4977e"
cidr: "10.230.200.0/24" => "10.230.200.0/24"
display_text: "public" => "<computed>"
endip: "" => "<computed>"
gateway: "10.230.200.1" => "<computed>"
name: "public" => "public"
network_domain: "cs1ecloud.internal" => "<computed>"
network_offering: "Default VPC Network with LB" => "Default VPC Network with LB"
project: "Meyer_TF" => "Meyer_TF"
startip: "" => "<computed>"
tags.%: "0" => "<computed>"
vpc_id: "3aca8fdf-147f-4d41-ac3b-ed92b2641531" => "${cloudstack_vpc.myvpc.id}" (forces new resource)
zone: "Germany" => "Germany"
-/+ cloudstack_vpc.myvpc (new resource required)
cidr: "10.230.0.0/16" => "10.230.0.0/16"
display_text: "myvpc" => "<computed>"
name: "myvpc" => "myvpc"
network_domain: "cs1ecloud.internal" => "<computed>"
project: "Meyer_TF" => "Meyer_TF"
source_nat_ip: "81.17.104.23" => "<computed>"
vpc_offering: "Default VPC offering" => "Default VPC Offering" (forces new resource)
zone: "Germany" => "Germany"
Plan: 4 to add, 0 to change, 3 to destroy.
from terraform-provider-cloudstack.
Wow, thanks a lot :D now its going to be great ;)
from terraform-provider-cloudstack.
Cool 👍
from terraform-provider-cloudstack.
Related Issues (20)
- Request Network ACL Rules number support HOT 20
- Allow creating cloudstack_instance in stopped state HOT 2
- root_disk_size unit changes after creation of instance (GB to Bytes) HOT 4
- Add support for importing cloudstack_* entities HOT 5
- Expected VirtualMachine.ostypeid to be an int64, was a string (on Exoscale) HOT 16
- terraform destroy fails when IP is used for source NAT HOT 3
- cloudstack_network source_nat_ip does not work HOT 12
- Enable VPN on source NAT IP for network HOT 4
- terraform import cloudstack_network does not work
- Tags were removed from resources HOT 2
- Error creating the new instance test: json: cannot unmarshal string into Go struct field DeployVirtualMachineResponse.ostypeid of type int64 HOT 4
- Cannot upload image for template with from URL ending .img HOT 2
- Add new resource: Project HOT 3
- Fix documentation for cloudstack_loadbalancer_rule HOT 1
- API version too old HOT 3
- Error retrieving ID of template: json: cannot unmarshal object into Go struct field alias.childtemplates of type []interface {} HOT 8
- Cannot pass data to custom service-offering HOT 1
- cloudstack_port_forward does not work HOT 4
- Add cloudstack_network datasource HOT 1
- Terraform doesn't work with ASC 4.15 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-cloudstack.