This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: ymlnginx | |
spec: | |
containers: | |
- image: nginx | |
name: nginx | |
ports: | |
- containerPort: 8081 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "aws_region" { | |
default = "eu-west-1" | |
} | |
variable "aws_access_key" { | |
default = "access_key" | |
} | |
variable "aws_secret_key" { | |
default = "secret_key" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
access_key = "${var.aws_access_key}" | |
secret_key = "${var.aws_secret_key}" | |
region = "${var.aws_region}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
access_key = "${var.aws_access_key}" | |
secret_key = "${var.aws_secret_key}" | |
region = "${var.aws_region}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. | |