harness.service.DiscoverySetting
Explore with Pulumi AI
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:
- Correlation
Id string - Correlation ID for the request.
- Image
Registry DiscoverySetting Image Registry - Image registry configuration.
- Org
Identifier string - The organization identifier.
- Project
Identifier string - The project identifier.
- Correlation
Id string - Correlation ID for the request.
- Image
Registry DiscoverySetting Image Registry Args - Image registry configuration.
- Org
Identifier string - The organization identifier.
- Project
Identifier string - The project identifier.
- correlation
Id String - Correlation ID for the request.
- image
Registry DiscoverySetting Image Registry - Image registry configuration.
- org
Identifier String - The organization identifier.
- project
Identifier String - The project identifier.
- correlation
Id string - Correlation ID for the request.
- image
Registry DiscoverySetting Image Registry - Image registry configuration.
- org
Identifier string - The organization identifier.
- project
Identifier string - The project identifier.
- correlation_
id str - Correlation ID for the request.
- image_
registry DiscoverySetting Image Registry Args - Image registry configuration.
- org_
identifier str - The organization identifier.
- project_
identifier str - The project identifier.
- correlation
Id String - Correlation ID for the request.
- image
Registry Property Map - Image registry configuration.
- org
Identifier String - The organization identifier.
- project
Identifier String - The project identifier.
Outputs
All input properties are implicitly available as output properties. Additionally, the DiscoverySetting resource produces the following output properties:
- 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.
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.
- Correlation
Id string - Correlation ID for the request.
- Created
At string - Timestamp when the setting was created.
- Image
Registry DiscoverySetting Image Registry - Image registry configuration.
- Org
Identifier string - The organization identifier.
- Project
Identifier string - The project identifier.
- Updated
At string - Timestamp when the setting was last updated.
- Correlation
Id string - Correlation ID for the request.
- Created
At string - Timestamp when the setting was created.
- Image
Registry DiscoverySetting Image Registry Args - Image registry configuration.
- Org
Identifier string - The organization identifier.
- Project
Identifier string - The project identifier.
- Updated
At string - Timestamp when the setting was last updated.
- correlation
Id String - Correlation ID for the request.
- created
At String - Timestamp when the setting was created.
- image
Registry DiscoverySetting Image Registry - Image registry configuration.
- org
Identifier String - The organization identifier.
- project
Identifier String - The project identifier.
- updated
At String - Timestamp when the setting was last updated.
- correlation
Id string - Correlation ID for the request.
- created
At string - Timestamp when the setting was created.
- image
Registry DiscoverySetting Image Registry - Image registry configuration.
- org
Identifier string - The organization identifier.
- project
Identifier string - The project identifier.
- updated
At 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 DiscoverySetting Image Registry Args - 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.
- correlation
Id String - Correlation ID for the request.
- created
At String - Timestamp when the setting was created.
- image
Registry Property Map - Image registry configuration.
- org
Identifier String - The organization identifier.
- project
Identifier String - The project identifier.
- updated
At String - Timestamp when the setting was last updated.
Supporting Types
DiscoverySettingImageRegistry, DiscoverySettingImageRegistryArgs
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.