This file contains 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
provider "helm" { | |
kubernetes { | |
config_path = pathexpand(var.kube_config) | |
} | |
} | |
provider "kubernetes" { | |
config_path = pathexpand(var.kube_config) | |
} |
This file contains 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 "kube_config" { | |
type = string | |
default = "~/.kube/config" | |
} | |
variable "namespace" { | |
type = string | |
default = "monitoring" | |
} |
This file contains 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" "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 |
This file contains 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
package main | |
import ( | |
"context" | |
"log" | |
"os" | |
"flag" | |
"github.com/osquery/osquery-go" | |
"github.com/osquery/osquery-go/plugin/table" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/osquery/osquery-go" | |
"log" | |
"time" | |
) | |
func main() { |
This file contains 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
terraform { | |
backend "s3" { | |
bucket = "terraform-remote-states" | |
workspace_key_prefix = "environments" | |
key = "network" | |
region = "us-east-1" | |
} | |
} | |
variable "network_cidr" { |
This file contains 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
terraform { | |
backend "s3" { | |
bucket = "terraform-remote-states" | |
workspace_key_prefix = "environments" | |
key = "network" | |
region = "us-east-1" | |
} | |
} |
This file contains 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 "terraform_remote_state" "network" { | |
backend = "s3" | |
config = { | |
bucket = "terraform-remote-states" | |
key = "environments/staging/network.tf" | |
region = "us-east-1" | |
} | |
} |
This file contains 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
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" { |
This file contains 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 "region" { | |
type = string | |
description = "(Required) AWS region" | |
} | |
variable "tags" { | |
type = map(string) | |
description = "(Required) Tags for resources" | |
} |