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

Google Cloud services fail to start #59

Open
robbins opened this issue Sep 1, 2021 · 0 comments
Open

Google Cloud services fail to start #59

robbins opened this issue Sep 1, 2021 · 0 comments

Comments

@robbins
Copy link

robbins commented Sep 1, 2021

Describe the bug
After running terraform apply, I receive this error message:
https://defuse.ca/b/QnVKBcVO
I'm pointing out that I enabled build_on_target true in case that's relevant, as I was facing invalid signatures for one of the packages mentioned here:

error: cannot add path '/nix/store/0km4ablsx26i1755jq4vq49d21q7p5vp-unit-google-clock-skew-daemon.service' because it lacks a valid signature

To Reproduce
Relevant snippet of main.tf:

module "nixos_image_1809" {
  source = "github.com/tweag/terraform-nixos/google_image_nixos"
  nixos_version = "latest"
}

module "deploy_nixos" {
    source = "git::https://github.com/tweag/terraform-nixos.git//deploy_nixos?ref=646cacb12439ca477c05315a7bfd49e9832bc4e3"
    nixos_config = "${path.module}/configuration.nix"
    target_host = google_compute_instance.example.network_interface.0.access_config.0.nat_ip 
    target_user = "USER_NAME"
    ssh_agent = false
    ssh_private_key_file = "/home/USER/.ssh/SSHKEY"
    build_on_target = "true"
}

resource "google_compute_instance" "example" {
  name         = "example"
  machine_type = "e2-micro"

  boot_disk {
    initialize_params {
      image = module.nixos_image_1809.self_link
      size = 30
    }
  }

  network_interface {
    network       = "default"
    access_config {
    }
  }

  metadata = {
    enable-oslogin = "TRUE"
  }

and configuration.nix is the default setup:

{ modulesPath, ... }:
{
  imports = [
    "${toString modulesPath}/virtualisation/google-compute-image.nix"
  ];
}

I've just ran terraform init, and terraform apply.

Expected behavior
I expected the deployment to complete successfully.

Environment

  • OS name + version: Building on NixOS Unstable with Nix 2.4pre20210802_47e96bb, VM is running Nix 2.3.15
  • Version of the code: Latest Git commit

Additional context
Add any other context about the problem here.

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

No branches or pull requests

1 participant