My First troposphere code to create instance (sample)

Below is the troposphere library which is used to convert the python script to json and yaml formats which avoids writing of clouformation 🙂   from troposphere import Ref, Template import troposphere.ec2 as ec2 t = Template() instance = ec2.Instance(“myinstance”) instance.ImageId = “ami-951945d0” instance.InstanceType = “t1.micro” t.add_resource(instance) with open(‘jaml.yaml’, ‘w’) as f:    // command… Continue reading My First troposphere code to create instance (sample)

commands in terraform

Terraform cmds  which I used:   export AWS_ACCOUNT=071137033942 export AWS_PROFILE=bis-dev export AWS_REGION=us-east-1   export ENV=[devops|dev|test|qa] export REGION=us1   export TF_STATE_BUCKET=”bis-config-$AWS_REGION-$AWS_ACCOUNT” export TF_STATE_KEY=”terraform/bis/bis-$ENV-$REGION.tfstate” export TF_LOCK_TABLE=”bis-$ENV-tf-state-lock-$REGION”   cd bis-$ENV-$REGION   terraform init \ -lock=”true” \ -backend-config=”bucket=$TF_STATE_BUCKET” \ -backend-config=”key=$TF_STATE_KEY” \ -backend-config=”dynamodb_table=$TF_LOCK_TABLE” \ -backend-config=”profile=$AWS_PROFILE” \ -backend-config=”region=$AWS_REGION” \ -backend-config=”encrypt=true” \ ..   terraform get -update=true .. terraform refresh .. terraform… Continue reading commands in terraform