agent/api/task/task.go
func (task *Task) initializeSSMSecretResource(credentialsManager credentials.Manager,
	resourceFields *taskresource.ResourceFields) {
	ssmSecretResource := ssmsecret.NewSSMSecretResource(task.Arn, task.getAllSSMSecretRequirements(),
		task.ExecutionCredentialsID, credentialsManager, resourceFields.SSMClientCreator)
	task.AddResource(ssmsecret.ResourceName, ssmSecretResource)

	// for every container that needs ssm secret vending as env, it needs to wait all secrets got retrieved
	for _, container := range task.Containers {
		if container.ShouldCreateWithSSMSecret() {
			container.BuildResourceDependency(ssmSecretResource.GetName(),
				resourcestatus.ResourceStatus(ssmsecret.SSMSecretCreated),
				apicontainerstatus.ContainerCreated)
		}
	}
}
func (task *Task) initializeSSMSecretResource(credentialsManager credentials.Manager,
	resourceFields *taskresource.ResourceFields) {
	ssmSecretResource := ssmsecret.NewSSMSecretResource(task.Arn, task.getAllSSMSecretRequirements(),
		task.ExecutionCredentialsID, credentialsManager, resourceFields.SSMClientCreator)
	task.AddResource(ssmsecret.ResourceName, ssmSecretResource)

	// for every container that needs ssm secret vending as env, it needs to wait all secrets got retrieved
	for _, container := range task.Containers {
		if container.ShouldCreateWithSSMSecret() {
			container.BuildResourceDependency(ssmSecretResource.GetName(),
				resourcestatus.ResourceStatus(ssmsecret.SSMSecretCreated),
				apicontainerstatus.ContainerCreated)
		}
	}
}
func ( task * Task ) initializeSSMSecretResource ( credentialsManager credentials . Manager , resourceFields * taskresource . ResourceFields ) { ssmSecretResource := ssmsecret . NewSSMSecretResource ( task . Arn , task . getAllSSMSecretRequirements ( ) , task . ExecutionCredentialsID , credentialsManager , resourceFields . SSMClientCreator ) task . AddResource ( ssmsecret . ResourceName , ssmSecretResource ) // for every container that needs ssm secret vending as env, it needs to wait all secrets got retrieved for _ , container := range task . Containers { if container . ShouldCreateWithSSMSecret ( ) { container . BuildResourceDependency ( ssmSecretResource . GetName ( ) , resourcestatus . ResourceStatus ( ssmsecret . SSMSecretCreated ) , apicontainerstatus . ContainerCreated ) } } }
// initializeSSMSecretResource builds the resource dependency map for the SSM ssmsecret resource
initializeSSMSecretResource builds the resource dependency map for the SSM ssmsecret resource