nixops-aws icon indicating copy to clipboard operation
nixops-aws copied to clipboard

AWS VPC instances aren't assigned multiple security groups

Open grahamc opened this issue 9 years ago • 2 comments

With the following configuration, using either the security group names or sg-... IDs, the instance is only ever launched with the default security group. Same if I remove the spot bid.

  myserver = { resources, config, ... }: {
      deployment.targetEnv = "ec2";
      deployment.ec2.accessKeyId = accessKeyId;
      deployment.ec2.region = region;
      deployment.ec2.instanceType = "m1.small";
      deployment.ec2.keyPair = resources.ec2KeyPairs.graham_ndndx;
      deployment.ec2.instanceProfile = "machine-insight";
      deployment.ec2.spotInstancePrice = 1;
      deployment.ec2.securityGroupIds = [
        "insight" # "sg-..." # insight
        "default" # "sg-..." # default
      ];

grahamc avatar Apr 26 '16 18:04 grahamc

@grahamc Do you define a vpc where it will be deployed to? I suspect that it uses the default value of deployment.ec2.securityGroups with this config.

I'm going to release nixops 1.4 today or tomorrow, but in the next version I will consolidate the deployment.ec2.securityGroups and deployment.ec2.securityGroupIds options, so that we only have one option in stead of 2.

rbvermaa avatar Apr 28 '16 08:04 rbvermaa

any work around to this?

joehealy avatar Aug 28 '18 12:08 joehealy