harness.chaos.ImageRegistry
Explore with Pulumi AI
Resource for managing a Harness Chaos Image Registry
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = new harness.chaos.ImageRegistry("example", {
orgId: "<org_id>",
projectId: "<project_id>",
registryServer: "<registry_server>",
registryAccount: "<registry_account>",
isPrivate: true,
secretName: "<secret_name>",
isDefault: false,
isOverrideAllowed: true,
useCustomImages: true,
customImages: [{
logWatcher: "<log_watcher_image>",
ddcr: "<ddcr_image>",
ddcrLib: "<ddcr_lib_image>",
ddcrFault: "<ddcr_fault_image>",
}],
});
import pulumi
import pulumi_harness as harness
example = harness.chaos.ImageRegistry("example",
org_id="<org_id>",
project_id="<project_id>",
registry_server="<registry_server>",
registry_account="<registry_account>",
is_private=True,
secret_name="<secret_name>",
is_default=False,
is_override_allowed=True,
use_custom_images=True,
custom_images=[{
"log_watcher": "<log_watcher_image>",
"ddcr": "<ddcr_image>",
"ddcr_lib": "<ddcr_lib_image>",
"ddcr_fault": "<ddcr_fault_image>",
}])
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/chaos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := chaos.NewImageRegistry(ctx, "example", &chaos.ImageRegistryArgs{
OrgId: pulumi.String("<org_id>"),
ProjectId: pulumi.String("<project_id>"),
RegistryServer: pulumi.String("<registry_server>"),
RegistryAccount: pulumi.String("<registry_account>"),
IsPrivate: pulumi.Bool(true),
SecretName: pulumi.String("<secret_name>"),
IsDefault: pulumi.Bool(false),
IsOverrideAllowed: pulumi.Bool(true),
UseCustomImages: pulumi.Bool(true),
CustomImages: chaos.ImageRegistryCustomImageArray{
&chaos.ImageRegistryCustomImageArgs{
LogWatcher: pulumi.String("<log_watcher_image>"),
Ddcr: pulumi.String("<ddcr_image>"),
DdcrLib: pulumi.String("<ddcr_lib_image>"),
DdcrFault: pulumi.String("<ddcr_fault_image>"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var example = new Harness.Chaos.ImageRegistry("example", new()
{
OrgId = "<org_id>",
ProjectId = "<project_id>",
RegistryServer = "<registry_server>",
RegistryAccount = "<registry_account>",
IsPrivate = true,
SecretName = "<secret_name>",
IsDefault = false,
IsOverrideAllowed = true,
UseCustomImages = true,
CustomImages = new[]
{
new Harness.Chaos.Inputs.ImageRegistryCustomImageArgs
{
LogWatcher = "<log_watcher_image>",
Ddcr = "<ddcr_image>",
DdcrLib = "<ddcr_lib_image>",
DdcrFault = "<ddcr_fault_image>",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.chaos.ImageRegistry;
import com.pulumi.harness.chaos.ImageRegistryArgs;
import com.pulumi.harness.chaos.inputs.ImageRegistryCustomImageArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ImageRegistry("example", ImageRegistryArgs.builder()
.orgId("<org_id>")
.projectId("<project_id>")
.registryServer("<registry_server>")
.registryAccount("<registry_account>")
.isPrivate(true)
.secretName("<secret_name>")
.isDefault(false)
.isOverrideAllowed(true)
.useCustomImages(true)
.customImages(ImageRegistryCustomImageArgs.builder()
.logWatcher("<log_watcher_image>")
.ddcr("<ddcr_image>")
.ddcrLib("<ddcr_lib_image>")
.ddcrFault("<ddcr_fault_image>")
.build())
.build());
}
}
resources:
example:
type: harness:chaos:ImageRegistry
properties:
orgId: <org_id>
projectId: <project_id>
registryServer: <registry_server>
registryAccount: <registry_account>
isPrivate: true
secretName: <secret_name>
isDefault: false
isOverrideAllowed: true
useCustomImages: true # Custom images configuration
customImages:
- logWatcher: <log_watcher_image>
ddcr: <ddcr_image>
ddcrLib: <ddcr_lib_image>
ddcrFault: <ddcr_fault_image>
Create ImageRegistry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ImageRegistry(name: string, args: ImageRegistryArgs, opts?: CustomResourceOptions);
@overload
def ImageRegistry(resource_name: str,
args: ImageRegistryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ImageRegistry(resource_name: str,
opts: Optional[ResourceOptions] = None,
is_private: Optional[bool] = None,
registry_account: Optional[str] = None,
registry_server: Optional[str] = None,
custom_images: Optional[Sequence[ImageRegistryCustomImageArgs]] = None,
infra_id: Optional[str] = None,
is_default: Optional[bool] = None,
is_override_allowed: Optional[bool] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
secret_name: Optional[str] = None,
use_custom_images: Optional[bool] = None)
func NewImageRegistry(ctx *Context, name string, args ImageRegistryArgs, opts ...ResourceOption) (*ImageRegistry, error)
public ImageRegistry(string name, ImageRegistryArgs args, CustomResourceOptions? opts = null)
public ImageRegistry(String name, ImageRegistryArgs args)
public ImageRegistry(String name, ImageRegistryArgs args, CustomResourceOptions options)
type: harness:chaos:ImageRegistry
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ImageRegistryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ImageRegistryArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ImageRegistryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageRegistryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImageRegistryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var imageRegistryResource = new Harness.Chaos.ImageRegistry("imageRegistryResource", new()
{
IsPrivate = false,
RegistryAccount = "string",
RegistryServer = "string",
CustomImages = new[]
{
new Harness.Chaos.Inputs.ImageRegistryCustomImageArgs
{
Ddcr = "string",
DdcrFault = "string",
DdcrLib = "string",
LogWatcher = "string",
},
},
InfraId = "string",
IsDefault = false,
IsOverrideAllowed = false,
OrgId = "string",
ProjectId = "string",
SecretName = "string",
UseCustomImages = false,
});
example, err := chaos.NewImageRegistry(ctx, "imageRegistryResource", &chaos.ImageRegistryArgs{
IsPrivate: pulumi.Bool(false),
RegistryAccount: pulumi.String("string"),
RegistryServer: pulumi.String("string"),
CustomImages: chaos.ImageRegistryCustomImageArray{
&chaos.ImageRegistryCustomImageArgs{
Ddcr: pulumi.String("string"),
DdcrFault: pulumi.String("string"),
DdcrLib: pulumi.String("string"),
LogWatcher: pulumi.String("string"),
},
},
InfraId: pulumi.String("string"),
IsDefault: pulumi.Bool(false),
IsOverrideAllowed: pulumi.Bool(false),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
SecretName: pulumi.String("string"),
UseCustomImages: pulumi.Bool(false),
})
var imageRegistryResource = new ImageRegistry("imageRegistryResource", ImageRegistryArgs.builder()
.isPrivate(false)
.registryAccount("string")
.registryServer("string")
.customImages(ImageRegistryCustomImageArgs.builder()
.ddcr("string")
.ddcrFault("string")
.ddcrLib("string")
.logWatcher("string")
.build())
.infraId("string")
.isDefault(false)
.isOverrideAllowed(false)
.orgId("string")
.projectId("string")
.secretName("string")
.useCustomImages(false)
.build());
image_registry_resource = harness.chaos.ImageRegistry("imageRegistryResource",
is_private=False,
registry_account="string",
registry_server="string",
custom_images=[{
"ddcr": "string",
"ddcr_fault": "string",
"ddcr_lib": "string",
"log_watcher": "string",
}],
infra_id="string",
is_default=False,
is_override_allowed=False,
org_id="string",
project_id="string",
secret_name="string",
use_custom_images=False)
const imageRegistryResource = new harness.chaos.ImageRegistry("imageRegistryResource", {
isPrivate: false,
registryAccount: "string",
registryServer: "string",
customImages: [{
ddcr: "string",
ddcrFault: "string",
ddcrLib: "string",
logWatcher: "string",
}],
infraId: "string",
isDefault: false,
isOverrideAllowed: false,
orgId: "string",
projectId: "string",
secretName: "string",
useCustomImages: false,
});
type: harness:chaos:ImageRegistry
properties:
customImages:
- ddcr: string
ddcrFault: string
ddcrLib: string
logWatcher: string
infraId: string
isDefault: false
isOverrideAllowed: false
isPrivate: false
orgId: string
projectId: string
registryAccount: string
registryServer: string
secretName: string
useCustomImages: false
ImageRegistry Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ImageRegistry resource accepts the following input properties:
- Is
Private bool - Whether the registry is private
- Registry
Account string - The registry account name
- Registry
Server string - The registry server URL
- Custom
Images List<ImageRegistry Custom Image> - Custom images configuration
- Infra
Id string - The infrastructure ID to set up the image registry
- Is
Default bool - Whether this is the default registry
- Is
Override boolAllowed - Whether override is allowed for this registry
- Org
Id string - The organization ID of the image registry
- Project
Id string - The project ID of the image registry
- Secret
Name string - The name of the secret for authentication
- Use
Custom boolImages - Whether to use custom images
- Is
Private bool - Whether the registry is private
- Registry
Account string - The registry account name
- Registry
Server string - The registry server URL
- Custom
Images []ImageRegistry Custom Image Args - Custom images configuration
- Infra
Id string - The infrastructure ID to set up the image registry
- Is
Default bool - Whether this is the default registry
- Is
Override boolAllowed - Whether override is allowed for this registry
- Org
Id string - The organization ID of the image registry
- Project
Id string - The project ID of the image registry
- Secret
Name string - The name of the secret for authentication
- Use
Custom boolImages - Whether to use custom images
- is
Private Boolean - Whether the registry is private
- registry
Account String - The registry account name
- registry
Server String - The registry server URL
- custom
Images List<ImageRegistry Custom Image> - Custom images configuration
- infra
Id String - The infrastructure ID to set up the image registry
- is
Default Boolean - Whether this is the default registry
- is
Override BooleanAllowed - Whether override is allowed for this registry
- org
Id String - The organization ID of the image registry
- project
Id String - The project ID of the image registry
- secret
Name String - The name of the secret for authentication
- use
Custom BooleanImages - Whether to use custom images
- is
Private boolean - Whether the registry is private
- registry
Account string - The registry account name
- registry
Server string - The registry server URL
- custom
Images ImageRegistry Custom Image[] - Custom images configuration
- infra
Id string - The infrastructure ID to set up the image registry
- is
Default boolean - Whether this is the default registry
- is
Override booleanAllowed - Whether override is allowed for this registry
- org
Id string - The organization ID of the image registry
- project
Id string - The project ID of the image registry
- secret
Name string - The name of the secret for authentication
- use
Custom booleanImages - Whether to use custom images
- is_
private bool - Whether the registry is private
- registry_
account str - The registry account name
- registry_
server str - The registry server URL
- custom_
images Sequence[ImageRegistry Custom Image Args] - Custom images configuration
- infra_
id str - The infrastructure ID to set up the image registry
- is_
default bool - Whether this is the default registry
- is_
override_ boolallowed - Whether override is allowed for this registry
- org_
id str - The organization ID of the image registry
- project_
id str - The project ID of the image registry
- secret_
name str - The name of the secret for authentication
- use_
custom_ boolimages - Whether to use custom images
- is
Private Boolean - Whether the registry is private
- registry
Account String - The registry account name
- registry
Server String - The registry server URL
- custom
Images List<Property Map> - Custom images configuration
- infra
Id String - The infrastructure ID to set up the image registry
- is
Default Boolean - Whether this is the default registry
- is
Override BooleanAllowed - Whether override is allowed for this registry
- org
Id String - The organization ID of the image registry
- project
Id String - The project ID of the image registry
- secret
Name String - The name of the secret for authentication
- use
Custom BooleanImages - Whether to use custom images
Outputs
All input properties are implicitly available as output properties. Additionally, the ImageRegistry resource produces the following output properties:
- created_
at str - Creation timestamp
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - Last update timestamp
Look up Existing ImageRegistry Resource
Get an existing ImageRegistry resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ImageRegistryState, opts?: CustomResourceOptions): ImageRegistry
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
custom_images: Optional[Sequence[ImageRegistryCustomImageArgs]] = None,
infra_id: Optional[str] = None,
is_default: Optional[bool] = None,
is_override_allowed: Optional[bool] = None,
is_private: Optional[bool] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
registry_account: Optional[str] = None,
registry_server: Optional[str] = None,
secret_name: Optional[str] = None,
updated_at: Optional[str] = None,
use_custom_images: Optional[bool] = None) -> ImageRegistry
func GetImageRegistry(ctx *Context, name string, id IDInput, state *ImageRegistryState, opts ...ResourceOption) (*ImageRegistry, error)
public static ImageRegistry Get(string name, Input<string> id, ImageRegistryState? state, CustomResourceOptions? opts = null)
public static ImageRegistry get(String name, Output<String> id, ImageRegistryState state, CustomResourceOptions options)
resources: _: type: harness:chaos:ImageRegistry get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - Creation timestamp
- Custom
Images List<ImageRegistry Custom Image> - Custom images configuration
- Infra
Id string - The infrastructure ID to set up the image registry
- Is
Default bool - Whether this is the default registry
- Is
Override boolAllowed - Whether override is allowed for this registry
- Is
Private bool - Whether the registry is private
- Org
Id string - The organization ID of the image registry
- Project
Id string - The project ID of the image registry
- Registry
Account string - The registry account name
- Registry
Server string - The registry server URL
- Secret
Name string - The name of the secret for authentication
- Updated
At string - Last update timestamp
- Use
Custom boolImages - Whether to use custom images
- Created
At string - Creation timestamp
- Custom
Images []ImageRegistry Custom Image Args - Custom images configuration
- Infra
Id string - The infrastructure ID to set up the image registry
- Is
Default bool - Whether this is the default registry
- Is
Override boolAllowed - Whether override is allowed for this registry
- Is
Private bool - Whether the registry is private
- Org
Id string - The organization ID of the image registry
- Project
Id string - The project ID of the image registry
- Registry
Account string - The registry account name
- Registry
Server string - The registry server URL
- Secret
Name string - The name of the secret for authentication
- Updated
At string - Last update timestamp
- Use
Custom boolImages - Whether to use custom images
- created
At String - Creation timestamp
- custom
Images List<ImageRegistry Custom Image> - Custom images configuration
- infra
Id String - The infrastructure ID to set up the image registry
- is
Default Boolean - Whether this is the default registry
- is
Override BooleanAllowed - Whether override is allowed for this registry
- is
Private Boolean - Whether the registry is private
- org
Id String - The organization ID of the image registry
- project
Id String - The project ID of the image registry
- registry
Account String - The registry account name
- registry
Server String - The registry server URL
- secret
Name String - The name of the secret for authentication
- updated
At String - Last update timestamp
- use
Custom BooleanImages - Whether to use custom images
- created
At string - Creation timestamp
- custom
Images ImageRegistry Custom Image[] - Custom images configuration
- infra
Id string - The infrastructure ID to set up the image registry
- is
Default boolean - Whether this is the default registry
- is
Override booleanAllowed - Whether override is allowed for this registry
- is
Private boolean - Whether the registry is private
- org
Id string - The organization ID of the image registry
- project
Id string - The project ID of the image registry
- registry
Account string - The registry account name
- registry
Server string - The registry server URL
- secret
Name string - The name of the secret for authentication
- updated
At string - Last update timestamp
- use
Custom booleanImages - Whether to use custom images
- created_
at str - Creation timestamp
- custom_
images Sequence[ImageRegistry Custom Image Args] - Custom images configuration
- infra_
id str - The infrastructure ID to set up the image registry
- is_
default bool - Whether this is the default registry
- is_
override_ boolallowed - Whether override is allowed for this registry
- is_
private bool - Whether the registry is private
- org_
id str - The organization ID of the image registry
- project_
id str - The project ID of the image registry
- registry_
account str - The registry account name
- registry_
server str - The registry server URL
- secret_
name str - The name of the secret for authentication
- updated_
at str - Last update timestamp
- use_
custom_ boolimages - Whether to use custom images
- created
At String - Creation timestamp
- custom
Images List<Property Map> - Custom images configuration
- infra
Id String - The infrastructure ID to set up the image registry
- is
Default Boolean - Whether this is the default registry
- is
Override BooleanAllowed - Whether override is allowed for this registry
- is
Private Boolean - Whether the registry is private
- org
Id String - The organization ID of the image registry
- project
Id String - The project ID of the image registry
- registry
Account String - The registry account name
- registry
Server String - The registry server URL
- secret
Name String - The name of the secret for authentication
- updated
At String - Last update timestamp
- use
Custom BooleanImages - Whether to use custom images
Supporting Types
ImageRegistryCustomImage, ImageRegistryCustomImageArgs
- Ddcr string
- Ddcr
Fault string - Ddcr
Lib string - Log
Watcher string
- Ddcr string
- Ddcr
Fault string - Ddcr
Lib string - Log
Watcher string
- ddcr String
- ddcr
Fault String - ddcr
Lib String - log
Watcher String
- ddcr string
- ddcr
Fault string - ddcr
Lib string - log
Watcher string
- ddcr str
- ddcr_
fault str - ddcr_
lib str - log_
watcher str
- ddcr String
- ddcr
Fault String - ddcr
Lib String - log
Watcher String
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.