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

Make auth does not work for multiple environments within the same tenant. #307

Open
slawpast opened this issue Jun 15, 2023 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@slawpast
Copy link

When I run "Make auth" for a second environment (the same tenant, different subsripton), Azure Credentials from the previous authorisation are being replaced.

Steps to reproduce the behavior:

  1. Fork and clone repository to the local machine, open in VS Code
  2. Create dev and prod environments in Github
  3. Update flowERHID in config.yaml file
  4. Create config.local.file ,set environment dev.
  5. Run Make auth in VS Code, save credentials to Github environment secrets
  6. Update config.local.yaml file - set environment: prod
  7. Run Make auth in VS Code,

At this point application registration is overriden instead of creating new one.
Can the logic be changed here, default name sp-flowehr-ci-${var.flowehr_id} in Auth/main.tf file be made dynamic (including environment name) and allowed multiple times without removing tfstate file for Auth terraform?

@slawpast slawpast added the bug Something isn't working label Jun 15, 2023
@martinpeck
Copy link
Member

The flowehr_id is set in the config.yaml. Would setting this to something else in your config.ENV.yaml file be the solution?

Each environment has its own .yaml config, and the flowehr_id can be defined for the environment (e.g. it is set to sample in config.sample.yaml).

In your example, where you reuse the same config file but change the environment name only, you'll use the same id (from the root config.yaml) and so I'd expect that to hit issues if you re-run make auth.

@jjgriff93 jjgriff93 added this to the 0.2 milestone Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants