1. Packages
  2. Harness Provider
  3. API Docs
  4. service
  5. DiscoverySetting
Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi

harness.service.DiscoverySetting

Explore with Pulumi AI

harness logo
Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi

    Resource for managing service discovery settings.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    // Update image registry settings for service discovery
    const example = new harness.service.DiscoverySetting("example", {
        orgIdentifier: "sechaosworkshop",
        projectIdentifier: "se1",
        imageRegistry: {
            account: "<account_name>",
            server: "<registry_server>",
            secrets: ["<secret_name>"],
        },
    });
    
    import pulumi
    import pulumi_harness as harness
    
    # Update image registry settings for service discovery
    example = harness.service.DiscoverySetting("example",
        org_identifier="sechaosworkshop",
        project_identifier="se1",
        image_registry={
            "account": "<account_name>",
            "server": "<registry_server>",
            "secrets": ["<secret_name>"],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/service"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Update image registry settings for service discovery
    		_, err := service.NewDiscoverySetting(ctx, "example", &service.DiscoverySettingArgs{
    			OrgIdentifier:     pulumi.String("sechaosworkshop"),
    			ProjectIdentifier: pulumi.String("se1"),
    			ImageRegistry: &service.DiscoverySettingImageRegistryArgs{
    				Account: pulumi.String("<account_name>"),
    				Server:  pulumi.String("<registry_server>"),
    				Secrets: pulumi.StringArray{
    					pulumi.String("<secret_name>"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        // Update image registry settings for service discovery
        var example = new Harness.Service.DiscoverySetting("example", new()
        {
            OrgIdentifier = "sechaosworkshop",
            ProjectIdentifier = "se1",
            ImageRegistry = new Harness.Service.Inputs.DiscoverySettingImageRegistryArgs
            {
                Account = "<account_name>",
                Server = "<registry_server>",
                Secrets = new[]
                {
                    "<secret_name>",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.service.DiscoverySetting;
    import com.pulumi.harness.service.DiscoverySettingArgs;
    import com.pulumi.harness.service.inputs.DiscoverySettingImageRegistryArgs;
    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) {
            // Update image registry settings for service discovery
            var example = new DiscoverySetting("example", DiscoverySettingArgs.builder()
                .orgIdentifier("sechaosworkshop")
                .projectIdentifier("se1")
                .imageRegistry(DiscoverySettingImageRegistryArgs.builder()
                    .account("<account_name>")
                    .server("<registry_server>")
                    .secrets("<secret_name>")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Update image registry settings for service discovery
      example:
        type: harness:service:DiscoverySetting
        properties:
          orgIdentifier: sechaosworkshop
          projectIdentifier: se1
          imageRegistry:
            account: <account_name>
            server: <registry_server>
            secrets:
              - <secret_name>
    

    Create DiscoverySetting Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DiscoverySetting(name: string, args?: DiscoverySettingArgs, opts?: CustomResourceOptions);
    @overload
    def DiscoverySetting(resource_name: str,
                         args: Optional[DiscoverySettingArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DiscoverySetting(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         correlation_id: Optional[str] = None,
                         image_registry: Optional[DiscoverySettingImageRegistryArgs] = None,
                         org_identifier: Optional[str] = None,
                         project_identifier: Optional[str] = None)
    func NewDiscoverySetting(ctx *Context, name string, args *DiscoverySettingArgs, opts ...ResourceOption) (*DiscoverySetting, error)
    public DiscoverySetting(string name, DiscoverySettingArgs? args = null, CustomResourceOptions? opts = null)
    public DiscoverySetting(String name, DiscoverySettingArgs args)
    public DiscoverySetting(String name, DiscoverySettingArgs args, CustomResourceOptions options)
    
    type: harness:service:DiscoverySetting
    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 DiscoverySettingArgs
    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 DiscoverySettingArgs
    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 DiscoverySettingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DiscoverySettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DiscoverySettingArgs
    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 discoverySettingResource = new Harness.Service.DiscoverySetting("discoverySettingResource", new()
    {
        CorrelationId = "string",
        ImageRegistry = new Harness.Service.Inputs.DiscoverySettingImageRegistryArgs
        {
            Account = "string",
            Server = "string",
            Secrets = new[]
            {
                "string",
            },
        },
        OrgIdentifier = "string",
        ProjectIdentifier = "string",
    });
    
    example, err := service.NewDiscoverySetting(ctx, "discoverySettingResource", &service.DiscoverySettingArgs{
    	CorrelationId: pulumi.String("string"),
    	ImageRegistry: &service.DiscoverySettingImageRegistryArgs{
    		Account: pulumi.String("string"),
    		Server:  pulumi.String("string"),
    		Secrets: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	OrgIdentifier:     pulumi.String("string"),
    	ProjectIdentifier: pulumi.String("string"),
    })
    
    var discoverySettingResource = new DiscoverySetting("discoverySettingResource", DiscoverySettingArgs.builder()
        .correlationId("string")
        .imageRegistry(DiscoverySettingImageRegistryArgs.builder()
            .account("string")
            .server("string")
            .secrets("string")
            .build())
        .orgIdentifier("string")
        .projectIdentifier("string")
        .build());
    
    discovery_setting_resource = harness.service.DiscoverySetting("discoverySettingResource",
        correlation_id="string",
        image_registry={
            "account": "string",
            "server": "string",
            "secrets": ["string"],
        },
        org_identifier="string",
        project_identifier="string")
    
    const discoverySettingResource = new harness.service.DiscoverySetting("discoverySettingResource", {
        correlationId: "string",
        imageRegistry: {
            account: "string",
            server: "string",
            secrets: ["string"],
        },
        orgIdentifier: "string",
        projectIdentifier: "string",
    });
    
    type: harness:service:DiscoverySetting
    properties:
        correlationId: string
        imageRegistry:
            account: string
            secrets:
                - string
            server: string
        orgIdentifier: string
        projectIdentifier: string
    

    DiscoverySetting 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 DiscoverySetting resource accepts the following input properties:

    CorrelationId string
    Correlation ID for the request.
    ImageRegistry DiscoverySettingImageRegistry
    Image registry configuration.
    OrgIdentifier string
    The organization identifier.
    ProjectIdentifier string
    The project identifier.
    CorrelationId string
    Correlation ID for the request.
    ImageRegistry DiscoverySettingImageRegistryArgs
    Image registry configuration.
    OrgIdentifier string
    The organization identifier.
    ProjectIdentifier string
    The project identifier.
    correlationId String
    Correlation ID for the request.
    imageRegistry DiscoverySettingImageRegistry
    Image registry configuration.
    orgIdentifier String
    The organization identifier.
    projectIdentifier String
    The project identifier.
    correlationId string
    Correlation ID for the request.
    imageRegistry DiscoverySettingImageRegistry
    Image registry configuration.
    orgIdentifier string
    The organization identifier.
    projectIdentifier string
    The project identifier.
    correlation_id str
    Correlation ID for the request.
    image_registry DiscoverySettingImageRegistryArgs
    Image registry configuration.
    org_identifier str
    The organization identifier.
    project_identifier str
    The project identifier.
    correlationId String
    Correlation ID for the request.
    imageRegistry Property Map
    Image registry configuration.
    orgIdentifier String
    The organization identifier.
    projectIdentifier String
    The project identifier.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DiscoverySetting resource produces the following output properties:

    CreatedAt string
    Timestamp when the setting was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    Timestamp when the setting was last updated.
    CreatedAt string
    Timestamp when the setting was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    Timestamp when the setting was last updated.
    createdAt String
    Timestamp when the setting was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    Timestamp when the setting was last updated.
    createdAt string
    Timestamp when the setting was created.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    Timestamp when the setting was last updated.
    created_at str
    Timestamp when the setting was created.
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    Timestamp when the setting was last updated.
    createdAt String
    Timestamp when the setting was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    Timestamp when the setting was last updated.

    Look up Existing DiscoverySetting Resource

    Get an existing DiscoverySetting 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?: DiscoverySettingState, opts?: CustomResourceOptions): DiscoverySetting
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            correlation_id: Optional[str] = None,
            created_at: Optional[str] = None,
            image_registry: Optional[DiscoverySettingImageRegistryArgs] = None,
            org_identifier: Optional[str] = None,
            project_identifier: Optional[str] = None,
            updated_at: Optional[str] = None) -> DiscoverySetting
    func GetDiscoverySetting(ctx *Context, name string, id IDInput, state *DiscoverySettingState, opts ...ResourceOption) (*DiscoverySetting, error)
    public static DiscoverySetting Get(string name, Input<string> id, DiscoverySettingState? state, CustomResourceOptions? opts = null)
    public static DiscoverySetting get(String name, Output<String> id, DiscoverySettingState state, CustomResourceOptions options)
    resources:  _:    type: harness:service:DiscoverySetting    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.
    The following state arguments are supported:
    CorrelationId string
    Correlation ID for the request.
    CreatedAt string
    Timestamp when the setting was created.
    ImageRegistry DiscoverySettingImageRegistry
    Image registry configuration.
    OrgIdentifier string
    The organization identifier.
    ProjectIdentifier string
    The project identifier.
    UpdatedAt string
    Timestamp when the setting was last updated.
    CorrelationId string
    Correlation ID for the request.
    CreatedAt string
    Timestamp when the setting was created.
    ImageRegistry DiscoverySettingImageRegistryArgs
    Image registry configuration.
    OrgIdentifier string
    The organization identifier.
    ProjectIdentifier string
    The project identifier.
    UpdatedAt string
    Timestamp when the setting was last updated.
    correlationId String
    Correlation ID for the request.
    createdAt String
    Timestamp when the setting was created.
    imageRegistry DiscoverySettingImageRegistry
    Image registry configuration.
    orgIdentifier String
    The organization identifier.
    projectIdentifier String
    The project identifier.
    updatedAt String
    Timestamp when the setting was last updated.
    correlationId string
    Correlation ID for the request.
    createdAt string
    Timestamp when the setting was created.
    imageRegistry DiscoverySettingImageRegistry
    Image registry configuration.
    orgIdentifier string
    The organization identifier.
    projectIdentifier string
    The project identifier.
    updatedAt string
    Timestamp when the setting was last updated.
    correlation_id str
    Correlation ID for the request.
    created_at str
    Timestamp when the setting was created.
    image_registry DiscoverySettingImageRegistryArgs
    Image registry configuration.
    org_identifier str
    The organization identifier.
    project_identifier str
    The project identifier.
    updated_at str
    Timestamp when the setting was last updated.
    correlationId String
    Correlation ID for the request.
    createdAt String
    Timestamp when the setting was created.
    imageRegistry Property Map
    Image registry configuration.
    orgIdentifier String
    The organization identifier.
    projectIdentifier String
    The project identifier.
    updatedAt String
    Timestamp when the setting was last updated.

    Supporting Types

    DiscoverySettingImageRegistry, DiscoverySettingImageRegistryArgs

    Account string
    The account name for the image registry.
    Server string
    The server URL for the image registry.
    Secrets List<string>
    List of secrets for the image registry.
    Account string
    The account name for the image registry.
    Server string
    The server URL for the image registry.
    Secrets []string
    List of secrets for the image registry.
    account String
    The account name for the image registry.
    server String
    The server URL for the image registry.
    secrets List<String>
    List of secrets for the image registry.
    account string
    The account name for the image registry.
    server string
    The server URL for the image registry.
    secrets string[]
    List of secrets for the image registry.
    account str
    The account name for the image registry.
    server str
    The server URL for the image registry.
    secrets Sequence[str]
    List of secrets for the image registry.
    account String
    The account name for the image registry.
    server String
    The server URL for the image registry.
    secrets List<String>
    List of secrets for the image registry.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi