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

harness.service.getDiscoverySetting

Explore with Pulumi AI

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

    Data source for retrieving service discovery settings.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    // Data source to fetch service discovery setting by name
    const example = harness.service.getDiscoverySetting({
        orgIdentifier: "<org_identifier>",
        projectIdentifier: "<project_identifier>",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    # Data source to fetch service discovery setting by name
    example = harness.service.get_discovery_setting(org_identifier="<org_identifier>",
        project_identifier="<project_identifier>")
    
    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 {
    		// Data source to fetch service discovery setting by name
    		_, err := service.LookupDiscoverySetting(ctx, &service.LookupDiscoverySettingArgs{
    			OrgIdentifier:     pulumi.StringRef("<org_identifier>"),
    			ProjectIdentifier: pulumi.StringRef("<project_identifier>"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        // Data source to fetch service discovery setting by name
        var example = Harness.Service.GetDiscoverySetting.Invoke(new()
        {
            OrgIdentifier = "<org_identifier>",
            ProjectIdentifier = "<project_identifier>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.service.ServiceFunctions;
    import com.pulumi.harness.service.inputs.GetDiscoverySettingArgs;
    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) {
            // Data source to fetch service discovery setting by name
            final var example = ServiceFunctions.getDiscoverySetting(GetDiscoverySettingArgs.builder()
                .orgIdentifier("<org_identifier>")
                .projectIdentifier("<project_identifier>")
                .build());
    
        }
    }
    
    variables:
      # Data source to fetch service discovery setting by name
      example:
        fn::invoke:
          function: harness:service:getDiscoverySetting
          arguments:
            orgIdentifier: <org_identifier>
            projectIdentifier: <project_identifier>
    

    Using getDiscoverySetting

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDiscoverySetting(args: GetDiscoverySettingArgs, opts?: InvokeOptions): Promise<GetDiscoverySettingResult>
    function getDiscoverySettingOutput(args: GetDiscoverySettingOutputArgs, opts?: InvokeOptions): Output<GetDiscoverySettingResult>
    def get_discovery_setting(correlation_id: Optional[str] = None,
                              org_identifier: Optional[str] = None,
                              project_identifier: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetDiscoverySettingResult
    def get_discovery_setting_output(correlation_id: Optional[pulumi.Input[str]] = None,
                              org_identifier: Optional[pulumi.Input[str]] = None,
                              project_identifier: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetDiscoverySettingResult]
    func LookupDiscoverySetting(ctx *Context, args *LookupDiscoverySettingArgs, opts ...InvokeOption) (*LookupDiscoverySettingResult, error)
    func LookupDiscoverySettingOutput(ctx *Context, args *LookupDiscoverySettingOutputArgs, opts ...InvokeOption) LookupDiscoverySettingResultOutput

    > Note: This function is named LookupDiscoverySetting in the Go SDK.

    public static class GetDiscoverySetting 
    {
        public static Task<GetDiscoverySettingResult> InvokeAsync(GetDiscoverySettingArgs args, InvokeOptions? opts = null)
        public static Output<GetDiscoverySettingResult> Invoke(GetDiscoverySettingInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDiscoverySettingResult> getDiscoverySetting(GetDiscoverySettingArgs args, InvokeOptions options)
    public static Output<GetDiscoverySettingResult> getDiscoverySetting(GetDiscoverySettingArgs args, InvokeOptions options)
    
    fn::invoke:
      function: harness:service/getDiscoverySetting:getDiscoverySetting
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CorrelationId string
    Correlation ID for the request.
    OrgIdentifier string
    The organization identifier.
    ProjectIdentifier string
    The project identifier.
    CorrelationId string
    Correlation ID for the request.
    OrgIdentifier string
    The organization identifier.
    ProjectIdentifier string
    The project identifier.
    correlationId String
    Correlation ID for the request.
    orgIdentifier String
    The organization identifier.
    projectIdentifier String
    The project identifier.
    correlationId string
    Correlation ID for the request.
    orgIdentifier string
    The organization identifier.
    projectIdentifier string
    The project identifier.
    correlation_id str
    Correlation ID for the request.
    org_identifier str
    The organization identifier.
    project_identifier str
    The project identifier.
    correlationId String
    Correlation ID for the request.
    orgIdentifier String
    The organization identifier.
    projectIdentifier String
    The project identifier.

    getDiscoverySetting Result

    The following output properties are available:

    CreatedAt string
    Timestamp when the setting was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageRegistries List<GetDiscoverySettingImageRegistry>
    Image registry configuration.
    UpdatedAt string
    Timestamp when the setting was last updated.
    CorrelationId string
    Correlation ID for the request.
    OrgIdentifier string
    The organization identifier.
    ProjectIdentifier string
    The project identifier.
    CreatedAt string
    Timestamp when the setting was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageRegistries []GetDiscoverySettingImageRegistry
    Image registry configuration.
    UpdatedAt string
    Timestamp when the setting was last updated.
    CorrelationId string
    Correlation ID for the request.
    OrgIdentifier string
    The organization identifier.
    ProjectIdentifier string
    The project identifier.
    createdAt String
    Timestamp when the setting was created.
    id String
    The provider-assigned unique ID for this managed resource.
    imageRegistries List<GetDiscoverySettingImageRegistry>
    Image registry configuration.
    updatedAt String
    Timestamp when the setting was last updated.
    correlationId String
    Correlation ID for the request.
    orgIdentifier String
    The organization identifier.
    projectIdentifier String
    The project identifier.
    createdAt string
    Timestamp when the setting was created.
    id string
    The provider-assigned unique ID for this managed resource.
    imageRegistries GetDiscoverySettingImageRegistry[]
    Image registry configuration.
    updatedAt string
    Timestamp when the setting was last updated.
    correlationId string
    Correlation ID for the request.
    orgIdentifier string
    The organization identifier.
    projectIdentifier string
    The project identifier.
    created_at str
    Timestamp when the setting was created.
    id str
    The provider-assigned unique ID for this managed resource.
    image_registries Sequence[GetDiscoverySettingImageRegistry]
    Image registry configuration.
    updated_at str
    Timestamp when the setting was last updated.
    correlation_id str
    Correlation ID for the request.
    org_identifier str
    The organization identifier.
    project_identifier str
    The project identifier.
    createdAt String
    Timestamp when the setting was created.
    id String
    The provider-assigned unique ID for this managed resource.
    imageRegistries List<Property Map>
    Image registry configuration.
    updatedAt String
    Timestamp when the setting was last updated.
    correlationId String
    Correlation ID for the request.
    orgIdentifier String
    The organization identifier.
    projectIdentifier String
    The project identifier.

    Supporting Types

    GetDiscoverySettingImageRegistry

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