Skip to content

Commit

Permalink
Merge pull request openshift#745 from wking/s3-vpc-endpoint
Browse files Browse the repository at this point in the history
data/aws/vpc: Add an S3 endpoint to new VPCs
  • Loading branch information
openshift-merge-robot committed Dec 14, 2018
2 parents e431e60 + cdcaeb2 commit 5813f61
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ignored = [

[[constraint]]
name = "github.com/openshift/hive"
revision = "2349f175d3e4fc6542dec79add881a59f2d7b1b8"
revision = "802db5420da6a88f034fc2501081e2ab12e8463e"

[[constraint]]
name = "k8s.io/utils"
Expand Down
1 change: 1 addition & 0 deletions data/data/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ module "vpc" {
cluster_id = "${var.cluster_id}"
cluster_name = "${var.cluster_name}"
external_vpc_id = "${var.aws_external_vpc_id}"
region = "${var.aws_region}"

external_master_subnet_ids = "${compact(var.aws_external_master_subnet_ids)}"
external_worker_subnet_ids = "${compact(var.aws_external_worker_subnet_ids)}"
Expand Down
5 changes: 5 additions & 0 deletions data/data/aws/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ variable "public_master_endpoints" {
description = "If set to true, public-facing ingress resources are created."
default = true
}

variable "region" {
type = "string"
description = "The target AWS region for the cluster."
}
6 changes: 6 additions & 0 deletions data/data/aws/vpc/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ resource "aws_vpc" "new_vpc" {
"openshiftClusterID", "${var.cluster_id}"
), var.extra_tags)}"
}

resource "aws_vpc_endpoint" "s3" {
vpc_id = "${aws_vpc.new_vpc.id}"
service_name = "com.amazonaws.${var.region}.s3"
route_table_ids = ["${concat(aws_route_table.private_routes.*.id, aws_route_table.default.*.id)}"]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5813f61

Please sign in to comment.