Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data/aws/vpc: Add an S3 endpoint to new VPCs #745

Merged
merged 2 commits into from
Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 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.