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
#!/bin/bash | |
# ------------------------------------------------------------------------------ | |
# Script Name: heart_rate_zones.sh | |
# Description: This script calculates heart rate training zones based on | |
# the user's maximum heart rate (FC_MAX) and resting heart rate | |
# (FC_REPOS) using the Karvonen formula. It provides the target | |
# heart rate ranges for various intensity zones, which are useful | |
# for training and fitness purposes. | |
# |
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
repos: | |
- repo: https://github.com/antonbabenko/pre-commit-terraform | |
rev: v1.62.3 | |
hooks: | |
- id: terraform_fmt | |
- id: terraform_validate | |
- id: terraform_docs | |
args: | |
- '--args=--lockfile=false' | |
- id: terraform_tflint |
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
config { | |
force = false | |
disabled_by_default = false | |
} | |
plugin "aws" { | |
enabled = true | |
version = "0.12.0" | |
source = "github.com/terraform-linters/tflint-ruleset-aws" | |
} |
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 "aws" { | |
region = "missing" | |
} | |
resource "aws_instance" "foo" { | |
ami = "ami-0ff8a91507f77f867" | |
instance_type = "wrong" # invalid type! | |
} |
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 "aws" { | |
region = "us-east-1" | |
} | |
resource "aws_instanc" "foo" { | |
ami = "ami-0ff8a91507f77f867" | |
instance_type = "t2.small" | |
} |
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 "kubernetes_secret" "grafana" { | |
metadata { | |
name = "grafana" | |
namespace = var.namespace | |
} | |
data = { | |
admin-user = "admin" | |
admin-password = random_password.grafana.result | |
} |
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" | |
version = "15.5.3" | |
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
provider "helm" { | |
# Several Kubernetes authentication methods are possible: https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#authentication | |
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
# Creating namespace with the Kubernetes provider is better than auto-creation in the helm_release. | |
# You can reuse the namespace and customize it with quotas and labels. | |
resource "kubernetes_namespace" "monitoring" { | |
metadata { | |
name = var.namespace | |
} | |
} |
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" | |
} |
NewerOlder