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

hardware reservation moving between projects #106

Merged
merged 2 commits into from
Oct 9, 2023
Merged

hardware reservation moving between projects #106

merged 2 commits into from
Oct 9, 2023

Conversation

t0mk
Copy link
Contributor

@t0mk t0mk commented Jun 30, 2023

This PR adds project_id attribute to hw reservation resource, enabling it to move between projects.

The following workflow is possible:

    - name: fetch hw reservation resource 
      equinix.cloud.metal_hardware_reservation:
        id: "{{ metal_hardware_reservation_id }}"
      register: hwres

    - name: create new project to move the hw res to
      equinix.cloud.metal_project:
        name: "destination-project"
      register: project

    - name: move hw reservation to new project
      equinix.cloud.metal_hardware_reservation:
        id: "{{ metal_hardware_reservation_id }}"
        project_id: "{{ project.id }}"

    - name: move hw reservation to original project
      equinix.cloud.metal_hardware_reservation:
        id: "{{ metal_hardware_reservation_id }}"
        project_id: "{{ hwres.project_id }}"     
   

@t0mk t0mk requested a review from ctreatma June 30, 2023 15:53
displague
displague previously approved these changes Sep 20, 2023
@displague
Copy link
Member

@t0mk looks like this needs a rebase

@t0mk
Copy link
Contributor Author

t0mk commented Oct 9, 2023

@displague rebased

@displague displague merged commit ce5f162 into main Oct 9, 2023
2 checks passed
@displague displague deleted the hw_res_move branch October 9, 2023 17:27
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