This file contains hidden or 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
#!/usr/bin/env bash | |
for user in $(aws iam list-users --output text | awk '{print $NF}'); do | |
aws iam list-access-keys --user $user --output text | |
test $? -gt 128 && exit | |
done |
This file contains hidden or 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
import json | |
import requests | |
import websockets | |
import asyncio | |
import os | |
import urllib.request | |
url = "https://api.cloudflare.com/client/v4/" | |
x_auth_token = os.environ['CLOUDFLARE_LOG_READ_TOKEN'] |
This file contains hidden or 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 "kubernetes_manifest" "virtualservice_istio_system_kiali_vs" { | |
depends_on = [ | |
kubernetes_manifest.k8s-istio-gateway | |
] | |
provider = kubernetes | |
manifest = { | |
"apiVersion" = "networking.istio.io/v1alpha3" | |
"kind" = "VirtualService" | |
"metadata" = { | |
"name" = "kiali-vs" |
This file contains hidden or 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 "kubernetes_manifest" "k8s-istio-gateway" { | |
depends_on = [ | |
kubernetes_manifest.k8s-wildcard-cert | |
] | |
provider = kubernetes | |
manifest = { | |
"apiVersion" = "networking.istio.io/v1alpha3" | |
"kind" = "Gateway" | |
"metadata" = { | |
name = "istio-gateway" |
This file contains hidden or 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 "kubernetes_manifest" "k8s-wildcard-cert" { | |
depends_on = [ | |
kubectl_manifest.origin-ca-issuer | |
] | |
manifest = { | |
"apiVersion" = "cert-manager.io/v1" | |
"kind" = "Certificate" | |
"metadata" = { | |
name = "k8s-wildcard-cert" |
This file contains hidden or 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
data "kubectl_filename_list" "origin-ca-issuer" { | |
pattern = "./origin-ca-issuer/issuer.yaml" | |
} | |
resource "kubectl_manifest" "origin-ca-issuer" { | |
depends_on = [ | |
kubernetes_secret.origin-ca-key | |
] | |
count = length(data.kubectl_filename_list.origin-ca-issuer.matches) | |
yaml_body = file(element(data.kubectl_filename_list.origin-ca-issuer.matches, count.index)) |
This file contains hidden or 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 "kubernetes_secret" "origin-ca-key" { | |
metadata { | |
name = "origin-ca-key" | |
namespace = "istio-system" | |
} | |
data = { | |
key = var.origin-ca-key | |
} | |
} |
This file contains hidden or 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 "helm_release" "origin-ca-issuer" { | |
depends_on = [ | |
kubernetes_namespace.origin-ca-issuer-system | |
] | |
name = "origin-ca-issuer" | |
namespace = data.kubernetes_namespace.origin-ca-issuer-system.metadata[0].name | |
chart = "./origin-ca-issuer/deploy/charts/origin-ca-issuer/." | |
version = "0.5.0" | |
create_namespace = false | |
values = [ |
This file contains hidden or 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 "kubernetes_namespace" "origin-ca-issuer-system" { | |
depends_on = [ | |
kubectl_manifest.origin-ca-issuer-crds | |
] | |
metadata { | |
annotations = { | |
name = "origin-ca-issuer-system" | |
} | |
labels = merge( | |
local.tags, |
This file contains hidden or 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 "manifestversion" { | |
type = string | |
description = "origin-ca-issuer CustomResourceDefinition resources version" | |
default = "v0.6.1" | |
} | |
data "http" "manifestfile" { | |
url = "https://raw.githubusercontent.com/cloudflare/origin-ca-issuer/${var.manifestversion}/deploy/crds/cert-manager.k8s.cloudflare.com_originissuers.yaml" | |
} |
NewerOlder