-
Notifications
You must be signed in to change notification settings - Fork 8
Infrastructure as Code via Terraform #28
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
Infrastructure as Code via Terraform #28
Conversation
|
In case of successful review, please do a squash&merge as the commit history has no value for the provided content |
| 1. via template deployment and VS Code extension. This approach allows an quick deployment to Azure but does not necessarily reflect the best practices. You find more information on this option [here](documentation/DEPLOYMENT-VSCODE.md). | ||
| 2. via [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/overview) using `azd up`. This approach enables a quick and easy deployment and already contains best practices. It serves as a perfect starting point for a production grade setup. You find more information on this option [here](documentation/DEPLOYMENT-AZD.md). | ||
|
|
||
| > **Note** - If you choose to deploy to Azure via `azd` we provide two options to define the infrastructure as code, namely `Bicep` and `Terraform`. To make your life easier we provide two distinct [workspaces](https://code.visualstudio.com/docs/editor/workspaces#_multiroot-workspaces) for that to show you the relevant files and folders. If you want to go for `Bicep` you can open the workspace `workspaces/azd-bicep.code-workspace`, for Terraform go for the workspace `workspaces/azd-terraform.code-workspace`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make the bicep workspace flavor default somehow? Would make things easier on first run with gh codespaces and vsc.
Seems like no easy way present at the moment: microsoft/vscode#161414
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the documentation and did not find a way to define one workspace as default, neither via the workspace files nor via a vscode configuration we could attach.
|
|
||
| ## Mind the differences | ||
|
|
||
| The Terraform-based setup in the `azd` was introduced a later than the òne using Bicep. Due to that and due to the differences between them, some things work differently. Here are two things that we think are worth to mention. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo the "one"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with commit c59ed5b
documentation/DEPLOYMENT-AZD.md
Outdated
|
|
||
| Our setup follows those defaults and there no explicit configuration is necessary. | ||
|
|
||
| ## Infrastructure as Code - alternatives |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"alternatives" in the titel sounds as if there is an additional default path. How about dropping it? And maybe a sentence on bicep being default for azd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with commit c59ed5b
|
add alwaysOn: false to bicep config too: https://azure.github.io/PSRule.Rules.Azure/rules/Azure.AppService.AlwaysOn/ |
|
@lechnerc77 azure cli dependency for terraform requires us to bring it back in after azd dropped it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
azure cli dependency for terraform deployment showed up while testing from gh codespace. Likely present in your local environment?
The PR already contains that change: https://github.com/Azure-Samples/app-service-javascript-sap-cloud-sdk-quickstart/pull/28/files#diff-83ad425a33f54d795513559dc5a18919b499e1377d3e018be27eb15e2f7170caR19 |
|
Added a discussion in the Azure Developer CLI repo to check if we need additional config for Terraform login flow:Azure/azure-dev#1448 (comment) |
|
Enhanced the terraform instructions wrt to Azure CLI login flow in commit <Fixed with commit c59ed5b> |
|
Moved devcontainer.json.azcli and executed 'azd config set auth.useAzCliAuth true' but still having login issues with azd login and az login likewise. |
You are right, fixed this with commit 73d0301 |
|
Additional info: using
@MartinPankraz Can you verify that the workaround with exchanging the localhost redirect works? |
|
As some changes require a local modified copy of the
If accepted and merged, we can remove our local copy of the modules. |
|
@MartinPankraz : As discussed I added a disclaimer for the usage of codespaces in combination with the Terraform provider for Azure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved



Purpose
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Alternative:
What to Check
Verify that the following are valid
Other Information
closes #27