Created
March 30, 2024 04:28
-
-
Save nivleshc/5b811d78ff596abaa1a87e713d78b9a6 to your computer and use it in GitHub Desktop.
Contents of grafana/main.tf from the visualise-network-traffic repository.
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
# create the Grafana server | |
resource "aws_instance" "grafana_server" { | |
ami = var.grafana_server_details["ami_id"] | |
instance_type = var.grafana_server_details["instance_type"] | |
key_name = var.grafana_server_details["key_name"] | |
subnet_id = var.grafana_server_details["subnet_id"] | |
vpc_security_group_ids = [aws_security_group.grafana_sg.id] | |
user_data = templatefile("${path.module}/scripts/user-data.tpl.sh", { | |
admin_username = var.grafana_server_details["admin_username"], | |
admin_password = var.grafana_server_details["admin_password"] | |
}) | |
iam_instance_profile = aws_iam_instance_profile.grafana_profile.name | |
tags = var.grafana_server_details["tags"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment