Skip to content

Commit 2ef6f4d

Browse files
committed
minor fixes
1 parent f0b16c9 commit 2ef6f4d

4 files changed

Lines changed: 1 addition & 26 deletions

File tree

resources/aws/ec2/dedicated_host.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,10 @@ func NewDedicatedHost(e aws.Environment, name string, args DedicatedHostArgs, op
4949
availabilityZone = pulumi.String(args.AvailabilityZone)
5050
}
5151

52-
// Set default tags if none provided
53-
if args.Tags == nil {
54-
args.Tags = pulumi.StringMap{
55-
"Name": e.Namer.DisplayName(255, pulumi.String(name)),
56-
}
57-
} else if _, exists := args.Tags["Name"]; !exists {
58-
args.Tags["Name"] = e.Namer.DisplayName(255, pulumi.String(name))
59-
}
60-
6152
dedicatedHostArgs := &ec2.DedicatedHostArgs{
6253
InstanceType: pulumi.String(args.InstanceType),
6354
AvailabilityZone: availabilityZone,
6455
HostRecovery: pulumi.String(args.HostRecovery),
65-
Tags: args.Tags,
6656
}
6757

6858
return ec2.NewDedicatedHost(e.Ctx(),

resources/aws/environment.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const (
2525
// AWS Infra
2626
DDInfraDefaultVPCIDParamName = "aws/defaultVPCID"
2727
DDInfraDefaultSubnetsParamName = "aws/defaultSubnets"
28-
DDInfraSubnetIdOverrideParamName = "aws/subnetId"
2928
DDInfraDefaultSecurityGroupsParamName = "aws/defaultSecurityGroups"
3029
DDInfraDefaultInstanceTypeParamName = "aws/defaultInstanceType"
3130
DDInfraDefaultInstanceProfileParamName = "aws/defaultInstanceProfile"
@@ -38,7 +37,6 @@ const (
3837
DDInfraDefaultShutdownBehavior = "aws/defaultShutdownBehavior"
3938
DDInfraDefaultInternalRegistry = "aws/defaultInternalRegistry"
4039
DDInfraDefaultInternalDockerhubMirror = "aws/defaultInternalDockerhubMirror"
41-
DDInfraHostIdParamName = "aws/hostId"
4240
DDInfraUseMacosCompatibleSubnets = "aws/useMacosCompatibleSubnets"
4341

4442
// AWS ECS
@@ -289,10 +287,6 @@ func (e *Environment) DefaultShutdownBehavior() string {
289287
return e.GetStringWithDefault(e.InfraConfig, DDInfraDefaultShutdownBehavior, e.envDefault.ddInfra.defaultShutdownBehavior)
290288
}
291289

292-
func (e *Environment) HostId() string {
293-
return e.InfraConfig.Get(DDInfraHostIdParamName)
294-
}
295-
296290
func (e *Environment) UseMacosCompatibleSubnets() bool {
297291
return e.GetBoolWithDefault(e.InfraConfig, DDInfraUseMacosCompatibleSubnets, e.envDefault.ddInfra.useMacosCompatibleSubnets)
298292
}

scenarios/aws/ec2/vm.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package ec2
22

33
import (
4-
"fmt"
54
"strings"
65

76
"github.com/DataDog/test-infra-definitions/common/config"
@@ -35,7 +34,6 @@ func NewVM(e aws.Environment, name string, params ...VMOption) (*remote.Host, er
3534
if err != nil {
3635
return nil, err
3736
}
38-
fmt.Printf("AMI INFO: %+v", amiInfo)
3937
sshUser := amiInfo.defaultUser
4038
if infraSSHUser := e.InfraSSHUser(); infraSSHUser != "" {
4139
sshUser = infraSSHUser
@@ -175,13 +173,6 @@ func defaultVMArgs(e aws.Environment, vmArgs *vmArgs) error {
175173
if vmArgs.tenancy == "" {
176174
vmArgs.tenancy = "host"
177175
}
178-
// Set host ID if provided in environment
179-
if vmArgs.hostId == "" {
180-
hostId := e.HostId()
181-
if hostId != "" {
182-
vmArgs.hostId = hostId
183-
}
184-
}
185176
}
186177

187178
// Handle custom user data and defaults per os

scenarios/aws/ec2/vmargs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
// - [WithInstanceType]
1717
// - [WithUserData]
1818
// - [WithName]
19-
// - [WithHostId]
19+
// - [WithHostID]
2020
//
2121
// [Functional options pattern]: https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
2222

0 commit comments

Comments
 (0)