vnet_name
or keyvault_name
, or keyvault_id
or storage_id
, use generic names like name
or id
for inputs and outputs. This practice simplifies the configuration, making it easier to manage and reducing the likelihood of confusion when working with multiple resources.public_network_access
to false or a default VM size can streamline the deployment process, and help user comply with organizational policies.subnet_id
, vnet_id
, network_security_group
) together. This makes the module easier to understand and use, as all related configurations are presented together. Use domain specific files where appropriate.Document each variable using the description
field to provide context and usage guidelines. This is particularly important in reusable modules where the end user might not be familiar with the internal details of the module. Clear documentation helps users understand the purpose of each variable and how it should be used, reducing the likelihood of misconfiguration. Use tools like tfdocs to automatically generate documentation for your modules and implement automation to update documentation during the Pull Request process.
```hcl variable “name” { description = “The name of the Virtual Network” type = string default = “my-vnet” }
[^ table of contents ^](#table-of-contents)