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

ibm_compute_vm_instance always recreating resource #1828

Closed
vknemanavar opened this issue Aug 25, 2020 · 1 comment
Closed

ibm_compute_vm_instance always recreating resource #1828

vknemanavar opened this issue Aug 25, 2020 · 1 comment
Assignees

Comments

@vknemanavar
Copy link

Hi there,

I am using Terraform 0.12.29 and ibm cloud provider plugin v1.11.0. I am able to create vsi using version which mentioned, but there is issue after creation when I rerun again it is destroying existing vsi and recreating, even if there is no change in the vm configuration. terraform command output what I can see is "- os_reference_code = "REDHAT_7_64" -> null # forces replacement " though I have not use os_reference_code in my code, I have used image_id in my code. It is weird issue I am seeing, appreciate any help

Terraform Version

Terraform v0.12.29

Affected Resource(s)

Please list the resources as a list, for example:

  • ibm_compute_vm_instance

Terraform Configuration Files


resource "ibm_compute_vm_instance" "vm" {
--
  | count           = var.vm_count
  | hostname        = var.hostname
  | domain          = var.domain
  | image_id        = var.image_id
  | datacenter      = var.datacenter
  | hourly_billing  = var.hourly_billing
  | cores           = var.cores
  | memory          = var.memory
  | disks           = [var.disks]
  | local_disk      = var.local_disk
  | public_vlan_id  = var.public_vlan_id
  | private_vlan_id = var.private_vlan_id
  | ssh_key_ids     = [var.ssh_key_ids]
  | }


Expected Behavior

It shouldn't recreate the resource since there is no change in the configuration when we re run next attempt

Actual Behavior

It is destroying existing resource and creating new one even though there is no change in the configuration

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform plan
  3. terraform apply
  4. After successful creation of resource just rerunning it again
  5. terraform init
  6. terraform plan - tells it is going to add 1 resource and destroy 1 resource even though there is no change in the configuration
  7. terraform apply - It destroys the existing resource and create new one even though there is no change in the configuration

Important Factoids

  • None

References

  • No
@VaishnaviGopal VaishnaviGopal self-assigned this Aug 28, 2020
VaishnaviGopal added a commit to VaishnaviGopal/terraform-provider-ibm that referenced this issue Aug 31, 2020
hkantare pushed a commit that referenced this issue Sep 1, 2020
@hkantare
Copy link
Collaborator

@hkantare hkantare closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants