This is just a brain dump to myself 🙂
I’m moving some functions from Ansible to Terraform and this is some basic commands:
How to find the CentOS 7 official AMI Image
aws ec2 describe-images \ --owners 'aws-marketplace' \ --filters 'Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce' \ --query 'sort_by(Images, &CreationDate)[-1].[ImageId]' \ --region 'eu-central-1' \ --output 'text'
How to find the Ubuntu official Image
Ubuntu AWS ami Locator: https://cloud-images.ubuntu.com/locator/ec2/
AWS Marketplace (Filtered by SO and Free): https://aws.amazon.com/marketplace/
terraform apply # Will create all machines on instance.tf
terraform destroy # Destroy managed infrastructure
terraform plan # Will show but not apply
terraform plan -out exampletest.out #
terraform appy exampletest.out #
terraform import aws_instance.example i-abcd1234
This command locates the AWS instance with ID i-abcd1234 and attaches its existing settings, as described by the EC2 API, to the name aws_instance.example in the Terraform state.
Variables how it works
SysAdmin/DevOps Professional with strong Linux focus, experience with design and support of high availability webscale infrastructures and resilient database deployments.
Deep understanding of Linux, Cloud, Information Security and outsource support.
If you need to send me an encrypted mail. Please import my GPG key:
gpg –keyserver hkp://keyserver.ubuntu.com –recv-keys 63B19B1C52B7AC98033EAC670F6A2073E0EE5DC5