remove URI components from metadata host service endpoint when generating .mlzconfig #243
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Today, users in air-gapped clouds have issues initializing terraform backends when using the full ARM Metadata Host Service Endpoint URI (e.g. "https://management.azure.com/") and instead require just the host name (e.g. "management.azure.com")
This change, when using the
deploy.sh
quickstart, removes the URI components from the result ofaz cloud show --query endpoints.resourceManager
when the .mlzconfig file is generated so that just the hostname value is passed as ametadata_host
argument during terraform backend initialization. See #241 for more information.Before, a .mlzconfig generated from
deploy.sh
used to generate a key value pair like this:Now, it should generate a value like this:
...and that plays nicer across clouds and azurerm providers.
You can test this manually with the
generate_config_file.sh
script:Issue reference
The issue this PR will close: #241
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
shellcheck
.vscode/extensions.json
.)