generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.yaml
149 lines (129 loc) · 4.11 KB
/
README.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name : Terraform Module Athena
# License of this project
license: "APACHE"
# Canonical GitHub repo
github_repo: clouddrove/terraform-aws-athena
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-aws-athena.svg"
url: "https://github.com/clouddrove/terraform-aws-athena/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-aws-athena/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-aws-athena/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
- name: "Changelog"
image: "https://img.shields.io/badge/Changelog-blue"
url: "CHANGELOG.md"
prerequesties:
- name: Terraform
url: https://learn.hashicorp.com/terraform/getting-started/install.html
version: ">= 1.6.6"
providers:
- name: aws
url: https://aws.amazon.com/
version: ">= 5.31.0"
module_dependencies:
- name: Labels Module
url: https://github.com/clouddrove/terraform-aws-labels
description: Provides resource tagging.
- name: S3 Bucket Module
url: https://github.com/clouddrove/terraform-aws-s3.git
description: Provides S3 Bucket resources.
- name: AWS KMS Module
url: https://github.com/clouddrove/terraform-aws-kms.git
description: Provides AWS KMS Resources.
# description of this project
description: |-
Terraform Athena module to create new modules using this as baseline
# How to use this project
usage: |-
Here are some examples of how you can use this module in your inventory structure:
## Basic Example to create a basic AWS Athena without extra configs
```hcl
module "athena" {
source = "clouddrove/athena/aws"
version = "1.0.0"
name = "athena"
environment = "test"
label_order = ["name", "environment"]
enabled = true
workgroup_force_destroy = true
# S3 Bucket Configuration
bucket_force_destroy = true
s3_output_path = "accessLogs/queryresults/" # The S3 bucket path used to store query results
# Database for Athena
databases = {
database1 = {
force_destroy = true
properties = {
custom_prop_1 = "example"
}
}
}
}
```
## Complete Example to create a basic AWS Athena without extra configs
```hcl
locals {
name = "athena"
environment = "test"
label_order = ["name", "environment"]
}
module "s3_bucket" {
source = "clouddrove/s3/aws"
version = "1.3.0"
name = format("%s-bucket-test", local.name)
versioning = true
acl = "private"
force_destroy = true
}
module "athena" {
source = "clouddrove/athena/aws"
version = "1.0.0"
name = local.name
environment = local.environment
label_order = local.label_order
enabled = true
workgroup_force_destroy = true
# S3 Bucket Configuration
create_s3_bucket = false
athena_s3_bucket_id = module.s3_bucket.id
s3_output_path = "outputs/" # The S3 bucket path used to store query results
# Database for Athena
databases = {
database1 = {
force_destroy = true
properties = {
custom_prop_1 = "example"
}
}
}
# Data catalog to test terraform
data_catalogs = {
glue1 = {
description = "This is an example to test Terraform"
type = "GLUE"
parameters = {
catalog-id : "123456789012" # The catalog_id is the account ID of the AWS account to which the AWS Glue catalog belongs.
}
}
}
# Named Queries to test terarform
named_queries = {
query1 = {
database = "database1"
description = "This is an example query to test Terraform"
query = "SELECT * FROM %s limit 10;"
}
}
}
```