Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Security Group Not found #500

Open
pablogmorales opened this issue Feb 28, 2018 · 6 comments
Open

Security Group Not found #500

pablogmorales opened this issue Feb 28, 2018 · 6 comments
Labels

Comments

@pablogmorales
Copy link

Hi
Do not know if this is a bug or a configuration issue, but it seems it cannot find any security group within my configuration

Error: Security groups 'Puppet Server' not found in VPCs 'vpc-4bede32f'
Error: /Stage[main]/Main/Ec2_instance[instance-from-puppet]/ensure: change from 'absent' to 'running' failed: Security groups 'Puppet Server' not found in VPCs 'vpc-4bede32f'

puppet resource ec2_securitygroup|grep Puppet
ec2_securitygroup { 'Puppet Server':
  description => 'Puppet Server'

ec2_instance { 'instance-from-puppet':
  ensure            => running,
  region            => 'us-east-1',
  availability_zone => 'us-east-1a',
  image_id          => 'ami-f2ec8c88', # you need to select your own AMI
  instance_type     => 't2.micro',
  key_name          => 'puppetserver',
  subnet            => 'subnet-d4c04d8c',
  security_groups   => ['Puppet Server'],
  tags              => {
    tag_name => 'puppetserver',
  },
}

Thanks
Regards

@tarunmangla07
Copy link

You should use the subnet name rather than the subnet id, from your manifests i can see that you are using the subnet id .hope this helps

@gregohardy
Copy link
Contributor

Did that help?

@pablogmorales
Copy link
Author

HI Greg,
Sorry, did not get your last notification, maybe went to spam folder, I'll check the configuration and will let you know

Thank you very much for your time and support.
Regards

@pablogmorales
Copy link
Author

Hello, this is what Im getting now:

ec2_instance { 'instance-from-puppet':
ensure => running,
region => 'us-east-1',
availability_zone => 'us-east-1a',
image_id => 'ami-b77a72c8', # you need to select your own AMI
instance_type => 't2.micro',
key_name => 'keyname',
subnet => 'subnet-0589332f',
security_groups => ['sg-b9c46ec9'],
tags => {
tag_name => 'provisioned_by_puppet',
},
}
change from 'absent' to 'running' failed: When specifying a subnet you must specify a security group associated with a VPC

That security group id is valid, is the one currently associated to an instance, what am I doing wrong?

Thanks

@pablogmorales
Copy link
Author

as as side note my subnet name is the same as the subnet id

@pablogmorales
Copy link
Author

I got it working now, I have to use the names instead of the ID's name..

Thank you very much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants