Skip to content

Instantly share code, notes, and snippets.

View glendmaatita's full-sized avatar

Glend Maatita glendmaatita

  • Surabaya, Indonesia
View GitHub Profile
@glendmaatita
glendmaatita / index.ts
Created June 23, 2024 05:46
Pulumi Getting Started
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create an AWS S3 bucket
const bucket = new aws.s3.Bucket("my-bucket", {
website: {
indexDocument: "index.html",
},
});
@glendmaatita
glendmaatita / ingress.yml
Created June 12, 2024 09:22
Vault Ingress
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: vault
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-issuer
spec:
rules:
@glendmaatita
glendmaatita / gcs.tf
Created June 12, 2024 09:06
Vault Bucket Terraform
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket
resource "google_storage_bucket" "my-vault-bucket" {
name = "my-vault-bucket"
location = "US-CENTRAL1"
storage_class = "STANDARD"
uniform_bucket_level_access = false
lifecycle_rule {
condition {
@glendmaatita
glendmaatita / values.yaml
Created June 12, 2024 09:02
Vault Values
server:
extraEnvironmentVars:
GOOGLE_REGION: US-CENTRAL1
GOOGLE_PROJECT: my-project
GOOGLE_APPLICATION_CREDENTIALS: /vault/userconfig/vault-config/vault-sa.json
extraVolumes:
- type: secret
name: vault-config
path: null
@glendmaatita
glendmaatita / deployment.yaml
Last active June 11, 2024 06:52
Atlantis Deployment
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: atlantis
labels:
app: atlantis
spec:
selector:
matchLabels:
@glendmaatita
glendmaatita / volume.yml
Last active June 11, 2024 06:50
Atlantis Volume
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: atlantis-kubeconf-pvc
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
@glendmaatita
glendmaatita / sa.yaml
Last active June 11, 2024 05:23
Atlantis
# in order to be able to run Atlantis: https://www.runatlantis.io/
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_service_account
resource "google_service_account" "atlantis-sa" {
account_id = "atlantis-sa"
project = "my-project"
}
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_project_iam
resource "google_project_iam_member" "atlantis-im" {
project = "my-project"
@glendmaatita
glendmaatita / shell.nix
Last active February 22, 2024 16:17
OnXP Python Web Development
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";
pkgs = import nixpkgs { config = { allowUnfree = true; }; overlays = []; };
git = pkgs.git.overrideAttrs (oldAttrs: rec {
version = "2.42.0";
});
podman = pkgs.podman.overrideAttrs (oldAttrs: rec {
version = "4.7.2";
@glendmaatita
glendmaatita / shell.nix
Last active January 29, 2024 09:57
ONXP Starter Kit
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";
pkgs = import nixpkgs { config = { allowUnfree = true; }; overlays = []; };
kubectl = pkgs.kubectl.overrideAttrs (oldAttrs: rec {
version = "1.28.4";
});
terraform = pkgs.terraform.overrideAttrs (oldAttrs: rec {
version = "1.6.4";
@glendmaatita
glendmaatita / kyverno-1.sh
Last active April 27, 2023 03:51
Kyverno-1
~$ gcloud container clusters describe my-k8s --format='value(privateClusterConfig.masterIpv4CidrBlock)' --region=asia-southeast2-a
# 172.18.0.0/28