nixops-aws
nixops-aws copied to clipboard
AWS VPC instances aren't assigned multiple security groups
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 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.
any work around to this?