buildlet: add EC2 security groups to configuration
This adds security groups to the builder environment
configuration. Security groups are used to set firewall
rules for the virtual machines.
Updates golang/go#36841
Change-Id: I93235b63144fa80add4986e58246ffc9b44c2e73
Reviewed-on: https://go-review.googlesource.com/c/build/+/236298
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
diff --git a/buildenv/envs.go b/buildenv/envs.go
index 50ef1c5..c0280e8 100644
--- a/buildenv/envs.go
+++ b/buildenv/envs.go
@@ -142,6 +142,11 @@
// account that will be assigned to a VM instance that hosts
// a container when the instance is created.
COSServiceAccount string
+
+ // AWSSecurityGroup is the security group that any VM instance
+ // created on EC2 should contain. These security groups are
+ // collections of firewall rules to be applied to the VM.
+ AWSSecurityGroup string
}
// ComputePrefix returns the URI prefix for Compute Engine resources in a project.
@@ -278,6 +283,7 @@
LogBucket: "dev-go-build-log",
SnapBucket: "dev-go-build-snap",
COSServiceAccount: "linux-cos-builders@go-dashboard-dev.iam.gserviceaccount.com",
+ AWSSecurityGroup: "sg-02c2a75a3eed843bb",
}
// Production defines the environment that the coordinator and build
@@ -313,6 +319,7 @@
SnapBucket: "go-build-snap",
AutoCertCacheBucket: "farmer-golang-org-autocert-cache",
COSServiceAccount: "linux-cos-builders@symbolic-datum-552.iam.gserviceaccount.com",
+ AWSSecurityGroup: "sg-02c2a75a3eed843bb",
}
var Development = &Environment{