Skip to content

Commit

Permalink
chore: ensure azd Terraform is alpha feature and fix ensure the servi…
Browse files Browse the repository at this point in the history
…ce resource is correctly tagged
  • Loading branch information
atrakic committed May 9, 2023
1 parent a400b46 commit a9f5068
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Usage: direnv allow

layout python3

requirements="src/requirements.txt"
Expand All @@ -11,3 +10,4 @@ export AZURE_DEV_COLLECT_TELEMETRY=no

if ! [ -x "$(command -v azd)" ]; then curl -fsSL https://aka.ms/install-azd.sh | bash; fi
azd auth login --check-status || azd auth login
azd config set alpha.terraform on
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ pylint: ## Run pylint
CHART ?= $(shell basename $$PWD)
release: ## Release (eg. V=0.0.1)
@[ "$(V)" ] \
&& read -p "Press enter to confirm and push tag v$(V) to origin, <Ctrl+C> to abort ..." \
&& git tag v$(V) -m "chore: v$(V)" \
&& git push origin v$(V) -f \
&& read -p "Press enter to confirm and push tag $(V) to origin, <Ctrl+C> to abort ..." \
&& git tag $(V) -m "release: $(V)" \
&& git push origin $(V) -f \
&& git fetch --tags --force --all -p \
&& if [ ! -z "$(GITHUB_TOKEN)" ] ; then \
curl \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ This command will clone the code to your current folder and prompt you for the f

- `Environment Name`: This will be used as a prefix for the resource group that will be created to hold all Azure resources. This name should be unique within your Azure subscription.

4. Run the following command to package a deployable copy of your application, provision the template's infrastructure to Azure and also deploy the application code to those newly provisioned resources.
4. Run the following commands to package a deployable copy of your application, provision the template's infrastructure to Azure and also deploy the application code to those newly provisioned resources.

```bash
azd config set alpha.terraform on
azd up
```

Expand Down
2 changes: 1 addition & 1 deletion infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module "web" {
location = var.location
rg_name = azurerm_resource_group.rg.name
resource_token = local.resource_token
tags = merge(local.tags, { azd-service-name : "web" })
tags = azurerm_resource_group.rg.tags
service_name = "web"
appservice_plan_id = module.appserviceplan.APPSERVICE_PLAN_ID
app_settings = {
Expand Down

0 comments on commit a9f5068

Please sign in to comment.