RegistryImage class
Manages the lifecycle of a docker image in a registry. You can upload images to a registry (= docker push) and also delete them again. In contrast to awsx.ecr.Image, this resource does not require to build the image, but can be used to push an existing image to an ECR repository. The image will be pushed whenever the source image changes or is updated.
{{% examples %}}
Example Usage
{{% example %}}
Pushing an image to an ECR repository
import * as pulumi from "@pulumi/pulumi";
import * as awsx from "@pulumi/awsx";
const repository = new awsx.ecr.Repository("repository", { forceDelete: true });
const preTaggedImage = new awsx.ecr.RegistryImage("registry-image", {
repositoryUrl: repository.url,
sourceImage: "my-awesome-image:v1.0.0",
});
import pulumi
import pulumi_awsx as awsx
repository = awsx.ecr.Repository("repository", force_delete=True)
registry_image = awsx.ecr.RegistryImage("registry_image",
repository_url=repository.url,
source_image="my-awesome-image:v1.0.0")
package main
import (
"github.com/pulumi/pulumi-awsx/sdk/v3/go/awsx/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
repository, err := ecr.NewRepository(ctx, "repository", &ecr.RepositoryArgs{
ForceDelete: pulumi.Bool(true),
})
if err != nil {
return err
}
registryImage, err := ecr.NewRegistryImage(ctx, "registryImage", &ecr.RegistryImageArgs{
RepositoryUrl: repository.Url,
SourceImage: pulumi.String("my-awesome-image:v1.0.0"),
})
if err != nil {
return err
}
return nil
})
}
using Pulumi;
using Pulumi.Awsx.Ecr;
return await Pulumi.Deployment.RunAsync(() =>
{
var repository = new Repository("repository", new RepositoryArgs
{
ForceDelete = true,
});
var registryImage = new RegistryImage("registryImage", new RegistryImageArgs
{
RepositoryUrl = repository.Url,
SourceImage = "my-awesome-image:v1.0.0",
});
return new Dictionary<string, object?>{};
});
name: example
runtime: yaml
resources:
repository:
type: awsx:ecr:Repository
properties:
forceDelete: true
registryImage:
type: awsx:ecr:RegistryImage
properties:
repositoryUrl: ${repository.url}
sourceImage: "my-awesome-image:v1.0.0"
import com.pulumi.Pulumi;
import com.pulumi.awsx.ecr.Repository;
import com.pulumi.awsx.ecr.RepositoryArgs;
import com.pulumi.awsx.ecr.RegistryImage;
import com.pulumi.awsx.ecr.RegistryImageArgs;
public class Main {
public static void main(String[] args) {
Pulumi.run(ctx -> {
// Create an ECR repository with force delete enabled
var repository = new Repository("repository", RepositoryArgs.builder()
.forceDelete(true)
.build());
// Create a RegistryImage based on the ECR repository URL and source image
var registryImage = new RegistryImage("registryImage", RegistryImageArgs.builder()
.repositoryUrl(repository.url())
.sourceImage("my-awesome-image:v1.0.0")
.build());
});
}
}
{{% /example %}} {{% /examples %}}
Constructors
- RegistryImage(String name, {RegistryImageArgs? args, ComponentResourceOptions? options})
-
Creates a new RegistryImage.
nameThe Pulumi resource name.argsArguments used to configure this RegistryImage. The set of arguments for RegistryImage.optionsResource options controlling this resource's behavior.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
image
↔ Output<
RegistryImage?> -
The underlying RegistryImage resource.
latefinal
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
registerOutputs(
[Map< String, dynamic> ? outputs]) → void -
Registers component outputs with the engine.
inherited
-
registerOutputsAsync(
Future< Map< outputs) → Future<String, dynamic> >void> -
Async variant of
registerOutputs.inherited -
registerOutputsOutput(
Output< Map< outputs) → voidString, dynamic> > -
Registers an already-computed output map.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited