Git Product home page Git Product logo

Comments (5)

svanharmelen avatar svanharmelen commented on August 14, 2024 2

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.

svanharmelen avatar svanharmelen commented on August 14, 2024

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

snooops avatar snooops commented on August 14, 2024

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.

snooops avatar snooops commented on August 14, 2024

Wow, thanks a lot :D now its going to be great ;)

from terraform-provider-cloudstack.

svanharmelen avatar svanharmelen commented on August 14, 2024

Cool 👍

from terraform-provider-cloudstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.