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

Source MLZ config environment name and region from configuration file #60

Merged
merged 10 commits into from
Mar 4, 2021

Conversation

glennmusa
Copy link
Contributor

Description

Generally, as much as possible, trying to source as much configuration from the MLZ configuration file instead of passing values by shell commands. This will make the automation more flexible for UI integration and CI/CD deployments.

  • Rename enclave to mlz_env_name
  • Source location from mlz_config_location

Issue reference

The issue this PR will close: #59

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles or validates correctly
  • BASH scripts have been validated using shellcheck
  • All tests pass (manual and automated)
  • The documentation is updated to cover any new or changed features
  • Markdown files have been linted using the recommended linter. (See .vscode/extensions.json.)
  • Relevant issues are linked to this PR

@glennmusa glennmusa changed the title Source MLZ Environment Name and MLZ Configuration Region from configuration Source MLZ config environment name and region from configuration file Mar 3, 2021
- added GH extension to dev container and extensions.json
Copy link
Contributor

@brooke-hamilton brooke-hamilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a couple of changes to the README. I have not finished executing the deployment. I stopped at setting values in saca-hub.tfvars because I don't know the answer to this question: What is deploymentname in saca-hub.tfvars?

deploymentname     = "{SACA_DEPLOYMENTNAME}"

scripts/config/config_create.sh Show resolved Hide resolved
README.md Show resolved Hide resolved
scripts/config/mlz_config_create.sh Show resolved Hide resolved
@glennmusa
Copy link
Contributor Author

glennmusa commented Mar 4, 2021

@brooke-hamilton deployment name, at the scope you indicate, can be whatever you so choose, it's not generated by anything in these changes but is a terraform variable for replacement. The changes in this PR have no effect on what variable substitution happens at terraform execution time. That happens here, specifically:

terraform apply \
-var-file="${globalvars}" \
-var-file="${tfvars}" \
-var "mlz_clientid=${client_id}" \
-var "mlz_clientsecret=${client_secret}"

@brooke-hamilton
Copy link
Contributor

@brooke-hamilton deployment name, at the scope you indicate, can be whatever you so choose, it's not generated by anything in these changes but is a terraform variable for replacement.

Is it the same as mlz_env_name in mlz_tf_cfg.var? Or is it a different variable, but it could be the same value?

@glennmusa
Copy link
Contributor Author

glennmusa commented Mar 4, 2021

@brooke-hamilton precisely. They're two different values. Could be the same, maybe (probably) they should be for ease of use, but they're not related today. A good rule of thumb is that if it's "MLZ" it's probably related to the customizations we're building. I'd wager 95% of the terraform in the repo is written with the assumption none of that exists (which it should).

The gap we're talking about here is that work we've been talking about collectively of "given a single configuration file, please generate all terraform variables" -- that doesn't exist today.

@glennmusa glennmusa merged commit 4141318 into main Mar 4, 2021
@glennmusa glennmusa deleted the glennmusa/renameenclave branch March 4, 2021 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants