ansible-collections / ansible-collections/google.cloud

Apply Resource Policy to Compute Instance

Open
#323 6 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Python
Stars
105
Forks
144
Avg merge
5d 10h
Merged PRs (30d)
4

Description

##### SUMMARY

Hello, I hope you all are doing well.

Ansible collection does not allow creating an instance under a resource policy. I have to use the gcloud sdk to currently bring my VMs in a COLLOCATED placement policy which a resource policy provides. Ansible can create both resource policy and instance, but no way for them to play together which breaks my heart. I don't mind installing gcloud solely to connect these components together, but a better way is this feature. Have some way to apply a resource policy to a vm instance. For example, have a field in instance module to follow a resource policy during creation.

This PR tried to complete this feature but ran into quota errors (https://github.com/ansible-collections/google.cloud/pull/194). I'm able to apply resource policies to instances while consistently avoiding the quota errors I encountered with a work around I gathered through the documentation. Seems to me like quota errors should not stop this feature request.

Thank you.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME

gcp_compute_resource_policy field for google.cloud.gcp_compute_instance module.

##### ADDITIONAL INFORMATION

Forums about quota error mentioned above :
https://groups.google.com/g/gce-discussion/c/asJA71NDkZM/m/2qon8TQZBQAJ
https://groups.google.com/g/gce-discussion/c/Lfyk38giqK8

Contributor guide

Open the contributing guide

Research direction

Start with the google.cloud.gcp_compute_instance module and its gcp_compute_resource_policy field, then review the attempted implementation in pull request 194 and the documented quota-error workaround. Done means an instance can follow a resource policy during creation without the quota errors described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, gcp, python
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.