aws/copilot-cli

Better validation for protected environment variable names

開放

#2,025 建立於 2021年3月7日

 (0 則留言) (0 個反應) (0 位負責人)Go (441 個分叉)auto 404
good first issue

倉庫指標

星標
 (3,737 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I create a copilot job which defined COPILOT_APPLICATION_NAME as an environment variable. The infrastructure creation process failed with a rather obscure error message because that environment variable is injected automatically by copilot. Better validation of the manifest file would be more DX friendly.

acarlton@ubuntu:~/project$ aws-vault exec -n [account] -- copilot job deploy --name review-app-cleanup --env dev
Environment dev is already on the latest version v1.1.0, skip upgrade.
✔ Proposing infrastructure changes for stack [application]-dev-review-app-cleanup
- Creating the infrastructure for stack [application]-dev-review-app-cleanup           [rollback complete]  [211.2s]
  The following resource(s) failed to create: [TaskDefinition]. Rollback                                  
   requested by user.                                                                                     
  - An IAM Role for the Fargate agent to make AWS API calls on your behalf           [delete complete]    [0.0s]
  - A CloudWatch log group to hold your service logs                                 [delete complete]    [8.4s]
  - A CloudWatch event rule to trigger the job's state machine                       [not started]         
  - A state machine to invoke your job and handle retry and timeout logic            [not started]         
  - An ECS task definition to group your containers and run them on ECS              [delete complete]    [0.0s]
    Model validation failed (#/ContainerDefinitions/0/Environment: array i                                
    tems are not unique)                                                                                  
  - An IAM role to control permissions for the containers in your tasks              [delete complete]    [0.0s]
✘ deploy job: stack [application]-dev-review-app-cleanup did not complete successfully and exited with status ROLLBACK_COMPLETE

貢獻者指南