aws/copilot-cli

Better validation for protected environment variable names

Ouverte

#2 025 ouverte le 7 mars 2021

 (0 commentaire) (0 réaction) (0 personne assignée)Go (441 forks)auto 404
good first issue

Métriques du dépôt

Stars
 (3 737 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur