Using Facts To Determine EC2 Classic Vs VPC

23 views
Skip to first unread message

Jason Wever

unread,
Jun 7, 2016, 7:48:36 AM6/7/16
to puppet-users
Hi All,

I'm having some trouble using facter to help determine whether an EC2
instance is in Classic or VPC. Right now, I'm trying to use the fact
that shows the VPC ID, but it's based off fo the MAC address of an
instance and I'm not having any luck when I try to stick the variable
for the mac address in there to help.

I'm currently trying to reference the fact as
"$::ec2_network_interfaces_macs_${::macaddress}_vpc_id", but that
doesn't seem to work. Also
"${::ec2_network_interfaces_macs_${::macaddress}_vpc_id}" doesn't seem
to work either.

Any suggestions? I'm not wedded to this method of determining whether
an instance is Classic or VPC, so other suggestions are welcome too.

Thanks!
--
Jason Wever
Reply all
Reply to author
Forward
0 new messages