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

Adding the ability to pass/modify a service account in a GCE instance #642

Merged
merged 1 commit into from May 5, 2017

Conversation

AmineChikhaoui
Copy link
Member

@AmineChikhaoui AmineChikhaoui commented Apr 7, 2017

This allows setting a service account option in a GCE machine definition and changing it as well if the definition is modified by either changing the service account or the scopes (require a reboot).

Example:

gce = { pkgs, resources, lib, ...}:  {
      environment.systemPackages = [ pkgs.google-cloud-sdk ];
      deployment.targetEnv = "gce";
      deployment.gce = credentials // {
        region = "europe-west1-b";
        instanceType = "n1-standard-4";
        network = resources.gceNetworks.lb-net;
        instanceServiceAccount = { 
          email = "gce-test-1@...iam.gserviceaccount.com";
          scopes = [ "https://www.googleapis.com/auth/monitoring.write" "https://www.googleapis.com/auth/devstorage.read_only" ];
        };  
      };  
    };

This also fix the weird behavior of #465 by avoiding the deployment failure but doesn't fix the original issue which is the update of the instance type (will take care of it in a different PR).

…nce either

during the creation or when the instance is already launched (which requires a
reboot).
Possibly fixing NixOS#465 as the instance doesn't start after a change that requires
an --allow-reboot.
@AmineChikhaoui AmineChikhaoui changed the title Adding the pass/modify a service account in a GCE instance Adding the ability to pass/modify a service account in a GCE instance Apr 7, 2017
@AmineChikhaoui
Copy link
Member Author

@Phreedom Can you have a look at this ? Thanks in advance.
cc @rbvermaa

@rbvermaa rbvermaa merged commit db36cb7 into NixOS:master May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants