Skip to content

Instantly share code, notes, and snippets.

View EmmanuelOuzan's full-sized avatar
😃
Happy DevOps guy

Emmanuel Ouzan EmmanuelOuzan

😃
Happy DevOps guy
View GitHub Profile
@EmmanuelOuzan
EmmanuelOuzan / main.tf
Created May 9, 2023 15:28 — forked from away168/main.tf
s3 bucket private
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.75.0"
}
}
}
provider "aws" {
@EmmanuelOuzan
EmmanuelOuzan / Imporved_score.py
Created June 3, 2021 14:33
Improved code with Danny
# Getting the difficulty from live.py
# opening file and summing
import os
def add_score(difficulty):
# Calculating user score
score = (difficulty * 3) + 5
# Check if file exists
if os.path.isfile('score.txt'):
# Getting the difficulty from live.py
# opening file and summing
import os
def add_score(difficulty):
# Calculating user score
score = (difficulty * 3) + 5
# Checks if the file exists
try:
@EmmanuelOuzan
EmmanuelOuzan / IAM_role.json
Last active May 26, 2021 14:45
Lambada Create EC2 instance function code
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
@EmmanuelOuzan
EmmanuelOuzan / main.tf
Last active May 25, 2021 13:14
Creation of aws resources with terrafrom !
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.27"
}
}
required_version = ">= 0.14.9"
}
version: "3.5"
services:
flask-api:
build:
context: ./api
restart: unless-stopped
container_name: flask-api
image: example-flask-api
ports: