@@ -326,15 +326,15 @@ resource "octopusdeploy_process_step" "process_step_aws_lambda_attempt_login" {
326326  properties             =  
327327      }
328328  execution_properties   =  
329-         " Octopus.Action.Script.ScriptBody"  =  " # Get the current AWS user. This will only succeed if the AWS account is valid.\n # If the AWS account is not valid, this step will fail. We can detect the failure and offer next steps.\n aws sts get-caller-identity" 
330329        " OctopusUseBundledTooling"  =  " False" 
331-         " Octopus.Action.Script.Syntax"  =  " PowerShell" 
332-         " Octopus.Action.Aws.Region"  =  " #{Project.AWS.Region}" 
333330        " Octopus.Action.Aws.AssumeRole"  =  " False" 
334-         " Octopus.Action.AwsAccount.Variable"  =  " Project.AWS.Account" 
335-         " Octopus.Action.AwsAccount.UseInstanceRole"  =  " False" 
331+         " Octopus.Action.Aws.Region"  =  " #{Project.AWS.Region}" 
336332        " Octopus.Action.Script.ScriptSource"  =  " Inline" 
333+         " Octopus.Action.Script.Syntax"  =  " PowerShell" 
337334        " Octopus.Action.RunOnServer"  =  " true" 
335+         " Octopus.Action.Script.ScriptBody"  =  " # Get the current AWS user. This will only succeed if the AWS account is valid.\n # If the AWS account is not valid, this step will fail. We can detect the failure and offer next steps.\n aws sts get-caller-identity" 
336+         " Octopus.Action.AwsAccount.UseInstanceRole"  =  " False" 
337+         " Octopus.Action.AwsAccount.Variable"  =  " Project.AWS.Account" 
338338      }
339339}
340340
@@ -357,11 +357,11 @@ resource "octopusdeploy_process_step" "process_step_aws_lambda_validate_setup" {
357357  properties             =  
358358      }
359359  execution_properties   =  
360+         " Octopus.Action.Script.ScriptFileName"  =  " octopus/aws/ValidateLambdaSetup.ps1" 
361+         " Octopus.Action.Script.ScriptSource"  =  " GitRepository" 
360362        " OctopusUseBundledTooling"  =  " False" 
361363        " Octopus.Action.RunOnServer"  =  " true" 
362364        " Octopus.Action.GitRepository.Source"  =  " External" 
363-         " Octopus.Action.Script.ScriptFileName"  =  " octopus/aws/ValidateLambdaSetup.ps1" 
364-         " Octopus.Action.Script.ScriptSource"  =  " GitRepository" 
365365      }
366366}
367367
@@ -383,9 +383,9 @@ resource "octopusdeploy_process_step" "process_step_aws_lambda_approve_productio
383383        " Octopus.Step.ConditionVariableExpression"  =  " #{unless Octopus.Deployment.Error}#{if Octopus.Action[Validate setup].Output.AwsLambdaConfigured == \" True\" }true#{/if}#{/unless}" 
384384      }
385385  execution_properties   =  
386-         " Octopus.Action.Manual.Instructions"  =  " Do you approve the production deployment?" 
387386        " Octopus.Action.RunOnServer"  =  " true" 
388387        " Octopus.Action.Manual.BlockConcurrentDeployments"  =  " False" 
388+         " Octopus.Action.Manual.Instructions"  =  " Do you approve the production deployment?" 
389389      }
390390}
391391
@@ -417,26 +417,26 @@ resource "octopusdeploy_process_step" "process_step_aws_lambda_upload_lambda" {
417417        " Octopus.Step.ConditionVariableExpression"  =  " #{unless Octopus.Deployment.Error}#{if Octopus.Action[Validate setup].Output.AwsLambdaConfigured == \" True\" }true#{/if}#{/unless}" 
418418      }
419419  execution_properties   =  
420-         " Octopus.Action.AwsAccount.UseInstanceRole"  =  " False" 
421-         " Octopus.Action.RunOnServer"  =  " true" 
422420        " Octopus.Action.Aws.S3.BucketName"  =  " #{Project.AWS.Lambda.S3.BucketName}" 
421+         " Octopus.Action.AwsAccount.Variable"  =  " Project.AWS.Account" 
422+         " Octopus.Action.Aws.S3.TargetMode"  =  " EntirePackage" 
423423        " OctopusUseBundledTooling"  =  " False" 
424+         " Octopus.Action.Aws.Region"  =  " #{Project.AWS.Region}" 
425+         " Octopus.Action.RunOnServer"  =  " true" 
426+         " Octopus.Action.Aws.AssumeRole"  =  " False" 
427+         " Octopus.Action.AwsAccount.UseInstanceRole"  =  " False" 
424428        " Octopus.Action.Aws.S3.PackageOptions"  =  jsonencode ({
425-         " cannedAcl"  =  " private" 
429+         " bucketKey"  =  " #{Project.AWS.Lambda.S3.FileName}" 
430+         " storageClass"  =  " STANDARD" 
426431        " metadata"  =  []
427432        " tags"  =  []
428-         " bucketKey"  =  " #{Project.AWS.Lambda.S3.FileName}" 
429433        " bucketKeyBehaviour"  =  " Custom" 
434+         " bucketKeyPrefix"  =  " " 
435+         " cannedAcl"  =  " private" 
430436        " variableSubstitutionPatterns"  =  " " 
431437        " structuredVariableSubstitutionPatterns"  =  " " 
432438        " autoFocus"  =  " true" 
433-         " bucketKeyPrefix"  =  " " 
434-         " storageClass"  =  " STANDARD" 
435439                })
436-         " Octopus.Action.Aws.Region"  =  " #{Project.AWS.Region}" 
437-         " Octopus.Action.AwsAccount.Variable"  =  " Project.AWS.Account" 
438-         " Octopus.Action.Aws.AssumeRole"  =  " False" 
439-         " Octopus.Action.Aws.S3.TargetMode"  =  " EntirePackage" 
440440      }
441441}
442442
@@ -468,21 +468,10 @@ resource "octopusdeploy_process_step" "process_step_aws_lambda_deploy_lambda_sam
468468        " Octopus.Step.ConditionVariableExpression"  =  " #{unless Octopus.Deployment.Error}#{if Octopus.Action[Validate setup].Output.AwsLambdaConfigured == \" True\" }true#{/if}#{/unless}" 
469469      }
470470  execution_properties   =  
471-         " Octopus.Action.Aws.IamCapabilities"  =  jsonencode ([
472-         " CAPABILITY_AUTO_EXPAND" 
473-         " CAPABILITY_IAM" 
474-         " CAPABILITY_NAMED_IAM" 
475-         ])
476-         " Octopus.Action.AwsAccount.UseInstanceRole"  =  " False" 
477-         " Octopus.Action.EnabledFeatures"  =  " Octopus.Features.JsonConfigurationVariables" 
478-         " Octopus.Action.RunOnServer"  =  " true" 
479-         " Octopus.Action.AwsAccount.Variable"  =  " Project.AWS.Account" 
480-         " OctopusUseBundledTooling"  =  " False" 
481-         " Octopus.Action.Aws.Region"  =  " #{Project.AWS.Region}" 
482471        " Octopus.Action.Aws.CloudFormation.Tags"  =  jsonencode ([
483472        {
484-         " key"  =  " OctopusTenantId" 
485473        " value"  =  " #{if Octopus.Deployment.Tenant.Id}#{Octopus.Deployment.Tenant.Id}#{/if}#{unless Octopus.Deployment.Tenant.Id}untenanted#{/unless}" 
474+         " key"  =  " OctopusTenantId" 
486475                },
487476        {
488477        " key"  =  " OctopusStepId" 
@@ -509,16 +498,27 @@ resource "octopusdeploy_process_step" "process_step_aws_lambda_deploy_lambda_sam
509498        " value"  =  " #{Octopus.Environment.Name}" 
510499                },
511500        {
512-         " value"  =  " #{Octopus.Project.Name}" 
513501        " key"  =  " DeploymentProject" 
502+         " value"  =  " #{Octopus.Project.Name}" 
514503                },
515504        ])
516-         " Octopus.Action.Aws.WaitForCompletion"  =  " True" 
517-         " Octopus.Action.Aws.AssumeRole"  =  " False" 
518505        " Octopus.Action.Aws.TemplateSource"  =  " Package" 
506+         " Octopus.Action.Aws.AssumeRole"  =  " False" 
507+         " OctopusUseBundledTooling"  =  " False" 
519508        " Octopus.Action.Package.JsonConfigurationVariablesTargets"  =  " sam.jvm.yaml" 
520-         " Octopus.Action.Aws.CloudFormationTemplate"  =  " sam.jvm.yaml" 
509+         " Octopus.Action.AwsAccount.UseInstanceRole"  =  " False" 
510+         " Octopus.Action.Aws.IamCapabilities"  =  jsonencode ([
511+         " CAPABILITY_AUTO_EXPAND" 
512+         " CAPABILITY_IAM" 
513+         " CAPABILITY_NAMED_IAM" 
514+         ])
515+         " Octopus.Action.Aws.WaitForCompletion"  =  " True" 
516+         " Octopus.Action.EnabledFeatures"  =  " Octopus.Features.JsonConfigurationVariables" 
517+         " Octopus.Action.Aws.Region"  =  " #{Project.AWS.Region}" 
518+         " Octopus.Action.RunOnServer"  =  " true" 
521519        " Octopus.Action.Aws.CloudFormationStackName"  =  " #{Octopus.Space.Name | Replace \" [^A-Za-z0-9]\"  \" -\" }-OctopubProductsSAMLambda-#{Octopus.Deployment.Id | Replace -}-#{Octopus.Environment.Name}" 
520+         " Octopus.Action.AwsAccount.Variable"  =  " Project.AWS.Account" 
521+         " Octopus.Action.Aws.CloudFormationTemplate"  =  " sam.jvm.yaml" 
522522      }
523523}
524524
@@ -549,11 +549,11 @@ resource "octopusdeploy_process_step" "process_step_aws_lambda_scan_for_vulnerab
549549  properties             =  
550550      }
551551  execution_properties   =  
552+         " OctopusUseBundledTooling"  =  " False" 
552553        " Octopus.Action.RunOnServer"  =  " true" 
553554        " Octopus.Action.GitRepository.Source"  =  " External" 
554555        " Octopus.Action.Script.ScriptFileName"  =  " octopus/DirectorySbomScan.ps1" 
555556        " Octopus.Action.Script.ScriptSource"  =  " GitRepository" 
556-         " OctopusUseBundledTooling"  =  " False" 
557557      }
558558}
559559
0 commit comments