Azure / Azure/Azure-Verified-Modules

Bug: Error: Invalid function argument - when removing DDOS protection according to docs

Open
#1,911 2 comments 0 reactions 1 assignee Claimed by @jaredfholgate View on GitHub
Dominant language
PowerShell
Stars
580
Forks
161
Avg merge
11h 3m
Merged PRs (30d)
15

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Infrastructure as Code Type? (Required)

terraform

### PowerShell Module Version (Optional)

4.2.4

### Bootstrap Module Version (Optional)

4.3.2

### Starter Module? (Required)

terraform - platform_landing_zone

### Starter Module Version (Optional)

_No response_

### Input arguments of the ALZ-PowerShell-Module (Optional)

_No response_

### Debug Output/Panic Output (Optional)

```shell

│ Error: Invalid function argument

│ on locals.management.tf line 10, in locals:
│ 10: management_group_settings_json_templated = templatestring(local.management_group_settings_json, local.final_replacements)
│ ├────────────────
│ │ while calling templatestring(template, vars)
│ │ local.final_replacements is object with 82 attributes

│ Invalid value for "vars" parameter: vars map does not contain key "ddos_protection_plan_id", referenced at
│ :1,1493-1516.
```

### Expected Behaviour (Required)

there should be no error

### Actual Behaviour (Required)

the error as noted above

### Steps to Reproduce (Optional)

* use the platform-landing-zone.tfvars for the single region hub and spoke.
* remove DDOS protection according to the docs
* run bootstrap & deploy-local.ps1

### Important Factoids (Optional)

The problem is this: a single instance of DDOS configuration was missed in the docs. Line 156:

ddos_protection_plan_id = "$${ddos_protection_plan_id}"

commenting this line removes the error

### References (Optional)

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.