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

Add partial support for import server #88

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

stuart-mclaren-hpe
Copy link
Contributor

Running

terraform import hpegl_pc_server.test 126fd201-9e6e-5e31-9ffb-a766265b1fd3,697e8cbf-df7e-570c-a3c7-912d4ce8375a

will partially update the state file. Some fields are missing

  • esx_root_credential_id
  • ilo_admin_credential_id
  • server_network

these fields are not currently retrievable via the API, so they will be set to null in the state. This will lead to an error if a "terraform apply" is subsequently run, unless these fields are manually tweaked.

This means that "terraform import" for server resources is only partially supported.

Running

```
terraform import hpegl_pc_server.test 126fd201-9e6e-5e31-9ffb-a766265b1fd3,697e8cbf-df7e-570c-a3c7-912d4ce8375a
```

will partially update the state file. Some fields are missing

* esx_root_credential_id
* ilo_admin_credential_id
* server_network

these fields are not currently retrievable via the API, so they will be set to
`null` in the state. This will lead to an error if a "terraform apply" is
subsequently run, unless these fields are manually tweaked.

This means that "terraform import" for server resources is only partially
supported.
@stuart-mclaren-hpe stuart-mclaren-hpe marked this pull request as ready for review January 22, 2025 15:00
Copy link

@eamonnotoole eamonnotoole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely sub-optimal as you've pointed out Stuart.

@stuart-mclaren-hpe stuart-mclaren-hpe merged commit ec116ba into main Jan 23, 2025
5 checks passed
@stuart-mclaren-hpe stuart-mclaren-hpe deleted the partial-import-server branch January 23, 2025 15:07
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

Successfully merging this pull request may close these issues.

2 participants