Skip to content

Commit 9c6b345

Browse files
committed
feat: finishing frst editing
1 parent e9b3707 commit 9c6b345

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

_posts/en/2025-03-05-integrating-backstage-azure-devops.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ I'll keep a repository on my GitHub with the Backstage code resulting from these
4141

4242
For this post, I created a new project in Azure DevOps called Backstage, where we will store our Backstage template, Terraform code, and the yaml file to create our pipeline.
4343

44-
>⚠️**Attention**: I will assume that you already know how to create a project, repository, and use the minimum necessary git commands.
44+
> **Attention**: I will assume that you already know how to create a project, repository, and use the minimum necessary git commands.
4545
{: .prompt-warning}
4646

4747
[In this link](https://backstage.io/docs/integrations/azure/locations) you can check the Backstage documentation for this integration. Backstage supports the use of managed identity, service principal, and PAT. For the purpose of this post, I will use PAT as it is simpler.
@@ -241,11 +241,12 @@ spec:
241241
entityRef: {% raw %}${{ steps.register.output.entityRef }}{% endraw %}
242242
```
243243

244-
> ⚠️**Important Note about Templates**⚠️:
244+
> **Important Note about Templates**:
245245
>
246246
> When using relative paths for file handling in Backstage, it **always** starts from the location where **the template was imported**.
247247
>
248248
> In other words, it always concatenates the path you provide with the path from where the template was imported. Thus, either you keep the files to be handled in the same location as the file from which you imported the template or use a URL from an external location, which is the approach I used here in the `fetch:template` action. More about this can be seen [here](https://backstage.io/docs/features/software-templates/) and [here](https://backstage.io/docs/tooling/cli/templates/).
249+
{: .prompt-warning }
249250

250251
Returning to our process, create the template file in Azure DevOps (replacing the necessary fields) and then go to Backstage and follow the same import process we did before in the integration test. When importing the template, you might encounter the error below:
251252

@@ -278,14 +279,16 @@ resource "azurerm_resource_group" "example" {
278279
}
279280
```
280281

281-
⚠️ I am not using a storage account here to store your Terraform state! For production environments, I suggest storing the state in a secure location.
282+
> I am not using a storage account here to store your Terraform state! For production environments, I suggest storing the state in a secure location.
283+
{: .prompt-tip }
282284

283285
Pay attention to the `name` variable, as it will be filled with the value coming from Backstage. Here we are making a very simple example using only one variable, but extrapolate this idea to any code you want to execute.
284286

285287
Once the Terraform code is created, upload it to our Azure DevOps repository.
286288

287-
💡 **Important**: since the idea is for Backstage to handle this file and then upload it and subsequently create a Pull Request of code, this (containing the `name` variable) will be replaced by the value coming from Backstage, making the code **non-reusable**.
289+
> **Important**: since the idea is for Backstage to handle this file and then upload it and subsequently create a Pull Request of code, this (containing the `name` variable) will be replaced by the value coming from Backstage, making the code **non-reusable**.
288290
To avoid this, we will separate the code with the variable, which we will call `base`, from the code that will have the variable filled, which we will call `changed`, for simplicity. This way, we will always have a place with the code ready to be used.
291+
{: .prompt-info }
289292

290293
Below is the approach I find the simplest, but feel free to adapt it to your needs:
291294

0 commit comments

Comments
 (0)