# Aws\_vpc creation using chef provisioning

**URL:** https://discourse.chef.io/t/aws-vpc-creation-using-chef-provisioning/13588
**Category:** Chef Infra (archive)
**Created:** [September 3, 2018, 12:34pm UTC](https://discourse.chef.io/t/aws-vpc-creation-using-chef-provisioning/13588 "2018-09-03T12:34:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bhaskar](https://avatars.discourse-cdn.com/v4/letter/b/f4b2a3/32.png) [@bhaskar](https://discourse.chef.io/u/bhaskar)
#### Post date: [September 3, 2018, 12:34pm UTC](https://discourse.chef.io/t/aws-vpc-creation-using-chef-provisioning/13588/1 "2018-09-03T12:34:12Z")

</div>

Hi All,

Im trying to use chef provisioning with aws driver to create a vpc.  
#######################################  
require 'chef/provisioning/aws\_driver'  
with\_driver 'aws::ap-south-1'  
aws\_vpc 'name' do  
cidr\_block '10.0.0.0/24'  
internet\_gateway true  
main\_routes '0.0.0.0/0' =\> :internet\_gateway  
aws\_tags :chef\_type =\> 'aws\_vpc'  
end  
#######################################

VPC got created when checked in the console, but internet gateway did not get linked.  
Getting below error.

RuntimeError  
------------  
aws\_internet\_gateway[igw-managed-by-vpc-xxxxxxxxxxxx] (no AWS object id) (basic\_chef\_client::block line 267) had an error: RuntimeError: Chef::Resource::AwsVpc[vpc-xxxxxxxxxxx] does not exist!

please help me in resolving this issue.

Thanks in advance,  
Bhaskar S

---

<div class="post-metadata">

### Author: ![praveen\_kumar](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@praveen\_kumar](https://discourse.chef.io/u/praveen_kumar)
#### Post date: [June 19, 2019, 12:37pm UTC](https://discourse.chef.io/t/aws-vpc-creation-using-chef-provisioning/13588/2 "2019-06-19T12:37:54Z")

</div>

i am also getting the same issue and please help me in resolving this issue.
