{"id":726,"date":"2019-08-22T08:49:40","date_gmt":"2019-08-22T07:49:40","guid":{"rendered":"https:\/\/www.easydeploy.io\/blog\/?p=726"},"modified":"2019-08-23T05:04:47","modified_gmt":"2019-08-23T04:04:47","slug":"launching-ec2-instance-and-aurora-rds-instance","status":"publish","type":"post","link":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/","title":{"rendered":"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform"},"content":{"rendered":"<p style=\"text-align: justify;\">Previously, we&#8217;ve covered an article on the steps of <a href=\"https:\/\/www.easydeploy.io\/blog\/setup-rds-auto-scaling-in-aws\/\" target=\"_blank\" rel=\"noopener noreferrer\">Setting up RDS Autoscaling in AWS<\/a> in 15 minutes. Now, in this article, we&#8217;ll cover the step by step tutorial for launching EC2 Instance and Aurora RDS Instance with a default VPC and Subnet using Terraform.<\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">If you are looking for the steps to launch EC2 Instance and Aurora RDS Instance with the default VPC and Subnet using terraform, this blog will help you. Here, in this blog, we will explain how to set up AWS EC2 instance and Aurora RDS instance using terraform. Note that Terraform is capable of working in <\/span>many environments<span style=\"font-weight: 400;\"> but here I\u2019m choosing Amazon Web Services (AWS).\u00a0<\/span><\/p>\n<h2 style=\"text-align: justify;\">Tutorial on Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform<\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Follow this step by step tutorial and launch your EC2 instance and Aurora RDS instance with default VPC and Subnet using Terraform.<\/span><\/p>\n<h4 style=\"text-align: justify;\">Step 1: Setting up an AWS account and creating an IAM user.<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">This first step is to create an account or if we already have an account, we need to <\/span><em>Sign In<\/em><span style=\"font-weight: 400;\">. You can use the following link to log into your AWS account.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># https:\/\/aws.amazon.com\/<\/span><\/pre>\n<h4 style=\"text-align: justify;\">Step 2: Creating an IAM User.<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Once logged into the AWS account, we need to create an<\/span><em> IAM user.<\/em><span style=\"font-weight: 400;\"> This can be done by following the steps below:<\/span><\/p>\n<p style=\"text-align: justify;\"><strong>Services\u2192 Security, Identity, &amp; Compliance\u2192 IAM\u2192 Users\u2192 Create User<\/strong><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">We need to <\/span><em>attach the policies<\/em><span style=\"font-weight: 400;\"> while creating a user (required policies can also be added or deleted after creating the user). Here I\u2019m going to launch an EC2 instance and Aurora RDS instance, so I\u2019m attaching the following policies with the user.<\/span><\/p>\n<pre style=\"text-align: justify;\">AmazonEC2FullAccess\r\n\r\nAmazonRDSFullAccess<\/pre>\n<h4 style=\"text-align: justify;\">Step 3: Access Keys and Secret Keys<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">While creating a user, make sure to download the <\/span><em>Access Key and Secret Key<\/em><span style=\"font-weight: 400;\"> and keep it safe because Terraform identifies the User account with those 2 keys. In case you lose the keys, there is no other way to create a new user.<\/span><\/p>\n<h4 style=\"text-align: justify;\">Step 4: Launching a base Instance<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To make the terraform to work, we need to <\/span><em>launch an AWS EC2 instance<\/em> <span style=\"font-weight: 400;\">with the minimum configuration from which we need to initialize Terraform to launch the resources and then SSH into the instance and switch to root.<\/span><\/p>\n<blockquote><p>Also Read: <a href=\"https:\/\/www.easydeploy.io\/blog\/cloudflare-cdn-setup\/\" target=\"_blank\" rel=\"noopener noreferrer\">How to Setup Cloudflare CDN?<\/a><\/p><\/blockquote>\n<h4 style=\"text-align: justify;\">Step 5: Downloading and Installing terraform<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Once the server has launched SSH into the server and then <\/span><em>download the terraform<\/em><span style=\"font-weight: 400;\"> based on your distribution system by clicking the below link:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.terraform.io\/downloads.html\"><span style=\"font-weight: 400;\">https:\/\/www.terraform.io\/downloads.html<\/span><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">After downloading terraform we need to unzip it and have to update the <\/span><em>PATH environment<\/em><span style=\"font-weight: 400;\"> variable if you are going to install the terraform other than the path <\/span><em>\/usr\/local\/src<\/em><span style=\"font-weight: 400;\"><em>.<\/em> Here I\u2019m going to use the path \/usr\/local\/src and<\/span> <em>Linux 64 bit distribution.<\/em><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\"># cd \/usr\/local\/src<\/span>\r\n\r\n<span style=\"font-weight: 400;\">#wget <\/span><a href=\"https:\/\/releases.hashicorp.com\/terraform\/0.12.6\/terraform_0.12.6_linux_amd64.zip\"><span style=\"font-weight: 400;\">https:\/\/releases.hashicorp.com\/terraform\/0.12.6\/terraform_0.12.6_linux_amd64.zip<\/span><\/a>\r\n\r\n<span style=\"font-weight: 400;\"># unzip terraform_0.12.5_linux_amd64.zip<\/span>\r\n\r\n<span style=\"font-weight: 400;\"># mv terraform \/usr\/local\/bin\/<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">Now we need to execute the following command to make the terraform binary to work from anywhere from the server to proceed.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\"># ln -s \/usr\/local\/src\/terraform \/usr\/bin\/terraform<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Terraform installation can be verified by entering the following command in CLI.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\"># terraform<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">You will get a screen like the one which is given below:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">The common commands are the one which we have to execute with Terraform, the most commonly used commands are:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\"># terraform init (to initialize terraform in any directory which we are creating)<\/span>\r\n\r\n<span style=\"font-weight: 400;\"># terraform plan<\/span>\r\n\r\n<span style=\"font-weight: 400;\"># terraform apply\u00a0<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 style=\"text-align: justify;\">Step 6: Terraform Codes<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><a href=\"https:\/\/github.com\/siru88\/TerraformAWSEC2andRDS\" target=\"_blank\" rel=\"noopener noreferrer\">Terraform code<\/a> is generally written in <\/span><em>HashiCorp Configuration Language (HCL)<\/em> <span style=\"font-weight: 400;\">and this code is very efficient in building infrastructure and hence it\u2019s also called infrastructure as a code language. The terraform code file is saved as <\/span><em>.tf extension files<\/em><span style=\"font-weight: 400;\">, it is capable of integrating many numbers of <\/span><em>.tf<\/em><span style=\"font-weight: 400;\"> files so there is no need for us to create the modules in a single file.<\/span><\/p>\n<h4 style=\"text-align: justify;\">Step 7: Terraform Provider.tf file<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">The first step in using terraform is to configure the providers which we want to create. The following is my provider file and I\u2019m saving it as\u00a0 <\/span><em>provider.tf file.<\/em><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre>provider \"aws\" {\r\n\r\n\u00a0\u00a0region = var.region\r\n\r\n\u00a0\u00a0access_key = var.access_key\r\n\r\n\u00a0\u00a0secret_key = var.secret_key\r\n\r\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">In this provider, file tells the Terraform that I\u2019m going to use AWS provider. And I\u2019m going to define the region in which the Terraform has to launch the instance and the account in which it has to launch the Terraform uses access_key and secret_key.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Note that in the above provider file, I\u2019ve declared the parameters as variables which the terraform can identify using<\/span> <em>var prefixed before the argument.<\/em><\/p>\n<h4 style=\"text-align: justify;\">Step 8: Terraform Variables.tf file<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To make the terraform identify which parameters are variables, we have to save them in the file <\/span><em>variables.tf<\/em><span style=\"font-weight: 400;\"><em>.<\/em> The contents of the variables.tf file is given below:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre>variable \"region\" {\r\n\r\ndescription = \"AWS region\"\r\n\r\n}\r\n\r\nvariable \"access_key\" {\r\n\r\ndescription = \"AWS access_key \"\r\n\r\n}\r\n\r\nvariable \"secret_key\" {\r\n\r\ndescription = \"AWS secret_key\"\r\n\r\n}\r\n\r\nvariable \"image_id\" {\r\n\r\ndescription = \"AWS image_id\"\r\n\r\n}\r\n\r\nvariable \"db_name\" {\r\n\r\ndescription = \"RDS db_name\"\r\n\r\n}\r\n\r\nvariable \"db_username\" {\r\n\r\ndescription = \"RDS db_username\"\r\n\r\n}\r\n\r\nvariable \"db_password\" {\r\n\r\ndescription = \"RDS db_password\"\r\n\r\n}\r\n\r\nvariable \"availability_zone\" {\r\n\r\ndescription = \"AWS availability_zone\"\r\n\r\n}\r\n\r\nvariable \"instance_type\" {\r\n\r\ndescription = \"AWS instance_type\"\r\n\r\n}\r\n\r\nvariable \"rds_instance_identifier_name\" {\r\n\r\ndescription = \"RDS instance_identifier_name\"\r\n\r\n}\r\n\r\nvariable \"rds_cluster_identifier_name\" {\r\n\r\ndescription = \"RDS cluster_identifier_name\"\r\n\r\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Here, I\u2019ve declared those <\/span><em>parameters as environmental variables<\/em> <span style=\"font-weight: 400;\">(for which we need to provide the Parameters during execution) and we can <\/span><em>add a description<\/em> <span style=\"font-weight: 400;\">for our easy understanding and convenience.\u00a0<\/span><\/p>\n<blockquote><p>Also Read: <a href=\"https:\/\/www.easydeploy.io\/blog\/setup-rds-auto-scaling-in-aws\/\" target=\"_blank\" rel=\"noopener noreferrer\">Setting up RDS Autoscaling in AWS in 15 minutes<\/a><\/p><\/blockquote>\n<h4 style=\"text-align: justify;\">Step 9: Terraform ec2.tf resource<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">For each provider, there are different kinds of <\/span><em>resources<\/em><span style=\"font-weight: 400;\"> we need to create such as a server, RDS, load balancer, etc., The contents of my <\/span><em>ec2.tf<\/em><span style=\"font-weight: 400;\"> files are:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre># Create an EC2 instance\r\n\r\nresource \"aws_instance\" \"web\" {\r\n\r\n\u00a0\u00a0ami \u00a0 \u00a0 \u00a0  = var.image_id\r\n\r\n\u00a0\u00a0instance_type = var.instance_type\r\n\r\n\u00a0\u00a0key_name = \"${aws_key_pair.test.key_name}\"\r\n\r\n\u00a0\u00a0availability_zone = var.availability_zone\r\n\r\n\u00a0\u00a0associate_public_ip_address = true\r\n\r\n\u00a0\u00a0#disable_api_termination = true\r\n\r\n\u00a0\u00a0security_groups = [\"${aws_security_group.web.name}\"]\r\n\r\n\u00a0\u00a0#source_dest_check = false\r\n\r\ntags = {\r\n\r\nName = \"test\"\r\n\r\n}\r\n\r\n}\r\n\r\nresource \"aws_eip\" \"web-1\" {\r\n\r\ninstance = \"${aws_instance.web.id}\"\r\n\r\nvpc = true\r\n\r\n\u00a0\u00a0tags = {\r\n\r\nName = \"test instance ip\"\r\n\r\n}\r\n\r\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Here, in my EC2 instance creation module, I\u2019ve declared the image id, instance type, availability zone as environmental variables, and the <\/span><b>\u2018$\u2019<\/b><span style=\"font-weight: 400;\"> before the variable parameters indicate that it will fetch the value from the already created parameter (which are called <\/span><em>dependencies<\/em><span style=\"font-weight: 400;\">).\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Also, we can create and attach tags to the ec2-instance which we can do that by providing it in the <\/span><em>tags modules<\/em><span style=\"font-weight: 400;\">. The <\/span><em>aws_eip resource<\/em><span style=\"font-weight: 400;\"> is used to create an <\/span><em>Elastic IP<\/em><span style=\"font-weight: 400;\"> and attach it to the created EC2 instance. While launching an instance we need to attach a <\/span><em>security group<\/em> <span style=\"font-weight: 400;\">with the instance which specifies <em>I<\/em><\/span><em>nbound and Outbound rules<\/em><span style=\"font-weight: 400;\">, The security Group file is given below and I\u2019ve saved it as <\/span><em>secure.tf<\/em><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre>##Defining security group for Web\r\n\r\n\u00a0\u00a0\u00a0\u00a0resource \"aws_security_group\" \"web\" {\r\n\r\n\u00a0\u00a0\u00a0\u00a0name = \"terraform security group\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0description = \"Accept incoming and outgoing connections.\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0ingress {\r\n\r\n\u00a0\u00a0\u00a0\u00a0from_port = 80\r\n\r\n\u00a0\u00a0\u00a0\u00a0to_port = 80\r\n\r\n\u00a0\u00a0\u00a0\u00a0protocol = \"tcp\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0cidr_blocks = [\"0.0.0.0\/0\"]\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0\u00a0ingress {\r\n\r\n\u00a0\u00a0\u00a0\u00a0from_port = 443\r\n\r\n\u00a0\u00a0\u00a0\u00a0to_port = 443\r\n\r\n\u00a0\u00a0\u00a0\u00a0protocol = \"tcp\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0cidr_blocks = [\"0.0.0.0\/0\"]\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0ingress {\r\n\r\n\u00a0\u00a0\u00a0\u00a0from_port = 20\r\n\r\n\u00a0\u00a0\u00a0\u00a0to_port = 21\r\n\r\n\u00a0\u00a0\u00a0\u00a0protocol =\"tcp\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0cidr_blocks = [\"0.0.0.0\/0\"]\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0\u00a0ingress {\r\n\r\n\u00a0\u00a0\u00a0\u00a0from_port = 13000\r\n\r\n\u00a0\u00a0\u00a0\u00a0to_port = 13100\r\n\r\n\u00a0\u00a0\u00a0\u00a0protocol = \"tcp\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0cidr_blocks = [\"0.0.0.0\/0\"]\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0\u00a0ingress {\r\n\r\n\u00a0\u00a0\u00a0\u00a0from_port = 22\r\n\r\n\u00a0\u00a0\u00a0\u00a0to_port = 22\r\n\r\n\u00a0\u00a0\u00a0\u00a0protocol = \"tcp\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0cidr_blocks = [\"0.0.0.0\/0\"]\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0egress {\r\n\r\n\u00a0\u00a0\u00a0\u00a0from_port \u00a0 = 0\r\n\r\n\u00a0\u00a0\u00a0\u00a0to_port \u00a0 \u00a0 = 0\r\n\r\n\u00a0\u00a0\u00a0\u00a0protocol\u00a0 \u00a0 = \"-1\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0cidr_blocks = [\"0.0.0.0\/0\"]\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0# vpc_id = \"${aws_vpc.myVpc.id}\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0tags =\u00a0 {\r\n\r\n\u00a0\u00a0\u00a0\u00a0Name = \"terraform\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0\u00a0}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><em>Ingress<\/em><span style=\"font-weight: 400;\"> specifies the<\/span> inbound<span style=\"font-weight: 400;\"> rules and <\/span><em>Egress<\/em><span style=\"font-weight: 400;\"> specifies the outbound rules. Here for inbound, I allowed ports 20-21, 13000-13100, 443, 80, 22 and for outbound all ports.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">In order to give SSH access to the EC2 instance, it\u2019s advisable to <\/span><em>generate and add a public key<\/em> <span style=\"font-weight: 400;\">to the default user\u2019s authorized key file. For this, I\u2019ve created a file called key.tf and find the contents of the file below:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre>resource \"aws_key_pair\" \"test\" {\r\n\r\n\u00a0 key_name = \"test.pem\"\r\n\r\n\u00a0 Public_key = \"ssh-rsa HGnQd6w5YPTQIttrAO+v2NERbkaSSJpAkbfvMA\r\nFoXLjg8mFqWoQQzUSRFXIB7sIcPIFPzCdmiPWMJWTMVY\r\nlDyIiCI+BK8E4vbMB4c1wuS7\/uDkQCyKH2lbgcIYu+RRHnrLm\r\nR8jtdg2f3Nqu8IIXCrO19xf62Vh+pWMsQ7l5a0BL11NA163fIr\r\nCnG8xNSw3Q\/qQ\/zOWmfLnx\/ test@server1\"\r\n\r\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><strong>Note<\/strong><span style=\"font-weight: 400;\"><strong>:<\/strong> Adding the above file as such will not work for you so please <\/span><em>add your generated key<\/em><span style=\"font-weight: 400;\"> in the public_key.\u00a0\u00a0<\/span><\/p>\n<h4 style=\"text-align: justify;\">Step 10: Terraform Aurora RDS creation rds.tf<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">I\u2019m informing the Terraform to launch <\/span><em>Aurora RDS 5.6<\/em><span style=\"font-weight: 400;\"> Cluster and instance with <\/span><em>default VPC<\/em><span style=\"font-weight: 400;\"> and <\/span><em>custom security group.<\/em><span style=\"font-weight: 400;\"> I\u2019ve declared the cluster identifier name, master database name, username, and password as an environment variable and I\u2019ve given the instance class as default value as <\/span><em>db.t2.small<\/em><span style=\"font-weight: 400;\"><em>.<\/em>\u00a0\u00a0<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre>resource \"aws_rds_cluster\" \"aurora_cluster\" {\r\n\r\ncluster_identifier\u00a0 \u00a0 \u00a0 \u00a0  = var.rds_cluster_identifier_name\r\n\r\ndatabase_name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  = var.db_name\r\n\r\nmaster_username \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  = var.db_username\r\n\r\nmaster_password \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  = var.db_password\r\n\r\nbackup_retention_period \u00a0  = 7\r\n\r\npreferred_backup_window \u00a0  = \"02:00-03:00\"\r\n\r\nvpc_security_group_ids\u00a0 \u00a0  = [\"${aws_security_group.rds_sg.id}\"]\r\n\r\nskip_final_snapshot \u00a0 \u00a0 \u00a0  = true\r\n\r\n}\r\n\r\nresource \"aws_rds_cluster_instance\" \"aurora_cluster_instance\" {\r\n\r\navailability_zone =\u00a0 var.availability_zone\r\n\r\ncluster_identifier = \"${aws_rds_cluster.aurora_cluster.id}\"\r\n\r\ninstance_class\u00a0 \u00a0  = \"db.t2.small\"\r\n\r\npublicly_accessible \u00a0 = true\r\n\r\nidentifier\u00a0 \u00a0 \u00a0 \u00a0  = var.rds_instance_identifier_name\r\n\r\n}\r\n\r\n################# RDS SECURITY GROUP ##################\r\n\r\nresource \"aws_security_group\" \"rds_sg\" {\r\n\r\n\u00a0name = \"myrds-sg\"\r\n\r\n\u00a0\u00a0description = \"RDS Terraform MySQL Security Group\"\r\n\r\n\u00a0ingress {\r\n\r\nfrom_port = 3306\r\n\r\nto_port = 3306\r\n\r\nprotocol = \"tcp\"\r\n\r\n\u00a0\u00a0\u00a0security_groups = [\"${aws_security_group.web.id}\"]\r\n\r\n\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0egress {\r\n\r\nfrom_port \u00a0 = 0\r\n\r\nto_port  = 0\r\n\r\nprotocol = \"-1\"\r\n\r\ncidr_blocks = [\"0.0.0.0\/0\"]\r\n\r\n\u00a0\u00a0}\r\n\r\ntags =\u00a0 {\r\n\r\nName = \"TERRA_RDS_SG\"\r\n\r\n}\r\n\r\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Once the Aurora RDS instance is launched, it will be attached with the RDS created Security group named\u00a0 TERRA_RDS_SG<\/span><\/p>\n<h4 style=\"text-align: justify;\">Step 11:\u00a0 Terraform init<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">The terraform binary consists of basic, it does not come with the code for any providers. So, in order to use Terraform, we need to <\/span><em>first initialize the terraform<\/em><span style=\"font-weight: 400;\"> in the directory where we have saved our <\/span><em>.tf<\/em><span style=\"font-weight: 400;\"> extension files which tells the terraform to Scan the codes, figure out the providers we are using and download the code for them. To initialize terraform run the following command:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\"># terraform init\u00a0\u00a0<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Once the terraform initialization is done, it will download the <\/span>provider code-named<span style=\"font-weight: 400;\">\u00a0<\/span><em>.terrraform<\/em> <span style=\"font-weight: 400;\">folder into our present working directory.<\/span><\/p>\n<h4 style=\"text-align: justify;\">Step 12: Terraform Plan<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Once the terraform provider code is downloaded, we need to run the following command:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\"># terraform plan<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">The plan command will help us to see what terraform will do before actually doing it, so it will help us to make any changes to the codes.\u00a0\u00a0\u00a0<\/span><\/p>\n<h4 style=\"text-align: justify;\">Step 13 Terraform apply<\/h4>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To create the resources which we have actually done in the codes, we need to run the following command<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\"># terraform apply\u00a0<\/span>\r\n\r\n<span style=\"font-weight: 400;\">To\u00a0 Auto apply directly, run the following command<\/span>\r\n\r\n<span style=\"font-weight: 400;\"># terraform apply --auto-approve<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">This command will show the same output as plan but it will ask us to continue with our plan so type <\/span><strong>\u201cyes\u201d<\/strong><span style=\"font-weight: 400;\"> to intimate the terraform to create the resources in my case. It will launch an EC2 instance and an Aurora RDS instance.\u00a0\u00a0<\/span><\/p>\n<h3 style=\"text-align: justify;\">Final Words<\/h3>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Thus we have successfully deployed EC2 Instance and Aurora RDS instance with default VPC and Subnet using Terraform. Hope this tutorial helped you to launch the EC2 instance along with Aurora RDS instance with default VPC and Subnet using Terraform. Don\u2019t forget to share your experience of implementing this tutorial in the comment section below.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">If you have any questions regarding this tutorial, just put a comment below and we\u2019ll respond back to you.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previously, we&#8217;ve covered an article on the steps of Setting up RDS Autoscaling in AWS in 15 minutes. Now, in this article, we&#8217;ll cover the step by step tutorial for launching EC2 Instance and Aurora RDS Instance with a default VPC and Subnet using Terraform. If you are looking for the steps to launch EC2 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":733,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[120,121,122],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform | easydeploy.io<\/title>\n<meta name=\"description\" content=\"Check out our step by step tutorial on launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform | easydeploy.io\" \/>\n<meta property=\"og:description\" content=\"Check out our step by step tutorial on launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/\" \/>\n<meta property=\"og:site_name\" content=\"easydeploy.io\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-22T07:49:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-23T04:04:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png\" \/>\n\t<meta property=\"og:image:width\" content=\"830\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Siranjeevi R\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Siranjeevi R\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/\"},\"author\":{\"name\":\"Siranjeevi R\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0e7f79e0cd26f6446f7a76d9d2d3b20c\"},\"headline\":\"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform\",\"datePublished\":\"2019-08-22T07:49:40+00:00\",\"dateModified\":\"2019-08-23T04:04:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/\"},\"wordCount\":1389,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png\",\"keywords\":[\"EC2 Instance and Aurora RDS instance with default VPC and Subnet\",\"EC2 Instance and Aurora RDS instance with default VPC and Subnet using Terraform\",\"launching EC2 Instance and Aurora RDS Instance\"],\"articleSection\":[\"Amazon Web Services\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/\",\"name\":\"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform | easydeploy.io\",\"isPartOf\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png\",\"datePublished\":\"2019-08-22T07:49:40+00:00\",\"dateModified\":\"2019-08-23T04:04:47+00:00\",\"description\":\"Check out our step by step tutorial on launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#primaryimage\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png\",\"contentUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png\",\"width\":830,\"height\":360,\"caption\":\"Launching EC2 Instance and Aurora RDS Instance\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.easydeploy.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#website\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/\",\"name\":\"easydeploy.io\",\"description\":\"A Cloud Architect Company\",\"publisher\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.easydeploy.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\",\"name\":\"EasyDeploy Technologies Pvt Ltd\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png\",\"contentUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png\",\"width\":536,\"height\":100,\"caption\":\"EasyDeploy Technologies Pvt Ltd\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0e7f79e0cd26f6446f7a76d9d2d3b20c\",\"name\":\"Siranjeevi R\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/353661218917699fcc292e9bc0da9081?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/353661218917699fcc292e9bc0da9081?s=96&d=mm&r=g\",\"caption\":\"Siranjeevi R\"},\"url\":\"https:\/\/www.easydeploy.io\/blog\/author\/siru\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform | easydeploy.io","description":"Check out our step by step tutorial on launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/","og_locale":"en_GB","og_type":"article","og_title":"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform | easydeploy.io","og_description":"Check out our step by step tutorial on launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform.","og_url":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/","og_site_name":"easydeploy.io","article_published_time":"2019-08-22T07:49:40+00:00","article_modified_time":"2019-08-23T04:04:47+00:00","og_image":[{"width":830,"height":360,"url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png","type":"image\/png"}],"author":"Siranjeevi R","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Siranjeevi R","Estimated reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#article","isPartOf":{"@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/"},"author":{"name":"Siranjeevi R","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0e7f79e0cd26f6446f7a76d9d2d3b20c"},"headline":"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform","datePublished":"2019-08-22T07:49:40+00:00","dateModified":"2019-08-23T04:04:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/"},"wordCount":1389,"commentCount":0,"publisher":{"@id":"https:\/\/www.easydeploy.io\/blog\/#organization"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#primaryimage"},"thumbnailUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png","keywords":["EC2 Instance and Aurora RDS instance with default VPC and Subnet","EC2 Instance and Aurora RDS instance with default VPC and Subnet using Terraform","launching EC2 Instance and Aurora RDS Instance"],"articleSection":["Amazon Web Services"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/","url":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/","name":"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform | easydeploy.io","isPartOf":{"@id":"https:\/\/www.easydeploy.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#primaryimage"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#primaryimage"},"thumbnailUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png","datePublished":"2019-08-22T07:49:40+00:00","dateModified":"2019-08-23T04:04:47+00:00","description":"Check out our step by step tutorial on launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform.","breadcrumb":{"@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#primaryimage","url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png","contentUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/08\/launching-ec2-instance-and-aurora-rds-instance-with-default-vpc-and-subnet-using-terraform.png","width":830,"height":360,"caption":"Launching EC2 Instance and Aurora RDS Instance"},{"@type":"BreadcrumbList","@id":"https:\/\/www.easydeploy.io\/blog\/launching-ec2-instance-and-aurora-rds-instance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.easydeploy.io\/blog\/"},{"@type":"ListItem","position":2,"name":"Launching EC2 Instance and Aurora RDS Instance with Default VPC and Subnet using Terraform"}]},{"@type":"WebSite","@id":"https:\/\/www.easydeploy.io\/blog\/#website","url":"https:\/\/www.easydeploy.io\/blog\/","name":"easydeploy.io","description":"A Cloud Architect Company","publisher":{"@id":"https:\/\/www.easydeploy.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.easydeploy.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.easydeploy.io\/blog\/#organization","name":"EasyDeploy Technologies Pvt Ltd","url":"https:\/\/www.easydeploy.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png","contentUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png","width":536,"height":100,"caption":"EasyDeploy Technologies Pvt Ltd"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0e7f79e0cd26f6446f7a76d9d2d3b20c","name":"Siranjeevi R","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/353661218917699fcc292e9bc0da9081?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/353661218917699fcc292e9bc0da9081?s=96&d=mm&r=g","caption":"Siranjeevi R"},"url":"https:\/\/www.easydeploy.io\/blog\/author\/siru\/"}]}},"_links":{"self":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/726"}],"collection":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/comments?post=726"}],"version-history":[{"count":16,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/726\/revisions"}],"predecessor-version":[{"id":745,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/726\/revisions\/745"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/media\/733"}],"wp:attachment":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/media?parent=726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/categories?post=726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/tags?post=726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}