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

Add the Azure subscription-id to the sample delete command given by inletsctl create #117

Open
eltariel opened this issue Jan 30, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@eltariel
Copy link

When you run inletsctl create, it prints a command to run in order to delete the server again. The command generated for an Azure deployment is incomplete and will not run without additional parameters.

Expected Behaviour

  • Run the inletsctl delete command generated by inletsctl create
  • The inlets server is deleted.

Current Behaviour

  • The provided command fails:
$ inletsctl delete --provider azure --id "inlets-flamboyant-buck2|deployment-c1f95ea9-6957-4aca-be24-26274269e52d"
Using provider: azure
give a value for --access-token-file, --access-token or set the environment variable "INLETS_ACCESS_TOKEN"
  • Adding --access-token-file with the same file used for create also fails:
$ inletsctl delete --provider azure --id "inlets-flamboyant-buck2|deployment-c1f95ea9-6957-4aca-be24-26274269e52d" --access-token-file az-sp.json
Using provider: azure
Deleting host: inlets-flamboyant-buck2|deployment-c1f95ea9-6957-4aca-be24-26274269e52d from azure
resources.GroupsClient#Delete: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidSubscriptionId" Message="The provided subscription identifier 'resourcegroups' is malformed or invalid."
  • Adding the subscription id succeeds:
$ inletsctl delete --provider azure --id "inlets-flamboyant-buck2|deployment-c1f95ea9-6957-4aca-be24-26274269e52d" --access-token-file az-sp.json --subscription-id $SUBSCRIPTION_ID
Using provider: azure
Deleting host: inlets-flamboyant-buck2|deployment-c1f95ea9-6957-4aca-be24-26274269e52d from azure

Possible Solution

Maybe including at least the --subscription-id in the generated command would be a good idea. Alternatively, the subscription ID is already in the access token file so if it's not specified from the command line it could just be read from there too.

@alexellis
Copy link
Member

Hi,

This seems like a reasonable improvement in user-experience. We'd be open to a pull request / contribution to inletsctl (which is an open source component).

Alex

@alexellis alexellis changed the title inletsctl create displays an incomplete delete command for Azure Add the Azure subscription-id to the sample delete command given by inletsctl create Jan 31, 2022
@alexellis alexellis added enhancement New feature or request good first issue Good for newcomers labels Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants