mysterious-australia-14256
06/09/2021, 12:10 PMSku = new AzureNative.ServiceBus.Inputs.SBSkuArgs
{
Name = "Standard",
Tier = "Standard",
},
The error I get is of the type
Cannot implicitly convert type 'string' to 'Pulumi.Input<Pulumi.AzureNative.ServiceBus.SkuName>'
Can someone let me know what I am missing?
Thanks
Alantall-librarian-49374
06/09/2021, 12:14 PMSkuName.Standard
mysterious-australia-14256
06/09/2021, 1:21 PM[EnumType]
public readonly struct SkuName : IEquatable<SkuName>
{
public static SkuName Basic { get; }
public static SkuName Standard { get; }
public static SkuName Premium { get; }
If I try to use Enum.Parse on this I get back an error saying "Type provided must be an Enum.".
Do you know how I can convert the string "Standard" stored in a config file into something that SBSkuArgs will accept as a value for Name or Tier?
I was trying
(SkuName)Enum.Parse(typeof(SkuName), "Standard")
Tier = (SkuTier)(typeof(SkuTier).GetProperty(configTier )?.GetValue(null))!,
but is is a lot uglier than the AzureNextGen version which was simply
Tier = configTier
tall-librarian-49374
06/10/2021, 11:50 AMmysterious-australia-14256
06/10/2021, 12:12 PM