AWS Classroom Series – 04/Feb/2021

Cloudformation contd..

  • Lets add the format version to Cloud formation json files Refer Here
  • Adding Format version
{
	"AWSTemplateFormatVersion" : "2010-09-09",
	"Resources": {
		"mys3bucket" : {
			"Type" : "AWS::S3::Bucket",
			"Properties" : {
				"BucketName": "qts3fromcftbd"
			}
		}
	}
}

Scenario: Lets Create a virtual private cloud (VPC)

  • Choose a private network range
  • Lets create one vpc manually
  • Now lets try to create this from cloud formation template
  • Dev Setup:
    • Ensure Visual studio code is installed
    • Install cf extension
  • Now Add a template with vpc resource
  • Refer Here for the changes done
  • Now lets create a stack using this template
  • In the template the cidr value is fixed to 10.10.0.0/16, if the users want to create a network with some other range they have to change template which is not a good sign, so to add flexibility of the users to pass values, lets use Cloud formation parameters Refer Here
  • Refer Here for the changeset
  • Now lets update the stack or delete and recreate
  • It is a good practice to create parameters for all the possible changes that can happen in architecture
  • What will happen if i change certain values in cloudformation
  • Changes to properties in cloudformation might have
    • no impact
    • recreated
  • This is reflected in the documentation
  • Exercise: Try changing CIDR value and observe the replace in the AWS Cloudformation stack.

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%