Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
fix(amp): fixed arn for AMP logging (#62)
Browse files Browse the repository at this point in the history
* fix(amp): fixed arn for AMP logging

* fix(amp): enabled managed_prometheus module

* terraform-docs: automated action

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
anthonygauthier and github-actions[bot] authored Oct 3, 2023
1 parent e3eafc9 commit e86c923
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ When you set up NAC the VPC endpoint URL will not have a route to the public URL
| Name | Source | Version |
|------|--------|---------|
| <a name="module_managed_grafana"></a> [managed\_grafana](#module\_managed\_grafana) | github.com/liatrio/terraform-aws-managed-service-grafana.git | n/a |
| <a name="module_managed_prometheus"></a> [managed\_prometheus](#module\_managed\_prometheus) | terraform-aws-modules/managed-service-prometheus/aws | n/a |

## Resources

Expand Down
18 changes: 10 additions & 8 deletions prometheus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "aws_prometheus_workspace" "amp_ws" {
alias = var.amp_ws_alias

logging_configuration {
log_group_arn = aws_cloudwatch_log_group.amp_log_group.arn
log_group_arn = "${aws_cloudwatch_log_group.amp_log_group.arn}:*"
}
}

Expand Down Expand Up @@ -69,12 +69,14 @@ resource "aws_iam_role_policy" "amp_role_policy" {
}

# TODO: We are currently flowing data through the workspace above, we will eventually want to move everything to the workspace being created by this public module.
# module "managed_prometheus" {
# count = var.enable_managed_prometheus == true ? 1 : 0
# source = "terraform-aws-modules/managed-service-prometheus/aws"
module "managed_prometheus" {
count = var.enable_managed_prometheus == true ? 1 : 0
source = "terraform-aws-modules/managed-service-prometheus/aws"

# create_workspace = var.amp_create_workspace == true ? var.amp_create_workspace : false
# workspace_id = var.amp_workspace_id
create_workspace = var.amp_create_workspace == true ? var.amp_create_workspace : false
workspace_id = var.amp_workspace_id

# logging_configuration = var.logging_configuration
# }
logging_configuration = {
log_group_arn = "${aws_cloudwatch_log_group.amp_log_group.arn}:*"
}
}

0 comments on commit e86c923

Please sign in to comment.