Skip to content

Add S3 bucket and policy configuration for Grafana integration#22

Open
whatislavx wants to merge 1 commit into
mate-academy:mainfrom
whatislavx:main
Open

Add S3 bucket and policy configuration for Grafana integration#22
whatislavx wants to merge 1 commit into
mate-academy:mainfrom
whatislavx:main

Conversation

@whatislavx
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 13:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the Terraform resources and inputs needed to provision an S3 bucket for Grafana and attach a bucket policy granting the Grafana IAM role access.

Changes:

  • Added aws_s3_bucket, aws_s3_bucket_policy, and an aws_iam_policy_document with the required two statements.
  • Introduced new input variables for bucket name/tags and updated outputs to reference the new bucket resource.
  • Updated terraform.tfvars and committed a generated tfplan.json reflecting the new infrastructure plan.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
main.tf Creates the S3 bucket and bucket policy allowing the Grafana IAM role to list the bucket and read/write objects.
variables.tf Defines new variables for bucket_name and bucket_tags (and reformats the existing IAM role variable).
outputs.tf Fixes the output to reference aws_s3_bucket.backups_bucket.
terraform.tfvars Provides concrete values for the newly added variables and the Grafana IAM role ARN.
tfplan.json Captures the Terraform plan JSON showing the bucket and policy creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread variables.tf
type = string
description = ""
type = string
description = ""
Comment thread main.tf
Comment on lines +9 to +12
policy = data.aws_iam_policy_document.policy-document.json
}

data "aws_iam_policy_document" "policy-document" {
Comment thread main.tf
# 2. Confugure bucket policy to allow grafana iam role to use storage
tags = var.bucket_tags
}

Copy link
Copy Markdown

@linubah linubah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants