Skip to content

Commit

Permalink
fix(aws): Add missing job queue arn config for batch services (#693)
Browse files Browse the repository at this point in the history
* fix batch env misconfig.
* update generated tf sources.
  • Loading branch information
tjholm authored Nov 4, 2024
1 parent 21b4dc1 commit 415736c
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion cloud/aws/deploy/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,12 @@ func (p *NitricAwsPulumiProvider) Batch(ctx *pulumi.Context, parent pulumi.Resou
job.Requirements.Memory = 512
}

containerProperties := pulumi.All(wrappedImage.URI(), p.BatchRoles[name].Arn, dbEndpoint, dbPassword).ApplyT(func(args []interface{}) (string, error) {
containerProperties := pulumi.All(wrappedImage.URI(), p.BatchRoles[name].Arn, dbEndpoint, dbPassword, p.JobQueue.Arn).ApplyT(func(args []interface{}) (string, error) {
imageName := args[0].(string)
jobRoleArn := args[1].(string)
nitricDbEndpoint := args[2].(string)
nitricDbPassword := args[3].(string)
jobQueueArn := args[4].(string)

jobDefinitionContainerProperties := JobDefinitionContainerProperties{
Image: imageName,
Expand All @@ -345,6 +346,10 @@ func (p *NitricAwsPulumiProvider) Batch(ctx *pulumi.Context, parent pulumi.Resou
Name: "NITRIC_STACK_ID",
Value: p.StackId,
},
{
Name: "NITRIC_JOB_QUEUE_ARN",
Value: jobQueueArn,
},
{
Name: "AWS_REGION",
Value: p.Region,
Expand Down
6 changes: 3 additions & 3 deletions cloud/aws/deploytf/.nitric/modules/service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ variable "stack_id" {
}

variable "memory" {
description = "The amount of memory to allocate to the lambda function"
description = "The amount of memory to allocate to the lambda function in MB"
type = number
default = 128
}

variable "ephemeral_storage" {
description = "The amount of ephemeral storage to allocate to the lambda function"
description = "The amount of ephemeral storage to allocate to the lambda function in MB"
type = number
default = 512
}

variable "timeout" {
description = "The timeout for the lambda function"
description = "The timeout for the lambda function in seconds"
type = number
default = 15
}
Expand Down
Binary file modified cloud/aws/deploytf/generated/api/jsii/api-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/bucket/jsii/bucket-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/http_proxy/jsii/http_proxy-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/keyvalue/jsii/keyvalue-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/policy/jsii/policy-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/queue/jsii/queue-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/rds/jsii/rds-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/schedule/jsii/schedule-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/secret/jsii/secret-0.0.0.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions cloud/aws/deploytf/generated/service/ServiceConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ type ServiceConfig struct {
ServiceName *string `field:"required" json:"serviceName" yaml:"serviceName"`
// The ID of the Nitric stack.
StackId *string `field:"required" json:"stackId" yaml:"stackId"`
// The amount of ephemeral storage to allocate to the lambda function in MB.
// The amount of ephemeral storage to allocate to the lambda function in MB 512.
EphemeralStorage *float64 `field:"optional" json:"ephemeralStorage" yaml:"ephemeralStorage"`
// The amount of memory to allocate to the lambda function in MB.
// The amount of memory to allocate to the lambda function in MB 128.
Memory *float64 `field:"optional" json:"memory" yaml:"memory"`
// The security group ids to use for the aws lambda function.
SecurityGroupIds *[]*string `field:"optional" json:"securityGroupIds" yaml:"securityGroupIds"`
// The subnet ids to use for the aws lambda function.
SubnetIds *[]*string `field:"optional" json:"subnetIds" yaml:"subnetIds"`
// The timeout for the lambda function in seconds.
// The timeout for the lambda function in seconds 15.
Timeout *float64 `field:"optional" json:"timeout" yaml:"timeout"`
}

Binary file modified cloud/aws/deploytf/generated/service/jsii/service-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/sql/jsii/sql-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/stack/jsii/stack-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/topic/jsii/topic-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/vpc/jsii/vpc-0.0.0.tgz
Binary file not shown.
Binary file modified cloud/aws/deploytf/generated/websocket/jsii/websocket-0.0.0.tgz
Binary file not shown.

0 comments on commit 415736c

Please sign in to comment.