Skip to content

Commit

Permalink
use module output for opensearch vpc endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpearce-digital committed Nov 5, 2024
1 parent cfada0c commit 1dfb5e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 1 addition & 8 deletions terraform/account/opensearch.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
data "aws_vpc_endpoint" "opensearch" {
tags = {
Name = "opensearch"
}
provider = aws.eu_west_1
}

resource "aws_opensearchserverless_security_policy" "lpas_collection_encryption_policy" {
name = "policy-shared-${local.account_name}"
type = "encryption"
Expand Down Expand Up @@ -44,7 +37,7 @@ resource "aws_opensearchserverless_security_policy" "lpas_collection_network_pol
],
AllowFromPublic = false,
SourceVPCEs = [
data.aws_vpc_endpoint.opensearch.id
module.eu_west_1[0].opensearch_lpas_collection_vpc_endpoint.id,
]
},
{
Expand Down
4 changes: 4 additions & 0 deletions terraform/account/region/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
output "ecs_autoscaling_alarm_sns_topic" {
value = aws_sns_topic.ecs_autoscaling_alarms
}

output "opensearch_lpas_collection_vpc_endpoint" {
value = aws_opensearchserverless_vpc_endpoint.lpas_collection_vpc_endpoint
}

0 comments on commit 1dfb5e1

Please sign in to comment.