-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(misconf): Update Azure network schema for new checks #9791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(misconf): Update Azure network schema for new checks #9791
Conversation
|
Hi @yagreut ! Currently, searching for related resources is not implemented for ARM templates, unlike Terraform and CloudFormation. In this PR, I suggest adding the adaptation only for Terraform. I’ll review soon whether it’s possible to implement related resource search for ARM — at the moment, the parser cannot evaluate expressions and, as far as I remember, has no concept of references. |
📊 API Changes DetectedSemver impact: |
| PublicIPAddress: iacTypes.StringDefault("", nicID.GetMetadata()), | ||
| // EnableIPForwarding is not available from the VM's networkProfile, so it defaults to false | ||
| networkInterface := network.NetworkInterface{ | ||
| Metadata: nicID.GetMetadata(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have two options for handling the network interface in ARM:
-
Option 1:
If you do not plan to add checks that require the presence of a network interface, for example:count(compute.networkinterfaces) == 0 result.new("Compute instance must have at least one network interface", ...)
we can simply skip adding them during parsing.
-
Option 2: Otherwise, we should create metadata via
NewUnmanagedMetadata(), so that we can skip unmanaged networks in checks, for example:some ni in compute.networkinterfaces isManaged(ni)
Personally, I prefer Option 1, but I’m not sure how these interfaces will be used.
Co-authored-by: Nikita Pivkin <[email protected]>
Signed-off-by: nikpivkin <[email protected]>
Signed-off-by: nikpivkin <[email protected]>
3e2c2c7 to
98fb9a1
Compare
Update Azure network schema for new checks:
Checklist