Skip to content

Instantly share code, notes, and snippets.

View PrashantBhatasana's full-sized avatar
🎯
Focusing

Bhatasana Prashant PrashantBhatasana

🎯
Focusing
View GitHub Profile
@PrashantBhatasana
PrashantBhatasana / main.tf
Created June 16, 2022 07:35
Terraform script to deploy VPC
data "aws_availability_zones" "available" {
state = "available"
}
resource "aws_vpc" "aws_vpc" {
cidr_block = var.vpc_cidr_block
enable_dns_hostnames = true
tags = {
Name = "aws_vpc"
resource "aws_iam_role" "inspector_event_role" {
name = "inspector-event-role-${var.random_id_prefix}"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
resource "aws_cloudwatch_event_rule" "inspector_event_schedule" {
name = "inspector-schedule-cloudwatch-event-rule${var.random_id_prefix}"
description = "Trigger an Inspector Assessment"
schedule_expression = var.schedule_expression
}
resource "aws_cloudwatch_event_target" "inspector_event_target" {
rule = aws_cloudwatch_event_rule.inspector_event_schedule.name
arn = var.inspector_assessment_template_arn
role_arn = var.inspector_event_role_arn
@PrashantBhatasana
PrashantBhatasana / aws-inspector.tf
Last active March 21, 2021 12:12
This is Terraform file to create AWS inspector.
resource "aws_inspector_resource_group" "inspector_resource_group" {
tags = {
GroupName = "Production"
<Tag Name> = "<Tag Value>"
}
}
resource "aws_inspector_assessment_target" "inspector_assessment_target" {
name = "<Name of Your Assessment Target>"
resource_group_arn = aws_inspector_resource_group.inspector_resource_group.arn
@PrashantBhatasana
PrashantBhatasana / buildspec.yml
Created October 9, 2020 07:25
This is the Buildspec file for AWS CodePipeline  Deploy Alexa skill using ask-skill kit
version: 0.2
env:
variables:
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
ASK_VENDOR_ID: "${ASK_VENDOR_ID}"
ASK_REFRESH_TOKEN: "${ASK_REFRESH_TOKEN}"
phases:
@PrashantBhatasana
PrashantBhatasana / buildspec.yml
Created August 3, 2020 12:38
This is the builspec file for Serverless application deployment.
version: 0.2
phases:
install:
commands:
- npm install
- npm install -g serverless
build:
commands:
- serverless deploy --stage ${environment}
@PrashantBhatasana
PrashantBhatasana / buildspec.yml
Created July 2, 2020 05:05
This is the Buildspec file for AWS CodePipeline - Build Fluttter App
version: 0.2
phases:
install:
runtime-versions:
android: 29
java: openjdk8
commands:
- pwd
pre_build:
commands:
@PrashantBhatasana
PrashantBhatasana / Main.tf
Created June 30, 2020 13:24
Terraform -  AWS VPC with Private, Public Subnets with NAT
/*==== The VPC ======*/
resource "aws_vpc" "vpc" {
cidr_block = "${var.vpc_cidr}"
enable_dns_hostnames = true
enable_dns_support = true
tags = {
Name = "${var.environment}-vpc"
Environment = "${var.environment}"
}
}
@PrashantBhatasana
PrashantBhatasana / buildspec.yml
Last active June 11, 2020 06:29
This is the Buildspec file for AWS CodePipeline - Build React Native App https://medium.com/@prashant_48386/aws-codepipeline-build-react-native-app-dc47e0575e0c
version: 0.2
phases:
install:
runtime-versions:
android: 29
java: corretto8
nodejs: 10
commands:
- pwd
pre_build:
data "template_file" "test_def" {
template = "${file("${path.module}/testdefination/containerdef.json")}"
vars = {
JICOFO_COMPONENT_SECRET = "${var.JICOFO_COMPONENT_SECRET}"
JICOFO_AUTH_PASSWORD = "${var.JICOFO_AUTH_PASSWORD}"
JVB_AUTH_PASSWORD = "${var.JVB_AUTH_PASSWORD}"
JIGASI_XMPP_PASSWORD = "${var.JIGASI_XMPP_PASSWORD}"
JIBRI_RECORDER_PASSWORD = "${var.JIBRI_RECORDER_PASSWORD}"
JIBRI_XMPP_PASSWORD = "${var.JIBRI_XMPP_PASSWORD}"