Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/f7ba577efd041d7f21a40a4ed5466b34 to your computer and use it in GitHub Desktop.
Save nivleshc/f7ba577efd041d7f21a40a4ed5466b34 to your computer and use it in GitHub Desktop.
Contents of grafana/locals.tf from the visualise-network-traffic repository.
locals {
account_id = data.aws_caller_identity.current.account_id
region = data.aws_region.current.name
loggroup_name = var.grafana_server_details["data_source"]["default_log_group_name"]
cloudwatch_ds_uid = var.grafana_server_details["data_source"]["uid"]
cloudwatch_org_id = var.grafana_server_details["data_source"]["org_id"]
traffic_dest_cidr = var.grafana_server_details["data_source"]["traffic_dest_cidr"]
traffic_dest_prefix = join(".", [split(".", local.traffic_dest_cidr)[0], split(".", local.traffic_dest_cidr)[1], split(".", local.traffic_dest_cidr)[2]])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment