Update Azure/docker examples to 2.1
MODIFY
azure-cs-cosmosapp-component/ArchiveFunctionApp.cs
azure-cs-cosmosapp-component/ArchiveFunctionApp.cs
@@ -11,10 +11,10 @@ public class ArchiveFunctionApp : ComponentResource
{
public Output<string> AppId { get; private set; } = null!;
- public ArchiveFunctionApp(string name, ArchiveFunctionAppArgs args, ResourceOptions? options = null)
+ public ArchiveFunctionApp(string name, ArchiveFunctionAppArgs args, ComponentResourceOptions? options = null)
: base("examples:azure:ArchiveFunctionApp", name, options)
{
- var opts = CustomResourceOptions.Merge(options, new CustomResourceOptions { Parent = this });
+ var opts = new CustomResourceOptions { Parent = this };
var storageAccount = new Account($"sa{args.Location}", new AccountArgs
{
@@ -42,12 +42,12 @@ public class ArchiveFunctionApp : ComponentResource
ContainerAccessType = "private",
}, opts);
- var blob = new ZipBlob($"zip-{args.Location}", new ZipBlobArgs
+ var blob = new Blob($"zip-{args.Location}", new BlobArgs
{
StorageAccountName = storageAccount.Name,
StorageContainerName = container.Name,
- Type = "block",
- Content = args.Archive,
+ Type = "Block",
+ Source = args.Archive,
}, opts);
var codeBlobUrl = SharedAccessSignature.SignedBlobReadUrl(blob, storageAccount);
@@ -73,7 +73,7 @@ public class ArchiveFunctionAppArgs
{
public Input<string> ResourceGroupName { get; set; } = null!;
public string Location { get; set; } = null!;
- public Input<Archive> Archive { get; set; } = null!;
+ public Input<AssetOrArchive> Archive { get; set; } = null!;
private InputMap<string>? _appSettings;
public InputMap<string> AppSettings

MODIFY
azure-cs-cosmosapp-component/Azure.CosmosAppComponent.csproj
azure-cs-cosmosapp-component/Azure.CosmosAppComponent.csproj
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Pulumi.Azure" Version="1.14.0-preview" />
- <PackageReference Include="Pulumi.Docker" Version="1.2.0-preview" />
+ <PackageReference Include="Pulumi.Azure" Version="2.1.0-preview" />
+ <PackageReference Include="Pulumi.Docker" Version="1.4.0-preview" />
</ItemGroup>
<PropertyGroup>

MODIFY
azure-cs-cosmosapp-component/CosmosApp.cs
azure-cs-cosmosapp-component/CosmosApp.cs
@@ -97,7 +97,7 @@ public class CosmosApp : ComponentResource
var resourceGroup = args.ResourceGroup;
var locations = args.Locations;
var primaryLocation = locations[0];
- var parentOptions = (CustomResourceOptions)ResourceOptions.Merge(new CustomResourceOptions { Parent = this }, options);
+ var parentOptions = new CustomResourceOptions { Parent = this };
// Cosmos DB Account with multiple replicas
var cosmosAccount = new Account($"cosmos-{name}",
@@ -154,7 +154,7 @@ public class CosmosApp : ComponentResource
var globalContext = new GlobalContext(resourceGroup, cosmosAccount, database, container, parentOptions);
var buildLocation = args.Factory(globalContext);
- var endpointOptions = (CustomResourceOptions)ResourceOptions.Merge(options, new CustomResourceOptions { Parent = profile, DeleteBeforeReplace = true });
+ var endpointOptions = new CustomResourceOptions { Parent = profile, DeleteBeforeReplace = true };
var endpoints = locations.Select(location =>
{

MODIFY
azure-cs-cosmosapp-component/Functions.cs
azure-cs-cosmosapp-component/Functions.cs
@@ -31,13 +31,13 @@ public static class Functions
{
ResourceGroupName = resourceGroup.Name,
Location = region.Location,
- Archive = new FileArchive("./app/bin/Debug/netcoreapp2.2/publish"),
+ Archive = new FileArchive("./app/bin/Debug/netcoreapp3.1/publish"),
AppSettings =
{
{ "CosmosDBConnection", connectionString },
},
},
- global.Options);
+ new ComponentResourceOptions { Parent = global.Options.Parent } );
return new AzureEndpoint(func.AppId);
},

MODIFY
azure-cs-cosmosapp-component/VmScaleSets.cs
azure-cs-cosmosapp-component/VmScaleSets.cs
@@ -51,7 +51,7 @@ public static class VmScaleSets
public Func<RegionalContext, IRegionalEndpoint> BuildVMScaleSetApp(GlobalContext context)
{
- var options = (CustomResourceOptions)ResourceOptions.Merge(context.Options, new CustomResourceOptions { DeleteBeforeReplace = true });
+ var options = CustomResourceOptions.Merge(context.Options, new CustomResourceOptions { DeleteBeforeReplace = true });
var file = File.ReadAllText("./vm/vmCustomData.yaml");
return (RegionalContext region) =>
{
@@ -198,7 +198,7 @@ public static class VmScaleSets
},
UpgradePolicyMode = "Automatic",
},
- (CustomResourceOptions)ResourceOptions.Merge(options, new ResourceOptions { DependsOn = { bpepool, rule } }));
+ CustomResourceOptions.Merge(options, new CustomResourceOptions { DependsOn = { bpepool, rule } }));
var autoscale = new AutoscaleSetting($"as-{location}", new AutoscaleSettingArgs
{

MODIFY
azure-fs-aci/Azure.Aci.fsproj
azure-fs-aci/Azure.Aci.fsproj
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp3.0</TargetFramework>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Pulumi.FSharp" Version="1.5.2-preview" />
- <PackageReference Include="Pulumi.Azure" Version="1.4.0-preview" />
- <PackageReference Include="Pulumi.Docker" Version="1.2.0-preview" />
+ <PackageReference Include="Pulumi.FSharp" Version="1.12.1-preview" />
+ <PackageReference Include="Pulumi.Azure" Version="2.1.0-preview" />
+ <PackageReference Include="Pulumi.Docker" Version="1.4.0-preview" />
</ItemGroup>
</Project>

Update Azure/docker examples to 2.1 (#604)