Skip to content

Commit 7d51e6c

Browse files
authored
TF updates - SFR3 and contribution guide (#2134)
1 parent 2e44509 commit 7d51e6c

2 files changed

Lines changed: 23 additions & 10 deletions

File tree

docs/content/contributing/terraform/composition.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,11 @@ Please refer to the [Terraform Interfaces]({{% siteparam base %}}/specs/tf/inter
159159

160160
## Telemetry
161161

162-
To meet [SFR3]({{% siteparam base %}}/spec/SFR3) & [SFR4]({{% siteparam base %}}/spec/SFR4).
163-
We use a telemetry provider [modtm](https://registry.terraform.io/providers/Azure/modtm/latest).
164-
This is a lightweight telemetry provider that sends telemetry data to Azure Application Insights via a HTTP POST front end service.
162+
To meet the requirements of [SFR3]({{% siteparam base %}}/spec/SFR3) & [SFR4]({{% siteparam base %}}/spec/SFR4), we use the [modtm](https://registry.terraform.io/providers/Azure/modtm/latest) telemetry provider. This lightweight telemetry provider sends telemetry data to Azure Application Insights via a HTTP POST front end service.
165163

166-
The telemetry provider is included in the module by default and is enabled by default.
167-
You do not need to change the configuration included in the [template repo](https://github.com/Azure/terraform-azurerm-avm-template/blob/main/main.telemetry.tf).
164+
The `modtm` telemetry provider is included in all Terraform modules and is enabled by default through the [main.telemetry.tf](https://github.com/Azure/terraform-azurerm-avm-template/blob/main/main.telemetry.tf) file being automatically distributed from the template repo. You do not need to change this configuration.
168165

169-
You must make sure to have the `modtm` provider in your `required_providers`.
170-
The linter will check this for you.
171-
However, inside your `terraform.tf` file please make sure you have this entry:
166+
Make sure that the `modtm` provider is listed under the `required_providers` section in the module's `terraform.tf` file using the following entry. This is also validated by the linter.
172167

173168
```terraform
174169
terraform {
@@ -182,8 +177,6 @@ terraform {
182177
}
183178
```
184179

185-
{{% include file="/static/includes/sample.telem.tf" language="terraform" options="linenos=false" %}}
186-
187180
## Eventual Consistency
188181

189182
When creating modules, it is important to understand that the Azure Resource Manager (ARM) API is sometimes eventually consistent.

docs/content/specs-defs/includes/shared/shared/functional/SFR3.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,23 @@ An example deployment name for a shortened module name would be: `46d3xbcp.res.d
8989
- [Terraform]({{% siteparam base %}}/contributing/terraform/)
9090

9191
{{% /notice %}}
92+
93+
### Terraform
94+
95+
To enable telemetry data collection for Terraform modules, the [modtm](https://registry.terraform.io/providers/Azure/modtm/latest) telemetry provider **MUST** be used. This lightweight telemetry provider sends telemetry data to Azure Application Insights via a HTTP POST front end service.
96+
97+
The `modtm` telemetry provider is included in all Terraform modules and is enabled by default through the [main.telemetry.tf](https://github.com/Azure/terraform-azurerm-avm-template/blob/main/main.telemetry.tf) file being automatically distributed from the template repo.
98+
99+
The `modtm` provider **MUST** be listed under the `required_providers` section in the module's `terraform.tf` file using the following entry. This is also validated by the linter.
100+
101+
```terraform
102+
terraform {
103+
required_providers {
104+
# .. other required providers as needed
105+
modtm = {
106+
source = "Azure/modtm"
107+
version = "~> 0.3"
108+
}
109+
}
110+
}
111+
```

0 commit comments

Comments
 (0)