0

I have no idea why I keep getting the same same error when trying to run sudo salt-cloud -p ec2_east_micro_dev saltcloud_micro_test on my salt-master ec2 instance. All of my settings look correct but it keeps telling me an invalidParameterCombination error.

{'Errors': {'Error': {'Message': 'VPC security groups may not be used for a non-VPC launch', 'Code': 'InvalidParameterCombination'}}

ec2-us-east-1-private:
  minion:
    master: hostname.of-salt-master.com
    id: x
    key: 'x'
    private_key: /etc/salt/master-key.pem
    keyname: salt-minion1
    ssh_interface: private_ips
    securitygroup: main-securitygroup
    location: us-east-1
    availability_zone: us-east-1b
    driver: ec2
    del_root_vol_on_destroy: True
    del_all_vols_on_destroy: True
    rename_on_destroy: True

Thank you

dahrens
  • 3,879
  • 1
  • 20
  • 38
user3066155
  • 157
  • 2
  • 2
  • 15
  • http://stackoverflow.com/questions/22365470/launching-instance-vpc-security-groups-may-not-be-used-for-a-non-vpc-launch might be useful – dahrens Nov 19 '16 at 12:09

2 Answers2

0

You'll want to specify an AWS subnet, using

subnetid:

In the profiles.conf

Without it the profile does not know what VPC to create the instance in, and the launch will fail.

Mr.Budris
  • 552
  • 5
  • 21
0

When you instantiate VPC box you should remove "securitygroup:" from your providers config file and then you'll specify the "SubnetId:" in your profiles config file. Example of working profiles config file:

db_us_east_1_vpc_pfofile:
  provider: ec2-us-east-1-private
  image: ami-ad2a91ab
  size: m4.large
  ssh_username: ubuntu
  network_interfaces:
    - DeviceIndex: 0
      PrivateIpAddresses:
        - Primary: True
      #auto assign public ip (not EIP)
      AssociatePublicIpAddress: True
      SubnetId: subnet-ba7e3133
      SecurityGroupId: sg-ba655211
  del_root_vol_on_destroy: True
  del_all_vol_on_destroy: True
  tag: {'Environment': 'production', 'Role': 'database', 'Name': 'my_db_box'}
  sync_after_install: grains

It was discussed on the saltstack github issue 14963

Dmitry Shevkoplyas
  • 6,163
  • 3
  • 27
  • 28