Skip to content

Instantly share code, notes, and snippets.

View BacancyPratik's full-sized avatar

Pratikkumar Panchal BacancyPratik

  • Bacancy Software LLP
View GitHub Profile
apiVersion: v1
kind: Pod
metadata:
name: ymlnginx
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 8081
@BacancyPratik
BacancyPratik / variable.tf
Last active January 30, 2020 13:20
variable.tf
variable "aws_region" {
default = "eu-west-1"
}
variable "aws_access_key" {
default = "access_key"
}
variable "aws_secret_key" {
default = "secret_key"
}
@BacancyPratik
BacancyPratik / sg.tf
Last active January 30, 2020 09:55
sg.tf
resource "aws_security_group" "gate" {
name = "sg_for_nat_vpc"
ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["${var.private_subnet_cidr}"]
}
ingress {
resource "aws_instance" "gate" {
ami = "${var.nat_ami}"
instance_type = "t2.small"
key_name = "${var.aws_key_name}"
vpc_security_group_ids = ["${aws_security_group.gate.id}"]
subnet_id = "${aws_subnet.eu-west-1-public.id}"
associate_public_ip_address = true
source_dest_check = false
tags {
provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
region = "${var.aws_region}"
}
provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
region = "${var.aws_region}"
}
@BacancyPratik
BacancyPratik / s3cli.sh
Created December 11, 2019 08:45
Copy files using s3 cli
# Copy single file to s3 bucket
aws s3 cp file.txt s3://<your bucket name>
# Copy multiple files from directory or directory
aws s3 cp <your directory path> s3://<your bucket name> --recursive
# --recursive flag to indicate that all files must be copied recursively.