Skip to content

Commit fd4d76c

Browse files
Merge pull request #9 from segmentio/glue-outputs
feat(glue): add database_name output
2 parents 860ee03 + dc37114 commit fd4d76c

File tree

8 files changed

+63
-19
lines changed

8 files changed

+63
-19
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
ruby '2.4.2'
3+
ruby '>=2.4.2'
44

55
source 'https://rubygems.org/' do
66
gem 'aws-sdk', '~> 3.0.1'

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ fmt:
66
terraform fmt -recursive
77

88
lint:
9-
tflint ./modules/glue
10-
tflint ./modules/iam
11-
tflint ./modules/emr
9+
tflint --disable-rule=terraform_deprecated_interpolation ./modules/glue
10+
tflint --disable-rule=terraform_deprecated_interpolation ./modules/iam
11+
tflint --disable-rule=terraform_deprecated_interpolation ./modules/emr
1212

1313
docs:
1414
terraform-docs markdown document ./modules/glue > ./modules/glue/README.md

modules/emr/README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Providers
2+
3+
The following providers are used by this module:
4+
5+
- aws
6+
17
## Required Inputs
28

39
The following input variables are required:
@@ -18,6 +24,14 @@ Type: `string`
1824

1925
The following input variables are optional (have default values):
2026

27+
### cluster\_name
28+
29+
Description: Name of the EMR cluster that the module creates
30+
31+
Type: `string`
32+
33+
Default: `"segment-data-lake"`
34+
2135
### master\_security\_group
2236

2337
Description: Identifier of the Amazon EC2 EMR-Managed security group for the master node.
@@ -40,12 +54,9 @@ Description: A map of tags to add to all resources. A vendor=segment tag will be
4054

4155
Type: `map`
4256

43-
Default: `<map>`
57+
Default: `{}`
4458

45-
### cluster\_name
46-
47-
Description: Name of the EMR cluster that is created.
59+
## Outputs
4860

49-
Type: `string`
61+
No output.
5062

51-
Default: `"segment-data-lake"`

modules/glue/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Providers
2+
3+
The following providers are used by this module:
4+
5+
- aws
6+
17
## Required Inputs
28

39
The following input variables are required:
@@ -20,3 +26,11 @@ Type: `string`
2026

2127
Default: `"Segment Data Lake"`
2228

29+
## Outputs
30+
31+
The following outputs are exported:
32+
33+
### database\_name
34+
35+
Description: n/a
36+

modules/glue/output.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "database_name" {
2+
value = "${aws_glue_catalog_database.segment_data_lake_glue_catalog.name}"
3+
}

modules/glue/variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ variable "name" {
33
type = "string"
44
}
55

6-
76
variable "description" {
87
description = "Description of the database."
98
type = "string"

modules/iam/README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Providers
2+
3+
The following providers are used by this module:
4+
5+
- aws
6+
17
## Required Inputs
28

39
The following input variables are required:
@@ -34,19 +40,30 @@ Type: `string`
3440

3541
Default: `"segment-data-lake-role"`
3642

37-
### segment\_aws\_account
43+
### segment\_aws\_accounts
3844

39-
Description: ARN of the AWS account used by Segment to connect to your Data Lake.
45+
Description: ARN of the AWS accounts used by Segment to connect to your Data Lake.
4046

41-
Type: `string`
47+
Type: `list`
48+
49+
Default:
4250

43-
Default: `"arn:aws:iam::798609480926:root"`
51+
```json
52+
[
53+
"arn:aws:iam::798609480926:root",
54+
"arn:aws:iam::294048959147:root"
55+
]
56+
```
4457

4558
### tags
4659

4760
Description: A map of tags to add to all resources. A vendor=segment tag will be added automatically.
4861

4962
Type: `map`
5063

51-
Default: `<map>`
64+
Default: `{}`
65+
66+
## Outputs
67+
68+
No output.
5269

test/test_fixture/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ module "iam" {
2828
module "emr" {
2929
source = "../../modules/emr"
3030

31-
s3_bucket = "data_lake_tf_test_s3_bucket"
32-
subnet_id = "subnet-00f137e4f3a6f8356"
33-
tags = "${local.tags}"
31+
s3_bucket = "data_lake_tf_test_s3_bucket"
32+
subnet_id = "subnet-00f137e4f3a6f8356"
33+
tags = "${local.tags}"
3434
cluster_name = "test-cluster"
3535
}

0 commit comments

Comments
 (0)