Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display secret names as environment variables #720

Closed
efekarakus opened this issue Mar 6, 2020 · 4 comments
Closed

Display secret names as environment variables #720

efekarakus opened this issue Mar 6, 2020 · 4 comments
Labels
area/svc Issues about services. good first issue Issues for newcomers. size/S We should be able to deliver roughly 2 small issues in a sprint. type/enhancement Issues that are improvements for existing features.

Comments

@efekarakus
Copy link
Contributor

efekarakus commented Mar 6, 2020

Ask

Currently, if a user runs svc show, under "Variables" we only display environment variables:

$ copilot svc show
....
Variables

  Name                      Environment         Value
  ECS_CLI_APP_NAME          test                api
  ECS_CLI_ENVIRONMENT_NAME  test                test
  ECS_CLI_LB_DNS            test                XXXX
  ECS_CLI_PROJECT_NAME      test                ecs-kudos
  MY_DYNAMODB_TABLE_NAME    test                ecs-kudos-test-api
  MY_QUEUE_URL              test                https://sqs.us-west-2.amazonaws.com/XXXX/SampleQueue

Since secrets are also injected as environment variables we should also display them under variables:

$ copilot svc show
....
Variables

  Name                      Environment         Value                      Is a secret?
  ...                                                                      no
  MY_DB_PASSWD              test                ssm/<parameter name>       yes
  OTHER_DB_PASSWD           test                secretsmanager/<ARN>       yes

Why?

I want to see all the available environment variable names (including secrets) when I run "svc show".

I'm not particularly attached to the UX above, so feel free to propose something else.

@efekarakus efekarakus added type/enhancement Issues that are improvements for existing features. area/svc Issues about services. good first issue Issues for newcomers. labels Mar 6, 2020
@kohidave
Copy link
Contributor

kohidave commented Mar 9, 2020

Should we stick with the manifest style of grouping it under a different header? Secrets or something?

@efekarakus
Copy link
Contributor Author

Sure that sounds good. It would make it easier to display too.

Secrets
  Name                      Environment         Value from                     
  MY_DB_PASSWD              test                ssm/<parameter name>       
  OTHER_DB_PASSWD           test                <ARN>       

@efekarakus
Copy link
Contributor Author

efekarakus commented Sep 15, 2020

To achieve this functionality:

Spec

Each checklist requires both a code change, its own unit test, and optionally split into separate PRs.

  • Add new method Secrets to TaskDefinition
    Should be very similar to EnvironmentVariables method:

    // EnvironmentVariables returns environment variables of the task definition.
    func (t *TaskDefinition) EnvironmentVariables() map[string]string {
    envs := make(map[string]string)
    for _, env := range t.ContainerDefinitions[0].Environment {
    envs[aws.StringValue(env.Name)] = aws.StringValue(env.Value)
    }
    return envs
    }

  • Add new method Secrets to Service
    Should be very similar to the EnvVars method:

    // EnvVars returns the environment variables of the task definition.
    func (d *ServiceDescriber) EnvVars() (map[string]string, error) {
    taskDefName := fmt.Sprintf("%s-%s-%s", d.app, d.env, d.service)
    taskDefinition, err := d.ecsClient.TaskDefinition(taskDefName)
    if err != nil {
    return nil, err
    }
    envVars := taskDefinition.EnvironmentVariables()
    return envVars, nil
    }

  • Add new type Secret similar to EnvVar, modify backendSvcDesc and webSvcDesc to use secrets

    func (w *backendSvcDesc) HumanString() string {
    var b bytes.Buffer
    writer := tabwriter.NewWriter(&b, minCellWidth, tabWidth, cellPaddingWidth, paddingChar, noAdditionalFormatting)
    fmt.Fprint(writer, color.Bold.Sprint("About\n\n"))
    writer.Flush()
    fmt.Fprintf(writer, " %s\t%s\n", "Application", w.App)
    fmt.Fprintf(writer, " %s\t%s\n", "Name", w.Service)
    fmt.Fprintf(writer, " %s\t%s\n", "Type", w.Type)
    fmt.Fprint(writer, color.Bold.Sprint("\nConfigurations\n\n"))
    writer.Flush()
    w.Configurations.humanString(writer)
    fmt.Fprint(writer, color.Bold.Sprint("\nService Discovery\n\n"))
    writer.Flush()
    w.ServiceDiscovery.humanString(writer)
    fmt.Fprint(writer, color.Bold.Sprint("\nVariables\n\n"))
    writer.Flush()
    w.Variables.humanString(writer)
    if len(w.Resources) != 0 {
    fmt.Fprint(writer, color.Bold.Sprint("\nResources\n"))
    writer.Flush()
    // Go maps don't have a guaranteed order.
    // Show the resources by the order of environments displayed under Configurations for a consistent view.
    w.Resources.humanStringByEnv(writer, w.Configurations)
    }
    writer.Flush()
    return b.String()
    }

  • Populate the []Secret slice in Describe methods:

    var configs []*ServiceConfig
    var services []*ServiceDiscovery
    var envVars []*EnvVars
    for _, env := range environments {
    err := d.initServiceDescriber(env)
    if err != nil {
    return nil, err
    }
    svcParams, err := d.svcDescriber[env].Params()
    if err != nil {
    return nil, fmt.Errorf("retrieve service deployment configuration: %w", err)
    }
    services = appendServiceDiscovery(services, serviceDiscovery{
    Service: d.svc,
    Port: svcParams[stack.LBWebServiceContainerPortParamKey],
    App: d.app,
    }, env)
    configs = append(configs, &ServiceConfig{
    Environment: env,
    Port: svcParams[stack.LBWebServiceContainerPortParamKey],
    Tasks: svcParams[stack.WorkloadTaskCountParamKey],
    CPU: svcParams[stack.WorkloadTaskCPUParamKey],
    Memory: svcParams[stack.WorkloadTaskMemoryParamKey],
    })
    backendSvcEnvVars, err := d.svcDescriber[env].EnvVars()
    if err != nil {
    return nil, fmt.Errorf("retrieve environment variables: %w", err)
    }
    envVars = append(envVars, flattenEnvVars(env, backendSvcEnvVars)...)
    }

@efekarakus efekarakus added the size/S We should be able to deliver roughly 2 small issues in a sprint. label Nov 16, 2020
mergify bot pushed a commit that referenced this issue Nov 24, 2020
This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN.

Addresses #720

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
iamhopaul123 added a commit to iamhopaul123/amazon-ecs-cli-v2 that referenced this issue Dec 2, 2020
Author: penghaoh <[email protected]>
Date: 2020-11-30T22:14:28.000Z

Address feedback

commit c09bbba6bd10d646417510d998451a1f2e141bbe
Author: penghaoh <[email protected]>
Date: 2020-11-23T23:23:21.000Z

chore: add boilerplate for copilot exec

cr https://code.amazon.com/reviews/CR-39357784

commit 46a0f2bea06e6436e1ecf333546f5a3fa50411e2
Author: penghaoh <[email protected]>
Date: 2020-11-23T20:14:22.000Z

chore: add custom aws-sdk-go for ECS

cr https://code.amazon.com/reviews/CR-39348057

commit 25be354
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: 2020-11-30T17:07:40.000Z

chore: Bump github.com/briandowns/spinner from 1.11.1 to 1.12.0 (aws#1729)

Bumps [github.com/briandowns/spinner](https://github.com/briandowns/spinner) from 1.11.1 to 1.12.0.
- [Release notes](https://github.com/briandowns/spinner/releases)
- [Commits](briandowns/spinner@v1.11.1...v1.12)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
commit ef735c9
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: 2020-11-30T17:02:37.000Z

chore: Bump github.com/aws/aws-sdk-go from 1.35.33 to 1.35.35 (aws#1730)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.33 to 1.35.35.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-go@v1.35.33...v1.35.35)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit ce836bd
Author: Janice Huang <[email protected]>
Date: 2020-11-24T22:43:38.000Z

chore(cli): make the dashes under column headings consistent (aws#1705)

Wherever command output is in tabular format, this brings consistency to our formatting-- dashes (same length as heading, not longest element) below the headings.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

commit 6128e9c
Author: Janice Huang <[email protected]>
Date: 2020-11-24T20:22:47.000Z

feat(cli): display secrets as subcategory in `svc_show` (aws#1704)

This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN.

Addresses aws#720

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

commit 42567bf
Author: Efe Karakus <[email protected]>
Date: 2020-11-23T21:39:32.000Z

docs(README): remove preview program description (aws#1722)

_By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
@bvtujo
Copy link
Contributor

bvtujo commented Feb 10, 2021

This is addressed by the linked PR above (#1704)

@bvtujo bvtujo closed this as completed Feb 10, 2021
iamhopaul123 added a commit that referenced this issue Mar 15, 2021
* chore: add custom aws-sdk-go for ECS

cr https://code.amazon.com/reviews/CR-39348057

* commit e19046ca2668f00fdbd4d328d86ef2b9e576b9d5
Author: penghaoh <[email protected]>
Date: 2020-11-30T22:14:28.000Z

Address feedback

commit c09bbba6bd10d646417510d998451a1f2e141bbe
Author: penghaoh <[email protected]>
Date: 2020-11-23T23:23:21.000Z

chore: add boilerplate for copilot exec

cr https://code.amazon.com/reviews/CR-39357784

commit 46a0f2bea06e6436e1ecf333546f5a3fa50411e2
Author: penghaoh <[email protected]>
Date: 2020-11-23T20:14:22.000Z

chore: add custom aws-sdk-go for ECS

cr https://code.amazon.com/reviews/CR-39348057

commit 25be354
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: 2020-11-30T17:07:40.000Z

chore: Bump github.com/briandowns/spinner from 1.11.1 to 1.12.0 (#1729)

Bumps [github.com/briandowns/spinner](https://github.com/briandowns/spinner) from 1.11.1 to 1.12.0.
- [Release notes](https://github.com/briandowns/spinner/releases)
- [Commits](briandowns/spinner@v1.11.1...v1.12)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
commit ef735c9
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: 2020-11-30T17:02:37.000Z

chore: Bump github.com/aws/aws-sdk-go from 1.35.33 to 1.35.35 (#1730)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.33 to 1.35.35.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-go@v1.35.33...v1.35.35)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit ce836bd
Author: Janice Huang <[email protected]>
Date: 2020-11-24T22:43:38.000Z

chore(cli): make the dashes under column headings consistent (#1705)

Wherever command output is in tabular format, this brings consistency to our formatting-- dashes (same length as heading, not longest element) below the headings.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

commit 6128e9c
Author: Janice Huang <[email protected]>
Date: 2020-11-24T20:22:47.000Z

feat(cli): display secrets as subcategory in `svc_show` (#1704)

This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN.

Addresses #720

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

commit 42567bf
Author: Efe Karakus <[email protected]>
Date: 2020-11-23T21:39:32.000Z

docs(README): remove preview program description (#1722)

_By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._

* chore(cli): boilerplate for svc/job/task exec

cr https://code.amazon.com/reviews/CR-39984997

* Address feedback and add --cluster flag to task exec

* chore(cli): add validate and ask for svc exec

cr https://code.amazon.com/reviews/CR-40079015

* chore(cli): implement svc exec Execute()

cr https://code.amazon.com/reviews/CR-40177002

* Address comment

* chore(ecs): implement ExecuteCommand API

cr https://code.amazon.com/reviews/CR-40448327

* Remove log in ecs pkg

* Add log prompting users to delete the orphan session

* Remove ErrExecuteCommand

* chore(exec): implement StartSession for OS

cr https://code.amazon.com/reviews/CR-40615982

* Use http/Get to download the binary instead of curl to local

* Move ssm plugin validate to cli pkg

* chore(ecs): remove terminate session call in ExecuteCommand

cr https://code.amazon.com/reviews/CR-40863766

* chore(exec): add plugin management for non macos platforms

cr https://code.amazon.com/reviews/CR-40966835

* chore: use gamma endpoint for ECS and RGTA client

* Avoid outputting when validating ssm plugin on windows

* Update frontend model

* Address feedback

* Address feedback

* chore(exec): apply interactive run to start session

cr https://code.amazon.com/reviews/CR-41395554

* chore(manifest): add exec field to the manifest

cr https://code.amazon.com/reviews/CR-41475925

* chore(stack): update stack pkg and CFN template for services and environment

cr https://code.amazon.com/reviews/CR-41546916

* Address iyerv@ feedback

* Rename exec to executeCommand and use go template instead of CFN param

* chore(cli): remove interactive flag and job exec

cr https://code.amazon.com/reviews/CR-41851301

* chore(cli): add task exec validate

cr https://code.amazon.com/reviews/CR-41860865

* chore(cli): add ssm plugin validation for task exec

cr https://code.amazon.com/reviews/CR-41862462

* chore(selector): add running tasks selector (#1792)

<!-- Provide summary of changes -->
Add `RunningTask()` to `selector` pkg, allowing to select a running copilot task.
<!-- Issue number, if available. E.g. "Fixes #31", "Addresses #42, 77" -->

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* Resolve merging conflict

cr https://code.amazon.com/reviews/CR-41929264

* chore(cli): add Ask() for task exec

cr https://code.amazon.com/reviews/CR-41994838

* Fix prompt text

cr https://code.amazon.com/reviews/CR-42292095

* Address feedback

* chore(templates): add resource comments to v1.2.0 env template

* chore(cli): implement Execute() for task exec

cr https://code.amazon.com/reviews/CR-42377497

* chore: enable execute-command for task run

cr https://code.amazon.com/reviews/CR-42467741

* chore(cli): remove exec related unused code

cr https://code.amazon.com/reviews/CR-42531908

* docs: add docs for svc/task exec

cr https://code.amazon.com/reviews/CR-42539124

* Address feedback

* chore(cli): task exec should be able to use --default in workspace

cr https://code.amazon.com/reviews/CR-43124690

* chore(env): update v1.2.0 env template

cr https://code.amazon.com/reviews/CR-43574909

* chore(doc): add info for svc-exec

cr https://code.amazon.com/reviews/CR-43631507

* chore: fix template bugs and remove gamma endpoint usage

cr https://code.amazon.com/reviews/CR-43826647

* Address feedback

* Update the doc

* chore(task): add default task role for exec

cr https://code.amazon.com/reviews/CR-43838665

* Update task exec doc

* chore(exec): enable svc exec by default

cr https://code.amazon.com/reviews/CR-43849472

* Change execute_command default to false

* chore(exec): task exec only lists one-off task

cr https://code.amazon.com/reviews/CR-43918751

* chore: fix ubuntu ssm plugin install and exec doc

cr https://code.amazon.com/reviews/CR-44013235

* Address feedback

* chore(manifest): rename execute_command to exec

cr https://code.amazon.com/reviews/CR-44072460

* chore(exec): UI changes and test fixes

cr https://code.amazon.com/reviews/CR-44358240

* chore: fix unit test

cr https://code.amazon.com/reviews/CR-44369866

* chore(template): switch AMZN::ECS::Service to AWS::ECS::Service

cr https://code.amazon.com/reviews/CR-44443109

* chore(exec): add flag to skip confirmation for SSM plugin

* chore(exec): task exec task family name should be prefixed

* chore(e2e): add exec suite

cr https://code.amazon.com/reviews/CR-44552067

* Address feedback

* Add to the e2e buildspec

* chore(doc): add exec video

cr https://code.amazon.com/reviews/CR-47049800

* Disable exec e2e test

* Remove new-sdk-go and update aws ecs sdk go
thrau pushed a commit to localstack/copilot-cli-local that referenced this issue Dec 9, 2022
This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN.

Addresses aws#720

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
thrau pushed a commit to localstack/copilot-cli-local that referenced this issue Dec 9, 2022
* chore: add custom aws-sdk-go for ECS

cr https://code.amazon.com/reviews/CR-39348057

* commit e19046ca2668f00fdbd4d328d86ef2b9e576b9d5
Author: penghaoh <[email protected]>
Date: 2020-11-30T22:14:28.000Z

Address feedback

commit c09bbba6bd10d646417510d998451a1f2e141bbe
Author: penghaoh <[email protected]>
Date: 2020-11-23T23:23:21.000Z

chore: add boilerplate for copilot exec

cr https://code.amazon.com/reviews/CR-39357784

commit 46a0f2bea06e6436e1ecf333546f5a3fa50411e2
Author: penghaoh <[email protected]>
Date: 2020-11-23T20:14:22.000Z

chore: add custom aws-sdk-go for ECS

cr https://code.amazon.com/reviews/CR-39348057

commit 25be354
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: 2020-11-30T17:07:40.000Z

chore: Bump github.com/briandowns/spinner from 1.11.1 to 1.12.0 (aws#1729)

Bumps [github.com/briandowns/spinner](https://github.com/briandowns/spinner) from 1.11.1 to 1.12.0.
- [Release notes](https://github.com/briandowns/spinner/releases)
- [Commits](briandowns/spinner@v1.11.1...v1.12)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
commit ef735c9
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: 2020-11-30T17:02:37.000Z

chore: Bump github.com/aws/aws-sdk-go from 1.35.33 to 1.35.35 (aws#1730)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.33 to 1.35.35.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-go@v1.35.33...v1.35.35)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit ce836bd
Author: Janice Huang <[email protected]>
Date: 2020-11-24T22:43:38.000Z

chore(cli): make the dashes under column headings consistent (aws#1705)

Wherever command output is in tabular format, this brings consistency to our formatting-- dashes (same length as heading, not longest element) below the headings.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

commit 6128e9c
Author: Janice Huang <[email protected]>
Date: 2020-11-24T20:22:47.000Z

feat(cli): display secrets as subcategory in `svc_show` (aws#1704)

This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN.

Addresses aws#720

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

commit 42567bf
Author: Efe Karakus <[email protected]>
Date: 2020-11-23T21:39:32.000Z

docs(README): remove preview program description (aws#1722)

_By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._

* chore(cli): boilerplate for svc/job/task exec

cr https://code.amazon.com/reviews/CR-39984997

* Address feedback and add --cluster flag to task exec

* chore(cli): add validate and ask for svc exec

cr https://code.amazon.com/reviews/CR-40079015

* chore(cli): implement svc exec Execute()

cr https://code.amazon.com/reviews/CR-40177002

* Address comment

* chore(ecs): implement ExecuteCommand API

cr https://code.amazon.com/reviews/CR-40448327

* Remove log in ecs pkg

* Add log prompting users to delete the orphan session

* Remove ErrExecuteCommand

* chore(exec): implement StartSession for OS

cr https://code.amazon.com/reviews/CR-40615982

* Use http/Get to download the binary instead of curl to local

* Move ssm plugin validate to cli pkg

* chore(ecs): remove terminate session call in ExecuteCommand

cr https://code.amazon.com/reviews/CR-40863766

* chore(exec): add plugin management for non macos platforms

cr https://code.amazon.com/reviews/CR-40966835

* chore: use gamma endpoint for ECS and RGTA client

* Avoid outputting when validating ssm plugin on windows

* Update frontend model

* Address feedback

* Address feedback

* chore(exec): apply interactive run to start session

cr https://code.amazon.com/reviews/CR-41395554

* chore(manifest): add exec field to the manifest

cr https://code.amazon.com/reviews/CR-41475925

* chore(stack): update stack pkg and CFN template for services and environment

cr https://code.amazon.com/reviews/CR-41546916

* Address iyerv@ feedback

* Rename exec to executeCommand and use go template instead of CFN param

* chore(cli): remove interactive flag and job exec

cr https://code.amazon.com/reviews/CR-41851301

* chore(cli): add task exec validate

cr https://code.amazon.com/reviews/CR-41860865

* chore(cli): add ssm plugin validation for task exec

cr https://code.amazon.com/reviews/CR-41862462

* chore(selector): add running tasks selector (aws#1792)

<!-- Provide summary of changes -->
Add `RunningTask()` to `selector` pkg, allowing to select a running copilot task.
<!-- Issue number, if available. E.g. "Fixes aws#31", "Addresses aws#42, 77" -->

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* Resolve merging conflict

cr https://code.amazon.com/reviews/CR-41929264

* chore(cli): add Ask() for task exec

cr https://code.amazon.com/reviews/CR-41994838

* Fix prompt text

cr https://code.amazon.com/reviews/CR-42292095

* Address feedback

* chore(templates): add resource comments to v1.2.0 env template

* chore(cli): implement Execute() for task exec

cr https://code.amazon.com/reviews/CR-42377497

* chore: enable execute-command for task run

cr https://code.amazon.com/reviews/CR-42467741

* chore(cli): remove exec related unused code

cr https://code.amazon.com/reviews/CR-42531908

* docs: add docs for svc/task exec

cr https://code.amazon.com/reviews/CR-42539124

* Address feedback

* chore(cli): task exec should be able to use --default in workspace

cr https://code.amazon.com/reviews/CR-43124690

* chore(env): update v1.2.0 env template

cr https://code.amazon.com/reviews/CR-43574909

* chore(doc): add info for svc-exec

cr https://code.amazon.com/reviews/CR-43631507

* chore: fix template bugs and remove gamma endpoint usage

cr https://code.amazon.com/reviews/CR-43826647

* Address feedback

* Update the doc

* chore(task): add default task role for exec

cr https://code.amazon.com/reviews/CR-43838665

* Update task exec doc

* chore(exec): enable svc exec by default

cr https://code.amazon.com/reviews/CR-43849472

* Change execute_command default to false

* chore(exec): task exec only lists one-off task

cr https://code.amazon.com/reviews/CR-43918751

* chore: fix ubuntu ssm plugin install and exec doc

cr https://code.amazon.com/reviews/CR-44013235

* Address feedback

* chore(manifest): rename execute_command to exec

cr https://code.amazon.com/reviews/CR-44072460

* chore(exec): UI changes and test fixes

cr https://code.amazon.com/reviews/CR-44358240

* chore: fix unit test

cr https://code.amazon.com/reviews/CR-44369866

* chore(template): switch AMZN::ECS::Service to AWS::ECS::Service

cr https://code.amazon.com/reviews/CR-44443109

* chore(exec): add flag to skip confirmation for SSM plugin

* chore(exec): task exec task family name should be prefixed

* chore(e2e): add exec suite

cr https://code.amazon.com/reviews/CR-44552067

* Address feedback

* Add to the e2e buildspec

* chore(doc): add exec video

cr https://code.amazon.com/reviews/CR-47049800

* Disable exec e2e test

* Remove new-sdk-go and update aws ecs sdk go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/svc Issues about services. good first issue Issues for newcomers. size/S We should be able to deliver roughly 2 small issues in a sprint. type/enhancement Issues that are improvements for existing features.
Projects
None yet
Development

No branches or pull requests

3 participants