Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Bugfix/self not in security group #94

Merged
merged 11 commits into from
Sep 20, 2018
Merged
3 changes: 2 additions & 1 deletion modules/vault-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ resource "aws_iam_role_policy" "vault_s3" {
}

data "aws_iam_policy_document" "vault_s3" {
count = "${var.enable_s3_backend ? 1 : 0}"
count = "${var.enable_s3_backend ? 1 : 0}"

statement {
effect = "Allow"
actions = ["s3:*"]
Expand Down
10 changes: 10 additions & 0 deletions modules/vault-security-group-rules/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ resource "aws_security_group_rule" "allow_cluster_inbound_from_self" {

security_group_id = "${var.security_group_id}"
}

resource "aws_security_group_rule" "allow_cluster_inbound_from_self_api" {
type = "ingress"
from_port = "${var.api_port}"
to_port = "${var.api_port}"
protocol = "tcp"
self = true

security_group_id = "${var.security_group_id}"
}