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

First ECS metric sanity test - ECS EC2 Launch Type Daemon Deployment - Container Insights #26

Merged
merged 109 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
673a1be
make an always failing test that gets called for ecs in benchmark test
ChenaLee Nov 4, 2022
4283eab
Terraform required files for daemon run
ChenaLee Nov 4, 2022
4482e8a
Put new parameter for test
ChenaLee Nov 4, 2022
4f7c280
Fix volumes to volume ecs task definition
ChenaLee Nov 4, 2022
222e454
fix volume - terraform doesn't support what json supports
ChenaLee Nov 4, 2022
3d41278
Remove comma so terraform apply doesn't error out
ChenaLee Nov 4, 2022
ad21cd0
Fix ssm param name for cwagent config
ChenaLee Nov 4, 2022
4d4025a
Remove sourcePath as fargate doesn't support it
ChenaLee Nov 4, 2022
a55321f
correct test directory path
ChenaLee Nov 4, 2022
bae3901
Fix genereator test dir name
ChenaLee Nov 4, 2022
572281b
Add dependency for ssm
ChenaLee Nov 4, 2022
b87ba85
add session as dependency
ChenaLee Nov 4, 2022
b305092
Return error only for ssm param put
ChenaLee Nov 4, 2022
09459f7
remove unused declaration in put param
ChenaLee Nov 4, 2022
57e4cf5
fix list syntax
ChenaLee Nov 4, 2022
a47d029
Add flag as dependency for build
ChenaLee Nov 4, 2022
f41e028
fix build issues
ChenaLee Nov 4, 2022
2901e76
fix build error
ChenaLee Nov 4, 2022
bfd3905
Build fix by changing to non test file
ChenaLee Nov 4, 2022
c3f96bb
Fix build failures
ChenaLee Nov 7, 2022
6c6d646
fix build failure
ChenaLee Nov 7, 2022
0028108
Remove import cycle
ChenaLee Nov 7, 2022
f36f9fb
fix redeclaration problem
ChenaLee Nov 7, 2022
2a3c004
Fix pointer issue
ChenaLee Nov 7, 2022
ddce041
fix cpu config path
ChenaLee Nov 7, 2022
473d2cc
print error for put param
ChenaLee Nov 7, 2022
e21c45a
fix import
ChenaLee Nov 7, 2022
861acd2
allow ssm param overwrite
ChenaLee Nov 7, 2022
c8f0923
make boolean pointer
ChenaLee Nov 7, 2022
8efa964
ListTasks in order to stop that task
ChenaLee Nov 8, 2022
d73195c
fix build issue
ChenaLee Nov 8, 2022
1497046
Fix servicename flag
ChenaLee Nov 8, 2022
68ddee4
Stop cwagent task in order to restart to get the new config
ChenaLee Nov 8, 2022
251e5f1
force update service to restart service
ChenaLee Nov 8, 2022
aed95f8
container insights test
ChenaLee Nov 8, 2022
12dc3ba
add volumes
ChenaLee Nov 8, 2022
72caf40
Add ec2 creation for ec2 launch type ecs
ChenaLee Nov 9, 2022
c03791c
fix volume definitions for task def for ec2
ChenaLee Nov 9, 2022
68b9563
Change from fargate to ec2 launch type
ChenaLee Nov 9, 2022
bc368c8
fix volume definition syntax
ChenaLee Nov 9, 2022
fd94756
Fix volume definition syntax 2
ChenaLee Nov 9, 2022
01761bb
Fix iam role for instance profile
ChenaLee Nov 9, 2022
a132857
fix iam duplicated name
ChenaLee Nov 9, 2022
0c1f2ce
Change task definition to ec2 launch type
ChenaLee Nov 9, 2022
e4d982b
Change network mode to bridge to avoid private subnet problems
ChenaLee Nov 9, 2022
738355d
change launch config user data to add container instance propagate tags
ChenaLee Nov 9, 2022
ce13255
change user data to instance tags
ChenaLee Nov 9, 2022
b2482ce
Change to al2 ami hoping that is ecs optimized
ChenaLee Nov 9, 2022
87c58bd
Add ecs agent install script to each launched ec2 instance
ChenaLee Nov 9, 2022
74f236d
dedup name for iam policy
ChenaLee Nov 9, 2022
85a907e
use ecs optimized ami
ChenaLee Nov 9, 2022
834a366
fix policy arn for ec2 register to ecs
ChenaLee Nov 10, 2022
4a7ddcc
change user data
ChenaLee Nov 10, 2022
2d4318d
Remove empty volumesFrom
ChenaLee Nov 10, 2022
52db802
add mountpoints to default taskdef
ChenaLee Nov 10, 2022
8fae912
Fix json format
ChenaLee Nov 10, 2022
508896e
change to daemon deployment
ChenaLee Nov 10, 2022
7d0b4b4
organize terraform and ecs templates for ecs ec2 launch daemon
ChenaLee Nov 11, 2022
1336bf8
Fix fargate test generator
ChenaLee Nov 11, 2022
39b6e94
Remove desired count from daemon deployment
ChenaLee Nov 11, 2022
64b2345
Fix daemon restart with no desired count
ChenaLee Nov 11, 2022
0d16995
fix syntax
ChenaLee Nov 11, 2022
02a9d55
Remove test timeout
ChenaLee Nov 11, 2022
c461144
Cleanup environment var flag getting logic
ChenaLee Nov 11, 2022
46e63b4
Fix how env variables get passed
ChenaLee Nov 14, 2022
e677594
Add agent run strategy poc
ChenaLee Nov 14, 2022
b7dbdcc
Fix printf arg
ChenaLee Nov 14, 2022
c693c16
Fix flag parsing logic
ChenaLee Nov 14, 2022
8378afb
Move on to see what validation is done
ChenaLee Nov 14, 2022
d6b5afe
add query for test validation container insights
ChenaLee Nov 14, 2022
d288412
remove mountpoints from fargate task def
ChenaLee Nov 15, 2022
5c4aeaf
Make ECS flags not required for non ecs tests
ChenaLee Nov 15, 2022
9008d7e
add ec2 as compute type for ec2 test
ChenaLee Nov 15, 2022
573438b
add logs for container insights query
ChenaLee Nov 15, 2022
645b510
add more logs around erros
ChenaLee Nov 15, 2022
e29e997
add more logs and fix build
ChenaLee Nov 15, 2022
2393776
Try to add Env to each query fetcher struct
ChenaLee Nov 15, 2022
9399fc4
Fix import
ChenaLee Nov 15, 2022
062d916
Fix base member variable usage
ChenaLee Nov 15, 2022
e14cd42
Fix getEnv method
ChenaLee Nov 15, 2022
1300420
Fix template file path for existing fargate test
ChenaLee Nov 15, 2022
2720bb1
fix dimensions
ChenaLee Nov 15, 2022
68be845
Fix agent run time and dimensions
ChenaLee Nov 15, 2022
27da732
Fix resource relative path
ChenaLee Nov 15, 2022
e3dd20a
Remove debug logs and add test result print
ChenaLee Nov 15, 2022
e60fc2e
add log
ChenaLee Nov 15, 2022
c1fecdc
Remove always fail
ChenaLee Nov 15, 2022
daba08e
Readme edit
ChenaLee Nov 16, 2022
5dee2fa
Fix Fetch implementation
ChenaLee Nov 16, 2022
7794e41
fix build failure
ChenaLee Nov 16, 2022
f6449e8
Add instance id dimension for diskio and procstat
ChenaLee Nov 16, 2022
da188c5
Print test result in test run instead of teardown because teardown do…
ChenaLee Nov 16, 2022
faacd84
delete unused file for now
ChenaLee Nov 17, 2022
c181ae5
make ecs test fail to see if logs get printed
ChenaLee Nov 17, 2022
11947ed
make test successful and see if logs get printed still
ChenaLee Nov 17, 2022
8722278
Fix no logs if test succeed problem for ecs test
ChenaLee Nov 17, 2022
aa26acb
Edit readme
ChenaLee Nov 21, 2022
0299c7a
Resolve PR comments for /environment
ChenaLee Nov 22, 2022
25be84b
Remove aws-sdk-go v1 dependency
ChenaLee Nov 22, 2022
dd94fb6
Remove unnecessary terraform comment
ChenaLee Nov 22, 2022
7255367
Remove unnecessary pointer arguments
ChenaLee Nov 22, 2022
d788326
Some minor style changes
ChenaLee Nov 22, 2022
e440dce
Remove covered test list since out of scope
ChenaLee Nov 22, 2022
28f8d98
Style changes
ChenaLee Nov 22, 2022
03014e6
fix build
ChenaLee Nov 22, 2022
dfbaf94
Merge conflict resolution
ChenaLee Nov 22, 2022
442bdf6
go mod tidy
ChenaLee Nov 22, 2022
1af9eee
Minor style changes
ChenaLee Nov 29, 2022
7e7ac96
go mod tidy
ChenaLee Dec 5, 2022
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
96 changes: 96 additions & 0 deletions environment/MetaData.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this comment got missed somewhere. The file name shouldn't be capitalized.

// SPDX-License-Identifier: MIT

//go:build integration
SaxyPandaBear marked this conversation as resolved.
Show resolved Hide resolved
// +build integration

package environment

import (
"flag"
"github.com/aws/amazon-cloudwatch-agent-test/environment/computetype"
"github.com/aws/amazon-cloudwatch-agent-test/environment/ecsdeploymenttype"
"github.com/aws/amazon-cloudwatch-agent-test/environment/ecslaunchtype"
"github.com/aws/amazon-cloudwatch-agent-test/test"
"log"
)

type MetaData struct {
ComputeType computetype.ComputeType
EcsLaunchType ecslaunchtype.ECSLaunchType
EcsDeploymentStrategy ecsdeploymenttype.ECSDeploymentType
EcsClusterArn string
EcsClusterName string
CwagentConfigSsmParamName string
EcsServiceName string
}

type MetaDataStrings struct {
ComputeType string
EcsLaunchType string
EcsDeploymentStrategy string
EcsClusterArn string
CwagentConfigSsmParamName string
EcsServiceName string
}

func registerComputeType(dataString *MetaDataStrings) {
flag.StringVar(&(dataString.ComputeType), "computeType", "", "EC2/ECS/EKS")
}
func registerECSData(dataString *MetaDataStrings) {
flag.StringVar(&(dataString.EcsLaunchType), "ecsLaunchType", "", "EC2 or Fargate")
SaxyPandaBear marked this conversation as resolved.
Show resolved Hide resolved
flag.StringVar(&(dataString.EcsDeploymentStrategy), "ecsDeploymentStrategy", "", "Daemon/Replica/Sidecar")
flag.StringVar(&(dataString.EcsClusterArn), "clusterArn", "", "Used to restart ecs task to apply new agent config")
flag.StringVar(&(dataString.CwagentConfigSsmParamName), "cwagentConfigSsmParamName", "", "Used to set new cwa config")
flag.StringVar(&(dataString.EcsServiceName), "cwagentECSServiceName", "", "Used to restart ecs task to apply new agent config")
}

func fillComputeType(e *MetaData, data *MetaDataStrings) *MetaData {
computeType, ok := computetype.FromString(data.ComputeType)
if !ok {
log.Panic("Invalid compute type. Needs to be EC2/ECS/EKS. Compute Type is a required flag. :" + data.ComputeType)
}
e.ComputeType = computeType
return e
}

func fillECSData(e *MetaData, data *MetaDataStrings) *MetaData {
SaxyPandaBear marked this conversation as resolved.
Show resolved Hide resolved
if e.ComputeType != computetype.ECS {
return e
}

ecsLaunchType, ok := ecslaunchtype.FromString(data.EcsLaunchType)
if !ok {
log.Printf("Invalid launch type %s. This might be because it wasn't provided for non-ECS tests", data.ComputeType)
} else {
e.EcsLaunchType = ecsLaunchType
}

ecsDeploymentStrategy, ok := ecsdeploymenttype.FromString(data.EcsDeploymentStrategy)
if !ok {
log.Printf("Invalid deployment strategy %s. This might be because it wasn't provided for non-ECS tests", data.ComputeType)
} else {
e.EcsDeploymentStrategy = ecsDeploymentStrategy
}

e.EcsClusterArn = data.EcsClusterArn
SaxyPandaBear marked this conversation as resolved.
Show resolved Hide resolved
e.CwagentConfigSsmParamName = data.CwagentConfigSsmParamName
e.EcsServiceName = data.EcsServiceName
e.EcsClusterName = test.GetClusterName(data.EcsClusterArn)

return e
}

func RegisterEnvironmentMetaDataFlags(metaDataStrings *MetaDataStrings) *MetaDataStrings {
registerComputeType(metaDataStrings)
registerECSData(metaDataStrings)
return metaDataStrings
}

func GetEnvironmentMetaData(data *MetaDataStrings) *MetaData {
metaData := &(MetaData{})
metaData = fillComputeType(metaData, data)
metaData = fillECSData(metaData, data)

return metaData
}
30 changes: 30 additions & 0 deletions environment/computetype/compute_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT

//go:build integration
// +build integration

package computetype

import "strings"

type ComputeType string

const (
EC2 ComputeType = "EC2"
ECS ComputeType = "ECS"
EKS ComputeType = "EKS"
)

var (
computeTypes = map[string]ComputeType{
"EC2": EC2,
"ECS": ECS,
"EKS": EKS,
}
)

func FromString(str string) (ComputeType, bool) {
c, ok := computeTypes[strings.ToUpper(str)]
return c, ok
}
30 changes: 30 additions & 0 deletions environment/ecsdeploymenttype/ecs_deployment_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT

//go:build integration
// +build integration

package ecsdeploymenttype

import "strings"

type ECSDeploymentType string

const (
DAEMON ECSDeploymentType = "DAEMON"
REPLICA ECSDeploymentType = "REPLICA"
SIDECAR ECSDeploymentType = "SIDECAR"
)

var (
ecsDeploymentTypes = map[string]ECSDeploymentType{
"DAEMON": DAEMON,
"REPLICA": REPLICA,
"SIDECAR": SIDECAR,
}
)

func FromString(str string) (ECSDeploymentType, bool) {
c, ok := ecsDeploymentTypes[strings.ToUpper(str)]
return c, ok
}
28 changes: 28 additions & 0 deletions environment/ecslaunchtype/ecs_launch_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT

//go:build integration
// +build integration

package ecslaunchtype

import "strings"

type ECSLaunchType string

const (
EC2 ECSLaunchType = "EC2"
FARGATE ECSLaunchType = "FARGATE"
)

var (
ecsLaunchTypes = map[string]ECSLaunchType{
"EC2": EC2,
"FARGATE": FARGATE,
}
)

func FromString(str string) (ECSLaunchType, bool) {
c, ok := ecsLaunchTypes[strings.ToUpper(str)]
return c, ok
}
6 changes: 6 additions & 0 deletions generator/resources/ecs_ec2_daemon_test_matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"instanceType":"t3a.xlarge",
"ami": "cloudwatch-agent-integration-test-al2*"
}
]
2 changes: 1 addition & 1 deletion generator/resources/ecs_fargate_test_matrix.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{

}
]
3 changes: 3 additions & 0 deletions generator/test_case_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ var osToTestDirMap = map[string][]string{
"ecs_fargate": {
"./test/ecs/ecs_metadata",
},
"ecs_ec2_daemon": {
"./test/metric_value_benchmark",
},
}

func main() {
Expand Down
26 changes: 14 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,33 @@ module github.com/aws/amazon-cloudwatch-agent-test
go 1.18

require (
github.com/aws/aws-sdk-go-v2 v1.17.1
github.com/aws/aws-sdk-go-v2/config v1.18.2
github.com/aws/aws-sdk-go-v2 v1.17.2
github.com/aws/aws-sdk-go-v2/config v1.18.4
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.10.0
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.20
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.21.6
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.20
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.17.1
github.com/aws/aws-sdk-go-v2/service/ecs v1.19.1
github.com/aws/aws-sdk-go-v2/service/ssm v1.33.0
github.com/google/uuid v1.3.0
github.com/stretchr/testify v1.8.1
golang.org/x/sys v0.2.0
)

require (
github.com/aws/aws-sdk-go-v2/credentials v1.13.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.26 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.20 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.27 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.13.20 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.17 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.17.4 // indirect
github.com/aws/smithy-go v1.13.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.20 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.26 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.9 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.17.6 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand Down
48 changes: 28 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
github.com/aws/aws-sdk-go-v2 v1.16.16/go.mod h1:SwiyXi/1zTUZ6KIAmLK5V5ll8SiURNUYOqTerZPaF9k=
github.com/aws/aws-sdk-go-v2 v1.17.1 h1:02c72fDJr87N8RAC2s3Qu0YuvMRZKNZJ9F+lAehCazk=
github.com/aws/aws-sdk-go-v2 v1.17.1/go.mod h1:JLnGeGONAyi2lWXI1p0PCIOIy333JMVK1U7Hf0aRFLw=
github.com/aws/aws-sdk-go-v2/config v1.18.2 h1:tRhTb3xMZsB0gW0sXWpqs9FeIP8iQp5SvnvwiPXzHwo=
github.com/aws/aws-sdk-go-v2/config v1.18.2/go.mod h1:9XVoZTdD8ICjrgI5ddb8j918q6lEZkFYpb7uohgvU6c=
github.com/aws/aws-sdk-go-v2/credentials v1.13.2 h1:F/v1w0XcFDZjL0bCdi9XWJenoPKjGbzljBhDKcryzEQ=
github.com/aws/aws-sdk-go-v2/credentials v1.13.2/go.mod h1:eAT5aj/WJ2UDIA0IVNFc2byQLeD89SDEi4cjzH/MKoQ=
github.com/aws/aws-sdk-go-v2 v1.17.2 h1:r0yRZInwiPBNpQ4aDy/Ssh3ROWsGtKDwar2JS8Lm+N8=
github.com/aws/aws-sdk-go-v2 v1.17.2/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
github.com/aws/aws-sdk-go-v2/config v1.18.4 h1:VZKhr3uAADXHStS/Gf9xSYVmmaluTUfkc0dcbPiDsKE=
github.com/aws/aws-sdk-go-v2/config v1.18.4/go.mod h1:EZxMPLSdGAZ3eAmkqXfYbRppZJTzFTkv8VyEzJhKko4=
github.com/aws/aws-sdk-go-v2/credentials v1.13.4 h1:nEbHIyJy7mCvQ/kzGG7VWHSBpRB4H6sJy3bWierWUtg=
github.com/aws/aws-sdk-go-v2/credentials v1.13.4/go.mod h1:/Cj5w9LRsNTLSwexsohwDME32OzJ6U81Zs33zr2ZWOM=
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.10.0 h1:bKbdstt7+PzIRSIXZ11Yo8Qh8t0AHn6jEYUfsbVcLjE=
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.10.0/go.mod h1:+CBJZMhsb1pTUcB/NTdS505bDX10xS4xnPMqDZj2Ptw=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 h1:E3PXZSI3F2bzyj6XxUXdTIfvp425HHhwKsFvmzBwHgs=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19/go.mod h1:VihW95zQpeKQWVPGkwT+2+WJNQV8UXFfMTWdU6VErL8=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.20 h1:tpNOglTZ8kg9T38NpcGBxudqfUAwUzyUnLQ4XSd0CHE=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.20/go.mod h1:d9xFpWd3qYwdIXM0fvu7deD08vvdRXyc/ueV+0SqaWE=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23/go.mod h1:2DFxAQ9pfIRy0imBCJv+vZ2X6RKxves6fbnEuSry6b4=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 h1:nBO/RFxeq/IS5G9Of+ZrgucRciie2qpLy++3UGZ+q2E=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25/go.mod h1:Zb29PYkf42vVYQY6pvSyJCJcFHlPIiY+YKdPtwnvMkY=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.26 h1:5WU31cY7m0tG+AiaXuXGoMzo2GBQ1IixtWa8Yywsgco=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.26/go.mod h1:2E0LdbJW6lbeU4uxjum99GZzI0ZjDpAb0CoSCM0oeEY=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17/go.mod h1:pRwaTYCJemADaqCbUAxltMoHKata7hmB5PjEXeu0kfg=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 h1:oRHDrwCTVT8ZXi4sr9Ld+EXk7N/KGssOr2ygNeojEhw=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19/go.mod h1:6Q0546uHDp421okhmmGfbxzq2hBqbXFNpi4k+Q1JnQA=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.26 h1:Mza+vlnZr+fPKFKRq/lKGVvM6B/8ZZmNdEopOwSQLms=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.26/go.mod h1:Y2OJ+P+MC1u1VKnavT+PshiEuGPyh/7DqxoDNij4/bg=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.20 h1:WW0qSzDWoiWU2FS5DbKpxGilFVlCEJPwx4YtjdfI0Jw=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.20/go.mod h1:/+6lSiby8TBFpTVXZgKiN/rCfkYXEGvhlM4zCgPpt7w=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.27 h1:N2eKFw2S+JWRCtTt0IhIX7uoGGQciD4p6ba+SJv4WEU=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.27/go.mod h1:RdwFVc7PBYWY33fa2+8T1mSqQ7ZEK4ILpM0wfioDC3w=
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.21.6 h1:Mwb2A5ygEijjkxgM3hVEiWSHwdH82nkyU2wgP4u/Hxk=
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.21.6/go.mod h1:CCrqOzLQ6d1+zauyTah8o50m9dQu0NS/kaC0heWCu0c=
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.20 h1:yPyXdrZaB4SW+pn2CmqyAbhuqGM4Pv4fsMhLOt8cOj8=
Expand All @@ -25,21 +28,26 @@ github.com/aws/aws-sdk-go-v2/service/dynamodb v1.17.1 h1:1QpTkQIAaZpR387it1L+erj
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.17.1/go.mod h1:BZhn/C3z13ULTSstVi2Kymc62bgjFh/JwLO9Tm2OFYI=
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.13.20 h1:V9q4A0qnUfDsfivspY1LQRQTOG3Y9FLHvXIaTbcU7XM=
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.13.20/go.mod h1:7qWU48SMzlrfOlNhHpazW3psFWlOIWrq4SmOr2/ESmk=
github.com/aws/aws-sdk-go-v2/service/ecs v1.19.1 h1:XmhOTiMRhUXAQwcNiHJ7z7z73ofQvuvaWNcVKH6Sh8c=
github.com/aws/aws-sdk-go-v2/service/ecs v1.19.1/go.mod h1:NpR78BP2STxvF/R1GXLDM4gAEfjz68W/h0nC5b6Jk3s=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.9 h1:Lh1AShsuIJTwMkoxVCAYPJgNG5H+eN6SmoUn8nOZ5wE=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.9/go.mod h1:a9j48l6yL5XINLHLcOKInjdvknN+vWqPBxqeIDw7ktw=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.17 h1:o0Ia3nb56m8+8NvhbCDiSBiZRNUwIknVWobx5vks0Vk=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.17/go.mod h1:WJD9FbkwzM2a1bZ36ntH6+5Jc+x41Q4K2AcLeHDLAS8=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19 h1:GE25AWCdNUPh9AOJzI9KIJnja7IwUc1WyUqz/JTyJ/I=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19/go.mod h1:02CP6iuYP+IVnBX5HULVdSAku/85eHB2Y9EsFhrkEwU=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 h1:GFZitO48N/7EsFDt8fMa5iYdmWqkUDDB3Eje6z3kbG0=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.25/go.mod h1:IARHuzTXmj1C0KS35vboR0FeJ89OkEy1M9mWbK2ifCI=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 h1:jcw6kKZrtNfBPJkaHrscDOZoe5gvi9wjudnxvozYFJo=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8/go.mod h1:er2JHN+kBY6FcMfcBBKNGCT3CarImmdFzishsqBmSRI=
github.com/aws/aws-sdk-go-v2/service/sts v1.17.4 h1:YNncBj5dVYd05i4ZQ+YicOotSXo0ufc9P8kTioi13EM=
github.com/aws/aws-sdk-go-v2/service/sts v1.17.4/go.mod h1:bXcN3koeVYiJcdDU89n3kCYILob7Y34AeLopUbZgLT4=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.20 h1:jlgyHbkZQAgAc7VIxJDmtouH8eNjOk2REVAQfVhdaiQ=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.20/go.mod h1:Xs52xaLBqDEKRcAfX/hgjmD3YQ7c/W+BEyfamlO/W2E=
github.com/aws/aws-sdk-go-v2/service/ssm v1.33.0 h1:Whr3iK4ZLynH73qlPI7DRhXmpbQ0GNYxVGPpCeUBiO0=
github.com/aws/aws-sdk-go-v2/service/ssm v1.33.0/go.mod h1:rEsqsZrOp9YvSGPOrcL3pR9+i/QJaWRkAYbuxMa7yCU=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.26 h1:ActQgdTNQej/RuUJjB9uxYVLDOvRGtUreXF8L3c8wyg=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.26/go.mod h1:uB9tV79ULEZUXc6Ob18A46KSQ0JDlrplPni9XW6Ot60=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.9 h1:wihKuqYUlA2T/Rx+yu2s6NDAns8B9DgnRooB1PVhY+Q=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.9/go.mod h1:2E/3D/mB8/r2J7nK42daoKP/ooCwbf0q1PznNc+DZTU=
github.com/aws/aws-sdk-go-v2/service/sts v1.17.6 h1:VQFOLQVL3BrKM/NLO/7FiS4vcp5bqK0mGMyk09xLoAY=
github.com/aws/aws-sdk-go-v2/service/sts v1.17.6/go.mod h1:Az3OXXYGyfNwQNsK/31L4R75qFYnO641RZGAoV3uH1c=
github.com/aws/smithy-go v1.13.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/smithy-go v1.13.4 h1:/RN2z1txIJWeXeOkzX+Hk/4Uuvv7dWtCjbmVJcrskyk=
github.com/aws/smithy-go v1.13.4/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
22 changes: 20 additions & 2 deletions terraform/ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,25 @@ Outputs:
"ecs:DescribeTaskDefinition",
"ecs:UpdateService",
"ecs:DeregisterTaskDefinition",
"logs:DeleteLogGroup"
"logs:DeleteLogGroup",
"ecs:CreateCapacityProvider",
"ecs:DeleteCapacityProvider",
"ecs:DescribeCapacityProviders",
"iam:CreateServiceLinkedRole",
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:CreateAutoScalingGroup",
"autoscaling:DeleteAutoScalingGroup",
"autoscaling:CreateLaunchConfiguration",
"autoscaling:DeleteLaunchConfiguration",
"autoscaling:DescribeLaunchConfigurations",
"autoscaling:DescribeScalingActivities",
"autoscaling:CreateOrUpdateTags",
"autoscaling:DeleteTags",
"autoscaling:DescribeTags",
"autoscaling:UpdateAutoScalingGroup",
"autoscaling:SetInstanceProtection",
"ecs:DescribeContainerInstances",
"cloudwatch:GetMetricData"
],
"Resource": "*"
}
Expand All @@ -248,7 +266,7 @@ Outputs:
```

11. Once creation is done, go back to the IAM role and attach the policy you just created by searching for the policy name.
12. Follow [docs](https://docs.github.com/en/actions/security-guides/encrypted-secrets) to add TERRAFORM_AWS_ASSUME_ROLE as GitHub repository secret. Name is `TERRAFORM_AWS_ASSUME_ROLE` and Secret is the IAM role name.
12. Follow [docs](https://docs.github.com/en/actions/security-guides/encrypted-secrets) to add TERRAFORM_AWS_ASSUME_ROLE as GitHub repository secret. Name is `TERRAFORM_AWS_ASSUME_ROLE` and Secret is the IAM role's ARN.



Expand Down
2 changes: 1 addition & 1 deletion terraform/ec2/linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ resource "null_resource" "integration_test" {
"export SHA=${var.cwa_github_sha}",
"export SHA_DATE=${var.cwa_github_sha_date}",
"export PERFORMANCE_NUMBER_OF_LOGS=${var.performance_number_of_logs}",
"go test ${var.test_dir} -p 1 -timeout 30m -v --tags=integration "
"go test ${var.test_dir} -p 1 -timeout 30m -computeType=EC2 -v --tags=integration "
]
connection {
type = "ssh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"cpu": 1,
"mountPoints": [],
"memory": 2048,
"volumesFrom": []
"memory": 2048
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Loading