-
Notifications
You must be signed in to change notification settings - Fork 8
/
outputs.tf
144 lines (116 loc) · 6.05 KB
/
outputs.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
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
# Kinesis Delivery Stream
output "kinesis_firehose_arn" {
description = "The ARN of the Kinesis Firehose Stream"
value = var.create ? aws_kinesis_firehose_delivery_stream.this[0].arn : null
}
output "kinesis_firehose_name" {
description = "The name of the Kinesis Firehose Stream"
value = var.create ? aws_kinesis_firehose_delivery_stream.this[0].name : null
}
output "kinesis_firehose_destination_id" {
description = "The Destination id of the Kinesis Firehose Stream"
value = var.create ? aws_kinesis_firehose_delivery_stream.this[0].destination_id : null
}
output "kinesis_firehose_version_id" {
description = "The Version id of the Kinesis Firehose Stream"
value = var.create ? aws_kinesis_firehose_delivery_stream.this[0].version_id : null
}
# CloudWatch Log Group
output "kinesis_firehose_cloudwatch_log_group_arn" {
description = "The ARN of the created Cloudwatch Log Group"
value = try(aws_cloudwatch_log_group.log[0].arn, "")
}
output "kinesis_firehose_cloudwatch_log_group_name" {
description = "The name of the created Cloudwatch Log Group"
value = try(aws_cloudwatch_log_group.log[0].name, "")
}
output "kinesis_firehose_cloudwatch_log_delivery_stream_arn" {
description = "The ARN of the created Cloudwatch Log Group Stream to delivery"
value = try(aws_cloudwatch_log_stream.destination[0].arn, "")
}
output "kinesis_firehose_cloudwatch_log_delivery_stream_name" {
description = "The name of the created Cloudwatch Log Group Stream to delivery"
value = try(aws_cloudwatch_log_stream.destination[0].name, "")
}
output "kinesis_firehose_cloudwatch_log_backup_stream_arn" {
description = "The ARN of the created Cloudwatch Log Group Stream to backup"
value = try(aws_cloudwatch_log_stream.backup[0].arn, "")
}
output "kinesis_firehose_cloudwatch_log_backup_stream_name" {
description = "The name of the created Cloudwatch Log Group Stream to backup"
value = try(aws_cloudwatch_log_stream.backup[0].name, "")
}
# IAM
output "kinesis_firehose_role_arn" {
description = "The ARN of the IAM role created for Kinesis Firehose Stream"
value = try(aws_iam_role.firehose[0].arn, "")
}
output "s3_cross_account_bucket_policy" {
description = "Bucket Policy to S3 Bucket Destination when the bucket belongs to another account"
value = try(data.aws_iam_policy_document.cross_account_s3[0].json, "")
}
output "opensearch_iam_service_linked_role_arn" {
description = "The ARN of the Opensearch IAM Service linked role"
value = try(aws_iam_service_linked_role.opensearch[0].arn, "")
}
output "elasticsearch_cross_account_service_policy" {
description = "Elasticsearch Service policy when the opensearch domain belongs to another account"
value = try(data.aws_iam_policy_document.cross_account_elasticsearch[0].json, "")
}
output "opensearch_cross_account_service_policy" {
description = "Opensearch Service policy when the opensearch domain belongs to another account"
value = try(data.aws_iam_policy_document.cross_account_opensearch[0].json, "")
}
output "opensearchserverless_cross_account_service_policy" {
description = "Opensearch Serverless Service policy when the opensearch domain belongs to another account"
value = try(data.aws_iam_policy_document.cross_account_opensearchserverless[0].json, "")
}
output "opensearchserverless_iam_service_linked_role_arn" {
description = "The ARN of the Opensearch Serverless IAM Service linked role"
value = try(aws_iam_service_linked_role.opensearchserverless[0].arn, "")
}
output "application_role_arn" {
description = "The ARN of the IAM role created for Kinesis Firehose Stream Source"
value = try(aws_iam_role.application[0].arn, "")
}
output "application_role_name" {
description = "The Name of the IAM role created for Kinesis Firehose Stream Source Source"
value = try(aws_iam_role.application[0].name, "")
}
output "application_role_policy_arn" {
description = "The ARN of the IAM policy created for Kinesis Firehose Stream Source"
value = try(aws_iam_policy.application[0].arn, "")
}
output "application_role_policy_name" {
description = "The Name of the IAM policy created for Kinesis Firehose Stream Source Source"
value = try(aws_iam_policy.application[0].name, "")
}
# Security Group
output "firehose_security_group_id" {
description = "Security Group ID associated to Firehose Stream. Only Supported for elasticsearch destination"
value = local.search_destination_vpc_create_firehose_sg ? aws_security_group.firehose[0].id : null
}
output "firehose_security_group_name" {
description = "Security Group Name associated to Firehose Stream. Only Supported for elasticsearch destination"
value = local.search_destination_vpc_create_firehose_sg ? aws_security_group.firehose[0].name : null
}
output "destination_security_group_id" {
description = "Security Group ID associated to destination"
value = local.vpc_create_destination_group ? aws_security_group.destination[0].id : null
}
output "destination_security_group_name" {
description = "Security Group Name associated to destination"
value = local.vpc_create_destination_group ? aws_security_group.destination[0].name : null
}
output "firehose_security_group_rule_ids" {
description = "Security Group Rules ID created in Firehose Stream Security group. Only Supported for elasticsearch destination"
value = local.search_destination_vpc_configure_existing_firehose_sg ? aws_security_group_rule.firehose[*].id : null
}
output "destination_security_group_rule_ids" {
description = "Security Group Rules ID created in Destination Security group"
value = local.vpc_configure_destination_group ? { for key, value in var.vpc_security_group_destination_ids : value => aws_security_group_rule.destination[key].id } : null
}
output "firehose_cidr_blocks" {
description = "Firehose stream cidr blocks to unblock on destination security group"
value = contains(["splunk", "redshift"], local.destination) ? local.firehose_cidr_blocks[local.destination][data.aws_region.current.name] : null
}