Azure-Samples / contoso-real-estate

Intelligent enterprise-grade reference architecture for JavaScript, featuring OpenAI integration, Azure Developer CLI template and Playwright tests.
MIT License
860 stars 511 forks source link

[Chore] Stripe/infra - steps to get stripe endpoint fail #363

Closed diberry closed 11 months ago

diberry commented 11 months ago

This step documented here.

source .env && echo "Your Stripe webhook endpoint URL is:\n$SERVICE_STRIPE_URI/stripe-api/stripe/webhook"

fails with the following:

source .env && echo "Your Stripe webhook endpoint URL is:\n$SERVICE_STRIPE_URI/stripe-api/stripe/webhook"
bash: Manage: command not found
bash: .env: line 4: syntax error near unexpected token `('
bash: .env: line 4: `  • An Application can have multiple environments (ex: dev, test, prod).'

image

Obviously I can get the value from the .env file but the step needs to be fixed.

Ran it in Codespaces.

diberry commented 11 months ago

The previous command doesn't create the correct .env file:

azd env get-env > .env

It just sticks the help in the .env file


Manage your application environments. With this command group, you can create a new environment or get, set, and list your application environments.

  • An Application can have multiple environments (ex: dev, test, prod).
  • Each environment may have a different configuration (that is, connectivity information) for accessing Azure resources.
  • You can find all environment configuration under the .azure/<environment-name> folder.
  • The environment name is stored as the AZURE_ENV_NAME environment variable in the .azure/<environment-name>/.env file.

Usage
  azd env [command]

Available Commands
  get-values    : Get all environment values.
  list          : List environments.
  new           : Create a new environment and set it as the default.
  refresh       : Refresh environment settings by using information from a previous infrastructure provision.
  select        : Set the default environment.
  set           : Manage your environment settings.

Flags
        --docs  : Opens the documentation for azd env in your web browser.
    -h, --help  : Gets help for env.

Global Flags
    -C, --cwd string    : Sets the current working directory.
        --debug         : Enables debugging and diagnostics logging.
        --no-prompt     : Accepts the default value instead of prompting, or it fails if there is no default.

Use azd env [command] --help to view examples and more information about a specific command.

Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats.

I've already provisioned and deployed several times.

diberry commented 11 months ago

Change azd env get-env > .env to azd env get-values > .env

manekinekko commented 11 months ago

Fixed by https://github.com/Azure-Samples/contoso-real-estate/pull/368