Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform updating in place even when no changes introduced to resource #2

Closed
jaypif opened this issue Dec 3, 2019 · 4 comments · Fixed by #11
Closed

Terraform updating in place even when no changes introduced to resource #2

jaypif opened this issue Dec 3, 2019 · 4 comments · Fixed by #11
Assignees
Labels
Milestone

Comments

@jaypif
Copy link
Collaborator

jaypif commented Dec 3, 2019

Previously created here: #42


Whenever I run terraform plan/apply, terraform always wants to update the vm in place even though there have been no changes from me.

I removed the graphics section completey from my template or my resource but terraform still wants to change the vm in place (graphics):

~ resource "opennebula_virtual_machine" "vm_" {
        cpu         = 4
        gid         = 0
        gname       = "oneadmin"
        id          = "154"
        instance    = "test-slv-07"
        ip          = "10.71.155.13"
        lcmstate    = 3
        memory      = 4096
        name        = "liveops-test-slv-07"
        pending     = false
        permissions = "600"
        state       = 3
        template_id = 26
        uid         = 4
        uname       = "deployer"
        vcpu        = 4

        disk {
            driver   = "raw"
            image_id = 4
            size     = 102400
            target   = "vda"
        }

      - graphics {}

        nic {
            ip              = "10.71.155.13"
            mac             = "XX"
            network         = "Network"
            network_id      = 0
            nic_id          = 0
            security_groups = [
                0,
            ]
        }

        os {
            arch = "x86_64"
            boot = "disk0"
        }

Also I am seeing the same issue when creating templates. It updates in place the templates even when there are no changes.

@histrio
Copy link

histrio commented Dec 19, 2019

Hi,
The issue described here #42 (comment) still happens. I've tried to install release (provider.opennebula: version = "~> 0.1") and build it from the master branch but no luck.

@jaypif
Copy link
Collaborator Author

jaypif commented Dec 24, 2019

Hi @histrio

Can you retry with #11 ?
I found the fix for this annoying issue.

Regards

@jaypif jaypif added this to the 0.1.1 milestone Dec 24, 2019
@jaypif jaypif self-assigned this Dec 24, 2019
@treywelsh
Copy link
Collaborator

Seems ok to me: when first call to apply is successful, the second call to plan or apply display:
No changes. Infrastructure is up-to-date.

@histrio
Copy link

histrio commented Feb 20, 2020

It works now. Thanks!

ankur-gupta-guavus added a commit to ankur-gupta-guavus/terraform-provider-opennebula that referenced this issue Feb 3, 2021
jaypif added a commit that referenced this issue Feb 5, 2021
sk4zuzu pushed a commit that referenced this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants