Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Accepts service account definition the created VM #50

Merged
merged 3 commits into from
Nov 27, 2022

Conversation

nkakouros
Copy link
Contributor

@nkakouros nkakouros commented May 23, 2022

Setting the service account that the VM itself will use (as well as the scope) is useful if the user wants to interact with google cloud apis from inside that VM. This PR makes it possible to define a service account (replicating the service_accounts field of the gcp_compute_instance module). There are three ways to define it:

  • supply the service account email directly as a hardcoded value
  • use the value of same-as-driver which:
    • will read the service account email from the json file defined in the service_account_file key of the driver configuration,
    • or will reuse the value of the service_account_email key of the driver configuration if that key is set.

This is done in order to allow the user to be more flexible without repeating themselves as well as allowing them to write reusable molecule.yml files independent of a specific project.

@nkakouros nkakouros marked this pull request as ready for review May 23, 2022 12:31
@ssbarnea ssbarnea added the enhancement New feature or request label Jun 1, 2022
@ssbarnea ssbarnea merged commit 94bb78f into ansible-community:main Nov 27, 2022
@nkakouros nkakouros deleted the service-account branch November 27, 2022 20:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants