https://pulumi.com logo
#general
Title
# general
h

happy-vase-64298

12/29/2023, 10:22 AM
Hey, I wonder if anyone found out how to make Pulumi AWS (or AWSX, for that matter) not force replace task definitions of ECS every time I run pulumi up? Sure, in the environment section, I have some environment variables that change, but I want to just update the image - preserving the environment variables of the original run. Anything I put in ignoreChanges just get ignored. See example: export const auditing_TDX = new awsx.ecs.FargateTaskDefinition("auditing-TD", { taskRole: {roleArn: iam_roles.us_east_1_ECS_ECSTaskRole.arn}, executionRole: {roleArn: iam_roles.us_east_1_ECS_ECSExecutionRole.arn}, family:
${config.env_name}-auditing-TD
, containers: { auditing: { name: "auditing", image:
270046177949.dkr.ecr.us-east-1.amazonaws.com/${config.ecsImagesVersions.get("Auditing_Service")}
, cpu: 1024, memory: 2048, memoryReservation: 400, essential: true, portMappings: [ { containerPort: 8011, hostPort: 8011, protocol: "tcp" } ], environment: pulumi.all([websites.siteUrlCdn, config.env_name, config.SECURITY_JWTPUBLICKEY, config.rdsPassword, rdsserverless.endpoint, config.rdsUsername, app_integration.SyncPermissionsQueue.name]).apply(([frontend_url, env_name, jwt_public_key, rdsPassword, rdsEndpoint, rdsUsername, syncPermissionsQueue]) => [ { "name": "SPRING_APPLICATION_LOGAPPENDER", "value": "ASYNCJSON" }, { "name": "SECURITY_JWTPUBLICKEY", "value": jwt_public_key }, { "name": "SECURITY_CORSALLOWEDORIGINPATTERNS", "value": frontend_url }, { "name": "SPRING_DATASOURCE_PASSWORD", "value": rdsPassword }, { "name": "SPRING_DATASOURCE_URL", "value":
jdbc:mysql://${rdsEndpoint}:3306/AuditingService?useSSL=false&createDatabaseIfNotExist=true
}, { "name": "LOG4J_FORMAT_MSG_NO_LOOKUPS", "value": "true" }, { "name": "SYNCPERMISSIONS_ENABLED", "value": "false" }, { "name": "SPRING_DATASOURCE_USERNAME", "value": rdsUsername }, { "name": "JAVA_OPTS", "value": "" }, { "name": "SPRING_DATASOURCE_DRIVERCLASSNAME", "value": "org.mariadb.jdbc.Driver" }, { "name": "AUDITING_DAYSTOEXPIRE", "value": "365" }, { "name": "SYNCPERMISSIONS_QUEUENAME", "value": syncPermissionsQueue } ]), logConfiguration: { logDriver: "awslogs", options: { "awslogs-group":
/${config.env_name}/auditing
, "awslogs-region": "us-east-1", "awslogs-stream-prefix": "auditing" } } }, }, }, {ignoreChanges: ["containers[0].environment", "containerDefinitions"]});
2 Views