Skip to content

Instantly share code, notes, and snippets.

View gilmoregrills's full-sized avatar
😶‍🌫️

Robin Lightfoot gilmoregrills

😶‍🌫️
View GitHub Profile
@gilmoregrills
gilmoregrills / PS1.sh
Last active February 9, 2024 14:19
custom shell prompt
autoload -Uz vcs_info
autoload -U colors && colors
SUCCESS_EMOJIS=("🙆‍♀️" "💁‍♀️" "🙋‍♀️")
FAILURE_EMOJIS=("🙅‍♀️" "🤦‍♀️" "🤷‍♀️")
setopt prompt_subst
setopt PROMPT_SUBST
zstyle ':vcs_info:git:*' check_for_changes true
zstyle ':vcs_info:git:*' check_for_staged_changes true
zstyle ':vcs_info:git:*' formats ":%s(%b)"
resource "aws_key_pair" "interview" {
key_name = "interview"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCqLQOtFuCey+7vvEPjjNHeoId05DesuotQOCuXAqPX66Rqz+5tJ2vV/C2R1yNV9NIRH664rWBWkCj3QqiaAWettg0Bjm2EnRbAWr2/a2qs8lt5VENxd6bONH5qyXhEXT7hb7NoA08PFTApDauLrN/3hdkcV64mB9h1YzPpc7rib0elaPmloCHwZBDtkHWF6zAdSS5r11Bmf0kl/OeohQKjzj+emOAUPBRIHX8rUjK05EERa+LEnM+J5PpbbENJDUBIVg9ohmYPKzr8ogIsL8DmOSpw5fVfsXJSWvBL45BVjeTFGMdHjzi8JCW48ms+je5lBSiG57ZO5f3ADbX/qtxah5EzxVvjnzpIbgrKjjXVlyCoO8Z4WsHr9CpmB0g9nRUE6IG2YWJboD9YpcmSzyEmySfJ8MqDvb0Tzw0mrFH9PBodNgL2odVEE+zXBMTZ/9pHWYIDbT5H0RS2ovodEqeKjSWjIUHOoVEQ2Ex2lQ4WdsWOReZbrmncoSmdy1FWEK2euyw3c2xIAjXVxyUW3NtDzgbkPZkfhUX1lHUGnndf2on3Nnt26tc218eHQ1pEU7WMr0BVkUzMuAeshwQdHM4VrK0CXAvDsh5sysgRLj63lbJ4wd3XDq14PhWc5Y4Nkss54GuZBN7HFkKgBBFySmbN7Y9p1RUaCFQyGHdC8VeQbw=="
}
resource "aws_instance" "web" {
ami = "${data.aws_ami.amazon-linux-2.id}"
instance_type = "t2.micro"
key_name = "interview"
vpc_security_group_ids = ["${aws_securit
data "aws_ami" "amazon-linux-2" {
most_recent = true
owners = ["amazon"]
filter {
name = "owner-alias"
values = ["amazon"]
}
filter {
# Security Groups
data "http" "caller_ip" {
url = "http://ipv4.icanhazip.com"
}
resource "aws_security_group" "allow_http_ssh" {
name = "allow_http_ssh"
description = "Allow HTTP SSH inbound traffic"
vpc_id = "${module.vpc.vpc_id}"
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "1.55.0"
name = "unicorn-vpc"
cidr = "10.99.0.0/16"
azs = ["eu-west-2a"]
public_subnets = ["10.99.1.0/24"]
assign_generated_ipv6_cidr_block = true
### Keybase proof
I hereby claim:
* I am gilmoregrills on github.
* I am eel_boy (https://keybase.io/eel_boy) on keybase.
* I have a public key ASDB3wS_PqNJTLvxFQSwPSrPOhNbdVoo-CuBknMnyiathwo
To claim this, I am signing this object: