in the terratest, I want to call the aws cloud watch specific log group name and log stream name below code is from git hub but no idea how to call specific log group and log stream
Try something like this
c := aws.NewCloudWatchLogsClient(t, awsRegion)
t.Run("logStreamExists", func(t *testing.T) {
output, err := c.DescribeLogStreams(&cloudwatchlogs.DescribeLogStreamsInput{
LogGroupName: &logGroupName,
})
if err != nil {
assert.Fail(t, "Failed to get log streams")
}
var names []string
for _, element := range output.LogStreams {
names = append(names, *element.LogStreamName)
}
assert.Contains(t, names, logStreamName)
})