sticky-exabyte-94099
01/07/2022, 9:00 AMvar redis = new AzureNative.Cache.Redis("redisCacheBeinni",
should be var redis = new AzureNative.Cache.Redis("redis",
.. going to try that...
[edit2] ok that solved it.. also it took for ever to create this resource and I think I gave up last time before it finished and everything went south from there...
var redis = new AzureNative.Cache.Redis("redisCacheBeinni", new AzureNative.Cache.RedisArgs
{
EnableNonSslPort = true,
Location = ResourceGroup.Apply(t => t.Location),
MinimumTlsVersion = "1.2",
Name = "redisCacheBeinni",
RedisConfiguration = new AzureNative.Cache.Inputs.RedisCommonPropertiesRedisConfigurationArgs
{
MaxmemoryPolicy = "allkeys-lru",
},
ResourceGroupName = ResourceGroup.Apply(t => t.Name),
Sku = new AzureNative.Cache.Inputs.SkuArgs
{
Capacity = 1,
Family = "C",
Name = "Standard",
},
Tags =
{
{ "environment", StackName },
},
});
this is the error...
error: cannot create already existing resource '/subscriptions/0e96.../resourceGroups/beinni-rg52d042de/providers/Microsoft.Cache/redis/redisCacheBeinni'
Shouldn´t this be re-runnable? If I need to run this once and then import this resource (don´t know how) that sounds like a bug.. or at least not what I would expect
I also see that all other resources are created with a postfix but redis is just created as redisCacheBeinni
in the portal..
And btw its never created in the Pulumi portal either...billowy-army-68599
01/07/2022, 2:08 PMsticky-exabyte-94099
01/07/2022, 2:28 PMbillowy-army-68599
01/07/2022, 2:33 PMName = "redisCacheBeinni",
If you explicitly set the names like this, you'll end up with resource collisions. Just remove this property:
var redis = new AzureNative.Cache.Redis("redisCacheBeinni", new AzureNative.Cache.RedisArgs
{
EnableNonSslPort = true,
Location = ResourceGroup.Apply(t => t.Location),
MinimumTlsVersion = "1.2",
RedisConfiguration = new AzureNative.Cache.Inputs.RedisCommonPropertiesRedisConfigurationArgs
{
MaxmemoryPolicy = "allkeys-lru",
},
ResourceGroupName = ResourceGroup.Apply(t => t.Name),
Sku = new AzureNative.Cache.Inputs.SkuArgs
{
Capacity = 1,
Family = "C",
Name = "Standard",
},
Tags =
{
{ "environment", StackName },
},
});
And a lot of the problems you're having will go awaydeleteBeforeReplace
property on your resources so the old one is removed before the new one. This is explained here: https://www.pulumi.com/docs/troubleshooting/faq/#why-do-resource-names-have-random-hex-character-suffixessticky-exabyte-94099
01/07/2022, 2:48 PMbillowy-army-68599
01/07/2022, 2:52 PMsticky-exabyte-94099
01/07/2022, 3:40 PMRedis = Output.Create(new AzureNative.Cache.Redis("redisCacheBeinni", new AzureNative.Cache.RedisArgs
{
});
I´m using the Redis output in another method. Maybe I should´t be doing that but should a new Redis be created every time just because of that?billowy-army-68599
01/07/2022, 4:25 PMsticky-exabyte-94099
01/07/2022, 4:36 PMAppServicePlan = new Plan
and instead of
[Output] public Output<Plan> AppServicePlan { get; set; }
it should just be regular C#
public Plan AppServicePlan { get; set; }
billowy-army-68599
01/07/2022, 4:38 PM