-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
41 lines (36 loc) · 809 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
provider "aws" {
region = var.region
shared_credentials_files = ["/home/dungpham/.aws/credentials"]
}
locals {
tags = {
project = var.project
}
}
data "aws_region" "current" {}
resource "aws_resourcegroups_group" "resourcegroups_group" {
name = "${var.project}-s3-backend"
resource_query {
query = <<-JSON
{
"ResourceTypeFilters": [
"AWS::AllSupported"
],
"TagFilters": [
{
"Key": "project",
"Values": ["${var.project}"]
}
]
}
JSON
}
}
output "config" {
value = {
bucket = aws_s3_bucket.s3_bucket.bucket
region = data.aws_region.current.name
role_arn = aws_iam_role.iam_role.arn
dynamodb_table = aws_dynamodb_table.dynamodb_table.name
}
}