SamuelFisher / TerraformPluginDotNet

Write Terraform providers in C#.
MIT License
46 stars 14 forks source link

Enable nullable so interface helps display whether certain objects are null #29

Closed ThomasBleijendaal closed 2 years ago

ThomasBleijendaal commented 2 years ago

When implementing an IResourceProvider it helps when you know when to expect a null from terraform.

I've enabled nullable so I'm able to annotate IResourceProvider<T> and IProviderConfigurator<T>, but that also allowed me to correctly handle all the potential nulls in the entire solution. In some situations where null is unlikely (like the reflection stuff) I've fixed it by adding ! everywhere.