Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Use curl | bash with helpful text for stack-aws-sample keyfile generation in meta, like azure and gcp #20

Open
prasek opened this issue Apr 15, 2020 · 0 comments
Labels

Comments

@prasek
Copy link
Member

prasek commented Apr 15, 2020

Problem

stack-gcp-sample and stack-azure-sample use a curl | bash with helpful text:

curl -s https://raw.githubusercontent.com/crossplane/stack-azure-sample/master/hack/azure-credentials.sh | bash -
Creating a role assignment under the scope of "/subscriptions/val"
  Retrying role assignment creation: 1/36
  Retrying role assignment creation: 2/36
Invoking "az ad app permission grant --id val --api 00000002-0000-0000-c000-000000000000" is needed to make the change effective

********************
{
  "clientId": "val",
  "clientSecret": "val",
  "subscriptionId": "val",
  "tenantId": "val",
  "activeDirectoryEndpointUrl": "https://login.microsoftonline.com",
  "resourceManagerEndpointUrl": "https://management.azure.com/",
  "activeDirectoryGraphResourceId": "https://graph.windows.net/",
  "sqlManagementEndpointUrl": "https://management.core.windows.net:8443/",
  "galleryEndpointUrl": "https://gallery.azure.com/",
  "managementEndpointUrl": "https://management.core.windows.net/"
}
********************

Your Azure Sample Stack keyfile is shown above, between the asterisks.

but stack-aws-sample does not, and just inlines the script without helpful text or asterisks:

AWS_PROFILE=default && echo -e "[default]\naws_access_key_id = $(aws configure get aws_access_key_id --profile $AWS_PROFILE)\naws_secret_access_key = $(aws configure get aws_secret_access_key --profile $AWS_PROFILE)"
[default]
aws_access_key_id = val
aws_secret_access_key = val

What can Crossplane do to help?

Use a curl | bash for https://github.com/crossplane/stack-aws-sample/blob/master/.registry/resources/awssample.ui-schema.yaml#L36 like the other stacks, with more helpful output, like stack-azure-sample does here:

curl -s https://raw.githubusercontent.com/crossplane/stack-aws-sample/master/hack/aws-credentials.sh | bash -

********************
[default]
aws_access_key_id = val
aws_secret_access_key = val
********************

Your AWS Sample Stack keyfile is shown above, between the asterisks.
@prasek prasek added the sm label Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant