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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for shutdown or start VM #2234

Open
3 of 4 tasks
ggjulio opened this issue Jul 5, 2024 · 1 comment
Open
3 of 4 tasks

Add support for shutdown or start VM #2234

ggjulio opened this issue Jul 5, 2024 · 1 comment
Labels
enhancement Type: Enhancement
Milestone

Comments

@ggjulio
Copy link

ggjulio commented Jul 5, 2024

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a 馃憤 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

See the description of closed issue #1394.

However unlike the proposal of #1394.
I think creating a new resource vsphere_virtual_machine_state would be more appropriate than adding a new key desired_status to vsphere_virtual_machine.
It won't blur the lines between mutable vs. immutable infrastructure.

Example 1:

resource "vsphere_virtual_machine_state" "main" {
  uuid  = vsphere_virtual_machine_state.main.uuid
  state = data.coder_workspace.me.transition == "start" ? "running" : "stopped"
}

Example 2:

resource "vsphere_virtual_machine_state" "main" {
  name           = vsphere_virtual_machine_state.main.name
  datacenter_id  = data.vsphere_datacenter.datacenter.id
  state          = data.coder_workspace.me.transition == "start" ? "running" : "stopped"
}

Use Case(s)

Provide ability to start and stop a virtual machine from terraform.
Feature parity with providers such as AWS

example
image
Source: https://registry.coder.com/templates/aws-linux

Potential Terraform Provider Configuration

No response

References

#1394 #1533 #1394

@ggjulio ggjulio added the enhancement Type: Enhancement label Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

Hello, ggjulio! 馃枑

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

@ggjulio ggjulio changed the title Add support for shutdown or starting VM Add support for shutdown or start VM Jul 5, 2024
@tenthirtyam tenthirtyam added this to the Backlog milestone Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants