Skip to content

Instantly share code, notes, and snippets.

View guivin's full-sized avatar

Guillaume Vincent guivin

View GitHub Profile
@guivin
guivin / providers.tf
Created March 22, 2022 08:14
providers.tf
provider "helm" {
kubernetes {
config_path = pathexpand(var.kube_config)
}
}
provider "kubernetes" {
config_path = pathexpand(var.kube_config)
}
@guivin
guivin / variables.tf
Created March 22, 2022 08:13
variables.tf
variable "kube_config" {
type = string
default = "~/.kube/config"
}
variable "namespace" {
type = string
default = "monitoring"
}
@guivin
guivin / prometheus.tf
Created March 22, 2022 08:11
prometheus.tf
resource "helm_release" "prometheus" {
chart = "prometheus"
name = "prometheus"
namespace = var.namespace
repository = "https://prometheus-community.github.io/helm-charts"
# When you want to directly specify the value of an element in a map you need \\ to escape the point.
set {
name = "podSecurityPolicy\\.enabled"
value = true
@guivin
guivin / main.go
Created October 30, 2021 15:00
osquery-go-new-table
package main
import (
"context"
"log"
"os"
"flag"
"github.com/osquery/osquery-go"
"github.com/osquery/osquery-go/plugin/table"
@guivin
guivin / main.go
Created October 30, 2021 14:59
osquery-go-query
package main
import (
"fmt"
"github.com/osquery/osquery-go"
"log"
"time"
)
func main() {
@guivin
guivin / locals.tf
Last active September 23, 2021 07:03
network/main.tf
terraform {
backend "s3" {
bucket = "terraform-remote-states"
workspace_key_prefix = "environments"
key = "network"
region = "us-east-1"
}
}
variable "network_cidr" {
@guivin
guivin / main.tf
Created September 23, 2021 06:23
Terraform backend with workspace
terraform {
backend "s3" {
bucket = "terraform-remote-states"
workspace_key_prefix = "environments"
key = "network"
region = "us-east-1"
}
}
@guivin
guivin / data.tf
Created September 21, 2021 06:46
data_terraform_remote_state_network
data "terraform_remote_state" "network" {
backend = "s3"
config = {
bucket = "terraform-remote-states"
key = "environments/staging/network.tf"
region = "us-east-1"
}
}
@guivin
guivin / main.tf
Created September 20, 2021 18:23
environments/staging/main.tf
terraform {
backend "s3" {
bucket = "terraform-remote-states"
# The key definition changes following the environment
key = "environments/staging/network.tf"
region = "us-east-1"
}
}
module "network" {
@guivin
guivin / variables.tf
Created August 21, 2021 10:56
terraform/modules/aws-ecs-wordpress/variables.tf
variable "region" {
type = string
description = "(Required) AWS region"
}
variable "tags" {
type = map(string)
description = "(Required) Tags for resources"
}