Fixes: #497
This PR follows the `weekly-pulumi-update` CI workflow steps to update
our `pulumi/pulumi` dependency, with manual intervention to resolve
tooling update conflicts. Before generating the SDKs, it's necessary to
update the language tools and otel packages to ensure compatibility with
the latest changes.
Additional command executed for the manual updates:
```sh
TOOLS=(
"github.com/pulumi/pulumi/sdk/go/pulumi-language-go/v3"
"github.com/pulumi/pulumi/sdk/nodejs/cmd/pulumi-language-nodejs/v3"
"github.com/pulumi/pulumi/sdk/python/cmd/pulumi-language-python/v3"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
)
for TOOL in "${TOOLS[@]}"; do
go get -u $TOOL
go mod tidy
done
```
---
Note: the Go directive is upgraded to v1.24 as
`github.com/pulumi/pulumi/sdk/go/pulumi-language-go/v3` requires Go
v1.24
([ref](5c96e4e6aa/sdk/go/pulumi-language-go/go.mod (L3))).
260 lines
9.1 KiB
C#
Generated
260 lines
9.1 KiB
C#
Generated
// *** WARNING: this file was generated by pulumi-language-dotnet. ***
|
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Immutable;
|
|
using System.Threading.Tasks;
|
|
using Pulumi.Serialization;
|
|
|
|
namespace Pulumi.DockerBuild
|
|
{
|
|
/// <summary>
|
|
/// A wrapper around `docker buildx imagetools create` to create an index
|
|
/// (or manifest list) referencing one or more existing images.
|
|
///
|
|
/// In most cases you do not need an `Index` to build a multi-platform
|
|
/// image -- specifying multiple platforms on the `Image` will handle this
|
|
/// for you automatically.
|
|
///
|
|
/// However, as of April 2024, building multi-platform images _with
|
|
/// caching_ will only export a cache for one platform at a time (see [this
|
|
/// discussion](https://github.com/docker/buildx/discussions/1382) for more
|
|
/// details).
|
|
///
|
|
/// Therefore this resource can be helpful if you are building
|
|
/// multi-platform images with caching: each platform can be built and
|
|
/// cached separately, and an `Index` can join them all together. An
|
|
/// example of this is shown below.
|
|
///
|
|
/// This resource creates an OCI image index or a Docker manifest list
|
|
/// depending on the media types of the source images.
|
|
///
|
|
/// ## Example Usage
|
|
/// ### Multi-platform registry caching
|
|
/// ```csharp
|
|
/// using System.Collections.Generic;
|
|
/// using System.Linq;
|
|
/// using Pulumi;
|
|
/// using DockerBuild = Pulumi.DockerBuild;
|
|
///
|
|
/// return await Deployment.RunAsync(() =>
|
|
/// {
|
|
/// var amd64 = new DockerBuild.Image("amd64", new()
|
|
/// {
|
|
/// CacheFrom = new[]
|
|
/// {
|
|
/// new DockerBuild.Inputs.CacheFromArgs
|
|
/// {
|
|
/// Registry = new DockerBuild.Inputs.CacheFromRegistryArgs
|
|
/// {
|
|
/// Ref = "docker.io/pulumi/pulumi:cache-amd64",
|
|
/// },
|
|
/// },
|
|
/// },
|
|
/// CacheTo = new[]
|
|
/// {
|
|
/// new DockerBuild.Inputs.CacheToArgs
|
|
/// {
|
|
/// Registry = new DockerBuild.Inputs.CacheToRegistryArgs
|
|
/// {
|
|
/// Mode = DockerBuild.CacheMode.Max,
|
|
/// Ref = "docker.io/pulumi/pulumi:cache-amd64",
|
|
/// },
|
|
/// },
|
|
/// },
|
|
/// Context = new DockerBuild.Inputs.BuildContextArgs
|
|
/// {
|
|
/// Location = "app",
|
|
/// },
|
|
/// Platforms = new[]
|
|
/// {
|
|
/// DockerBuild.Platform.Linux_amd64,
|
|
/// },
|
|
/// Tags = new[]
|
|
/// {
|
|
/// "docker.io/pulumi/pulumi:3.107.0-amd64",
|
|
/// },
|
|
/// });
|
|
///
|
|
/// var arm64 = new DockerBuild.Image("arm64", new()
|
|
/// {
|
|
/// CacheFrom = new[]
|
|
/// {
|
|
/// new DockerBuild.Inputs.CacheFromArgs
|
|
/// {
|
|
/// Registry = new DockerBuild.Inputs.CacheFromRegistryArgs
|
|
/// {
|
|
/// Ref = "docker.io/pulumi/pulumi:cache-arm64",
|
|
/// },
|
|
/// },
|
|
/// },
|
|
/// CacheTo = new[]
|
|
/// {
|
|
/// new DockerBuild.Inputs.CacheToArgs
|
|
/// {
|
|
/// Registry = new DockerBuild.Inputs.CacheToRegistryArgs
|
|
/// {
|
|
/// Mode = DockerBuild.CacheMode.Max,
|
|
/// Ref = "docker.io/pulumi/pulumi:cache-arm64",
|
|
/// },
|
|
/// },
|
|
/// },
|
|
/// Context = new DockerBuild.Inputs.BuildContextArgs
|
|
/// {
|
|
/// Location = "app",
|
|
/// },
|
|
/// Platforms = new[]
|
|
/// {
|
|
/// DockerBuild.Platform.Linux_arm64,
|
|
/// },
|
|
/// Tags = new[]
|
|
/// {
|
|
/// "docker.io/pulumi/pulumi:3.107.0-arm64",
|
|
/// },
|
|
/// });
|
|
///
|
|
/// var index = new DockerBuild.Index("index", new()
|
|
/// {
|
|
/// Sources = new[]
|
|
/// {
|
|
/// amd64.Ref,
|
|
/// arm64.Ref,
|
|
/// },
|
|
/// Tag = "docker.io/pulumi/pulumi:3.107.0",
|
|
/// });
|
|
///
|
|
/// return new Dictionary<string, object?>
|
|
/// {
|
|
/// ["ref"] = index.Ref,
|
|
/// };
|
|
/// });
|
|
///
|
|
/// ```
|
|
/// </summary>
|
|
[DockerBuildResourceType("docker-build:index:Index")]
|
|
public partial class Index : global::Pulumi.CustomResource
|
|
{
|
|
/// <summary>
|
|
/// If true, push the index to the target registry.
|
|
///
|
|
/// Defaults to `true`.
|
|
/// </summary>
|
|
[Output("push")]
|
|
public Output<bool?> Push { get; private set; } = null!;
|
|
|
|
/// <summary>
|
|
/// The pushed tag with digest.
|
|
///
|
|
/// Identical to the tag if the index was not pushed.
|
|
/// </summary>
|
|
[Output("ref")]
|
|
public Output<string> Ref { get; private set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Authentication for the registry where the tagged index will be pushed.
|
|
///
|
|
/// Credentials can also be included with the provider's configuration.
|
|
/// </summary>
|
|
[Output("registry")]
|
|
public Output<Outputs.Registry?> Registry { get; private set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Existing images to include in the index.
|
|
/// </summary>
|
|
[Output("sources")]
|
|
public Output<ImmutableArray<string>> Sources { get; private set; } = null!;
|
|
|
|
/// <summary>
|
|
/// The tag to apply to the index.
|
|
/// </summary>
|
|
[Output("tag")]
|
|
public Output<string> Tag { get; private set; } = null!;
|
|
|
|
|
|
/// <summary>
|
|
/// Create a Index resource with the given unique name, arguments, and options.
|
|
/// </summary>
|
|
///
|
|
/// <param name="name">The unique name of the resource</param>
|
|
/// <param name="args">The arguments used to populate this resource's properties</param>
|
|
/// <param name="options">A bag of options that control this resource's behavior</param>
|
|
public Index(string name, IndexArgs args, CustomResourceOptions? options = null)
|
|
: base("docker-build:index:Index", name, args ?? new IndexArgs(), MakeResourceOptions(options, ""))
|
|
{
|
|
}
|
|
|
|
private Index(string name, Input<string> id, CustomResourceOptions? options = null)
|
|
: base("docker-build:index:Index", name, null, MakeResourceOptions(options, id))
|
|
{
|
|
}
|
|
|
|
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
|
|
{
|
|
var defaultOptions = new CustomResourceOptions
|
|
{
|
|
Version = Utilities.Version,
|
|
};
|
|
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
|
// Override the ID if one was specified for consistency with other language SDKs.
|
|
merged.Id = id ?? merged.Id;
|
|
return merged;
|
|
}
|
|
/// <summary>
|
|
/// Get an existing Index resource's state with the given name, ID, and optional extra
|
|
/// properties used to qualify the lookup.
|
|
/// </summary>
|
|
///
|
|
/// <param name="name">The unique name of the resulting resource.</param>
|
|
/// <param name="id">The unique provider ID of the resource to lookup.</param>
|
|
/// <param name="options">A bag of options that control this resource's behavior</param>
|
|
public static Index Get(string name, Input<string> id, CustomResourceOptions? options = null)
|
|
{
|
|
return new Index(name, id, options);
|
|
}
|
|
}
|
|
|
|
public sealed class IndexArgs : global::Pulumi.ResourceArgs
|
|
{
|
|
/// <summary>
|
|
/// If true, push the index to the target registry.
|
|
///
|
|
/// Defaults to `true`.
|
|
/// </summary>
|
|
[Input("push")]
|
|
public Input<bool>? Push { get; set; }
|
|
|
|
/// <summary>
|
|
/// Authentication for the registry where the tagged index will be pushed.
|
|
///
|
|
/// Credentials can also be included with the provider's configuration.
|
|
/// </summary>
|
|
[Input("registry")]
|
|
public Input<Inputs.RegistryArgs>? Registry { get; set; }
|
|
|
|
[Input("sources", required: true)]
|
|
private InputList<string>? _sources;
|
|
|
|
/// <summary>
|
|
/// Existing images to include in the index.
|
|
/// </summary>
|
|
public InputList<string> Sources
|
|
{
|
|
get => _sources ?? (_sources = new InputList<string>());
|
|
set => _sources = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The tag to apply to the index.
|
|
/// </summary>
|
|
[Input("tag", required: true)]
|
|
public Input<string> Tag { get; set; } = null!;
|
|
|
|
public IndexArgs()
|
|
{
|
|
Push = true;
|
|
}
|
|
public static new IndexArgs Empty => new IndexArgs();
|
|
}
|
|
}
|