softlayer / terraform-provider-softlayer

a Terraform (http://terraform.io) provider for interacting with SoftLayer (https://www.softlayer.com)
Mozilla Public License 2.0
40 stars 26 forks source link

Changes to softlayer_bare_metal resource does not affect resource #188

Open hirodotp opened 6 years ago

hirodotp commented 6 years ago

It appears changing items such as "os_reference_code" does not cause the OS to be reloaded on the baremetal system. I created a module that implements a softlayer_bare_metal resource, imported an existing baremetal by ID and when I run terraform plan after changing "os_reference_code" to a different operating system, no changes are staged. Is this expected behavior? It seems like there should be certain parameters that initiate a change to the baremetal vs. nothing or a new record (such as reloading the OS with a new one).

What follows is an example of the above. The module in use is available at https://pastebin.com/6eLxjTV9

$ terraform init Initializing modules...

Initializing the backend...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see any changes that are required for your infrastructure. All Terraform commands should now work.

If you ever set or change modules or backend configuration for Terraform, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary.

$ terraform import module.softlayer-baremetal-vdc.softlayer_bare_metal.bm 1017225 module.softlayer-baremetal-vdc.softlayer_bare_metal.bm: Importing from ID "1017225"... module.softlayer-baremetal-vdc.softlayer_bare_metal.bm: Import complete! Imported softlayer_bare_metal (ID: 1017225) module.softlayer-baremetal-vdc.softlayer_bare_metal.bm: Refreshing state... (ID: 1017225)

Import successful!

The resources that were imported are shown above. These resources are now in your Terraform state and will henceforth be managed by Terraform.

$ terraform plan Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage.

softlayer_bare_metal.bm: Refreshing state... (ID: 1017225)


No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your configuration and real physical resources that exist. As a result, no actions need to be performed.