Load Ec2 Instance tags as configuration in your .Net Application
You can add the package to your project using dotnet core CLI
dotnet add package ZenExtensions.Configuration.Ec2Metadata
or by package manager console in Visual Studio
Install-Package ZenExtensions.Configuration.Ec2Metadata
Please refer to Changelog for changes between versions.
Add ec2 metadata configuration source
using ZenExtensions.Configuration.Ec2Metadata;
configurationBuilder.AddEc2Metadata();
Now you can get tag values using
var instanceName = configuration.GetValue<string>("Tags:Name");