--- title: "Network resources - Deployment" weight: 2 --- ### **STEPS** Aim is to deploy all the resources created on AWS through terraform. Open the Cloud9 terminal. If you are using AWS Event Engine navigate to the folder named **AWS_Workshop_Code_event_engine/Working_Directory/Resources** If you are using AWS Account navigate to the folder named **AWS_Workshop_Code_aws_account/Working_Directory/Resources** Copy **providers.tf**, **networks.tf**, **variables.tf**, **terraform.tfvars** files from the Resources folder to the Development folder. 1. **Enter values for Terraform variables** - provide the 'aws_access_key' and 'aws_secret_key' of your user. - provide the name of the key created in previous section - Rest of the variables have been provided with a value already, however if you wish you can modify those values And then run the following set of commands. 2. **terraform init** ```console terraform init ``` This will download & install all the necessary packages needed, like the aws package.

![init_nw](/static/images/setup_network_resources/INIT_NW.png)
3. **terraform validate** ```console terraform validate ``` Run this to check for any syntax error in the code. ![validate_nw](/static/images/setup_network_resources/VALIDATE_NW.png)
4. **terraform plan** To understand what the code will reflect and do on your AWS account run ```console terraform plan --out awslab ``` The resources shown with the '+' symbol are set to be created. It will show the number(may be different for your topology) of resources to be added. ![plan_nw](/static/images/setup_network_resources/PLAN_NW.png) 5. **terrafrom apply** If you are satisfied with the plan of the configuration apply it. ```console terraform apply awslab ``` ![apply_nw](/static/images/setup_network_resources/APPLY_NW.png) Open your AWS Management Console to see if all the resources are correctly deployed. **Subnets:** Search for your VPC in subnets and see all of them.
![subnets](/static/images/setup_network_resources/subnets.jpeg) **Interface:** ![interfaces](/static/images/setup_network_resources/network_interfaces.jpeg) **Internet_Gateway:** ![internet_gateway](/static/images/setup_network_resources/igw.jpeg) **Security Group:** ![SG](/static/Images/setup_network_resources/security_groups.jpeg) **Route Tables:** ![routes_tables](/static/images/setup_network_resources/routetables.jpeg)