import * as aws from "@pulumi/aws"; import * as pulumi from "@pulumi/pulumi"; import { Team, MetricsConfig } from "./fargateHelpers"; export { Team, MetricsConfig }; /** * Retry policy configuration */ export type RetryPolicyConfig = { /** * Maximum number of retry attempts (0-185) */ maxRetries?: number; /** * Maximum age of the event in seconds before it's discarded */ maxAgeSeconds?: number; }; /** * Base options shared between scheduled and SQS-triggered tasks */ export type BaseFargateTaskOptions = { /** * Team that owns this task */ team: Team; /** * CPU units for the task (256, 512, 1024, 2048, 4096) */ cpu?: number; /** * Memory in MB for the task (512 - 30720, depending on CPU) */ memory?: number; /** * Ephemeral storage in GB (20-200) */ ephemeralStorageInGB?: number; /** * Environment variables for the container */ environment?: { name: string; value: pulumi.Input; }[]; /** * Secrets from SSM/Secrets Manager */ secrets?: aws.ecs.Secret[]; /** * Override the container's default command */ command?: string[]; /** * Override the container's entry point */ entryPoint?: string[]; /** * Additional security groups */ securityGroups?: (string | pulumi.Output)[]; /** * Whether to assign a public IP (default: false) */ assignPublicIp?: boolean; /** * Prometheus metrics configuration */ metrics?: MetricsConfig; /** * CloudWatch log retention in days (default: 60) */ logRetentionDays?: number; /** * Policies for the task execution role */ executionRolePolicies?: Record | aws.iam.Policy>; /** * Policies for the task role (application permissions) */ taskRolePolicies?: Record | aws.iam.Policy>; /** * ECS cluster to run the task on */ cluster?: aws.ecs.Cluster | string; /** * Number of tasks to launch per invocation (default: 1) */ taskCount?: number; /** * Runtime platform configuration (e.g., for ARM64) */ runtimePlatform?: aws.types.input.ecs.TaskDefinitionRuntimePlatform; /** * Volumes to attach to the task */ volumes?: pulumi.Input; /** * Mount points for the container */ mountPoints?: aws.ecs.MountPoint[]; /** * Repository credentials for private registries */ repositoryCredentials?: aws.ecs.RepositoryCredentials; /** * Additional resources to depend on */ dependsOn?: pulumi.Resource[]; }; /** * Result of creating the base task infrastructure */ export type BaseTaskInfrastructure = { taskDefinition: aws.ecs.TaskDefinition; taskSecurityGroup: aws.ec2.SecurityGroup; logGroup: aws.cloudwatch.LogGroup; executionRole: aws.iam.Role; taskRole: aws.iam.Role; eventBridgeRole: aws.iam.Role; eventBridgePolicy: aws.iam.RolePolicy; clusterArn: string | pulumi.Output; subnetIds: string[]; securityGroups: (string | pulumi.Output)[]; assignPublicIp: boolean; taskCount: number; resourcePrefix: string; taskName: string; team: Team; }; /** * Creates the base infrastructure shared by both scheduled and SQS-triggered Fargate tasks. * This includes: task definition, security group, log group, and IAM roles. * * Note: Slack notifications are now handled globally by the ops-lambdas EventBridge rule. * * @param taskName A name for this task * @param dockerImage The docker image to run * @param options Base configuration options * @param eventBridgeServices AWS services that can assume the EventBridge role * @returns Base infrastructure resources */ export declare function createBaseTaskInfrastructure(taskName: string, dockerImage: string | Promise | pulumi.OutputInstance, options: BaseFargateTaskOptions, eventBridgeServices: string[]): Promise;