Skip to content

Commit

Permalink
pkg: remove IAMRoleName field from machinepool
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Chopra committed Nov 19, 2018
1 parent 3ff579e commit a67376f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions pkg/tfvars/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ type Master struct {
CustomSubnets map[string]string `json:"tectonic_aws_master_custom_subnets,omitempty"`
EC2Type string `json:"tectonic_aws_master_ec2_type,omitempty"`
ExtraSGIDs []string `json:"tectonic_aws_master_extra_sg_ids,omitempty"`
IAMRoleName string `json:"tectonic_aws_master_iam_role_name,omitempty"`
MasterRootVolume `json:",inline"`
}

Expand All @@ -58,7 +57,6 @@ type Worker struct {
CustomSubnets map[string]string `json:"tectonic_aws_worker_custom_subnets,omitempty"`
EC2Type string `json:"tectonic_aws_worker_ec2_type,omitempty"`
ExtraSGIDs []string `json:"tectonic_aws_worker_extra_sg_ids,omitempty"`
IAMRoleName string `json:"tectonic_aws_worker_iam_role_name,omitempty"`
LoadBalancers []string `json:"tectonic_aws_worker_load_balancers,omitempty"`
WorkerRootVolume `json:",inline"`
}
Expand Down
6 changes: 2 additions & 4 deletions pkg/tfvars/tfvars.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ func TFVars(cfg *types.InstallConfig, bootstrapIgn, masterIgn, workerIgn string)
config.Masters += replicas
if m.Platform.AWS != nil {
config.AWS.Master = aws.Master{
EC2Type: m.Platform.AWS.InstanceType,
IAMRoleName: m.Platform.AWS.IAMRoleName,
EC2Type: m.Platform.AWS.InstanceType,
MasterRootVolume: aws.MasterRootVolume{
IOPS: m.Platform.AWS.EC2RootVolume.IOPS,
Size: m.Platform.AWS.EC2RootVolume.Size,
Expand All @@ -69,8 +68,7 @@ func TFVars(cfg *types.InstallConfig, bootstrapIgn, masterIgn, workerIgn string)
config.Workers += replicas
if m.Platform.AWS != nil {
config.AWS.Worker = aws.Worker{
EC2Type: m.Platform.AWS.InstanceType,
IAMRoleName: m.Platform.AWS.IAMRoleName,
EC2Type: m.Platform.AWS.InstanceType,
WorkerRootVolume: aws.WorkerRootVolume{
IOPS: m.Platform.AWS.EC2RootVolume.IOPS,
Size: m.Platform.AWS.EC2RootVolume.Size,
Expand Down
7 changes: 0 additions & 7 deletions pkg/types/aws/machinepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ type MachinePool struct {
// eg. m4-large
InstanceType string `json:"type"`

// IAMRoleName defines the IAM role associated
// with the ec2 instance.
IAMRoleName string `json:"iamRoleName"`

// EC2RootVolume defines the storage for ec2 instance.
EC2RootVolume `json:"rootVolume"`
}
Expand All @@ -36,9 +32,6 @@ func (a *MachinePool) Set(required *MachinePool) {
if required.InstanceType != "" {
a.InstanceType = required.InstanceType
}
if required.IAMRoleName != "" {
a.IAMRoleName = required.IAMRoleName
}

if required.EC2RootVolume.IOPS != 0 {
a.EC2RootVolume.IOPS = required.EC2RootVolume.IOPS
Expand Down

0 comments on commit a67376f

Please sign in to comment.