The Fastly dev community discord is intended to be a place where people working on (or curious about) the Fastly Edge Platform can collaborate with one another.
This Discord Server is not affiliated with Fastly, Inc.
module "iam" { | |
source = "git@github.com:ulikabbq/grafana-fargate?ref=v1.0//tf/iam_role/" | |
grafana_account_id = "433223883348" | |
} |
resource "aws_ecs_service" "grafana" { | |
name = "grafana" | |
cluster = aws_ecs_cluster.grafana.name | |
task_definition = aws_ecs_task_definition.grafana.arn | |
desired_count = var.grafana_count | |
launch_type = "FARGATE" | |
network_configuration { | |
security_groups = [aws_security_group.grafana_ecs.id] | |
subnets = var.subnets |
# https://github.com/grafana/grafana-docker | |
FROM grafana/grafana:6.5.1 | |
# Install chamber | |
USER root | |
ENV CHAMBER_VERSION=2.7.5 | |
ENV CHAMBER_SHA256SUM=c85bf50f0bbb7db4fe00a1467337b07973f3680c40e808f124b08f437d493eea | |
RUN apk add curl | |
RUN curl -Ls https://github.com/segmentio/chamber/releases/download/v${CHAMBER_VERSION}/chamber-v${CHAMBER_VERSION}-linux-amd64 > chamber-linux-amd64 && \ | |
chmod +x chamber-linux-amd64 && \ |
module "grafana" { | |
source = "git@github.com:ulikabbq/grafana-fargate?ref=v1.0//tf" | |
dns_zone = "ZZ7C1JZLM75QT" | |
region = "us-east-1" | |
vpc_id = "vpc-04e9a561" | |
lb_subnets = ["subnet-6ef25245", "subnet-32089345"] | |
subnets = ["subnet-28fd4671", "subnet-8ad27ca4"] | |
db_subnet_ids = ["subnet-6ef25245", "subnet-32089345"] | |
cert_arn = "arn:aws:acm:us-east-1:433223883348:certificate/9891d84e-8a28-4531-afdb-78a2719b1a63" |
$target = "Spooler", "Spork Client", "WinRM", "Spork Agent Service", "BITS","WSearch" | |
$list = "winrm", "foo", "spooler", "spor*", "bar" | |
$array = @() | |
foreach($item in $list){ | |
foreach($word in $target){ | |
if($word -like $item) { | |
$array += $item | |
} |
resource "aws_ecs_service" "grafana" { | |
name = "grafana" | |
cluster = "${aws_ecs_cluster.grafana.name}" | |
task_definition = "${aws_ecs_task_definition.grafana.arn}" | |
desired_count = 1 | |
launch_type = "FARGATE" | |
network_configuration { | |
security_groups = ["${aws_security_group.grafana_ecs.id}"] | |
subnets = ["${var.subnets}"] |
server { | |
listen 80; | |
server_name ${SERVER_NAME}; | |
root /usr/share/nginx/www; | |
index index.html index.htm; | |
# 301 redirect http traffic to https | |
if ($http_x_forwarded_proto = 'http') { | |
return 301 https://$server_name$request_uri; | |
} |
module "grafana" { | |
source = "git@github.com:ulikabbq/grafana-fargate?ref=v0.3//tf" | |
account_id = "883447927050" | |
dns_zone = "E37HSFATM75UF" | |
dns_name = "grafana.exampledomain.com" | |
cert_arn = "arn:aws:acm:us-east-1:883447927050:certificate/c037931f-c278-4cc4-a228-a2a7ea751dc5" | |
vpc_id = "vpc-04e9a561" | |
subnets = ["subnet-61swn044xb5p"] |
GRANT USAGE ON `grafana`.* to 'grafana'@'cluster-endpoint.us-east-1.rds.amazonaws.com' identified by 'db_password'; | |
GRANT ALL PRIVILEGES ON `grafana`.* to 'grafana'@'cluster-endpoint.us-east-1.rds.amazonaws.com' with grant option; | |
flush privileges; |