1. Packages
  2. Rancher2
  3. API Docs
  4. Setting
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

rancher2.Setting

Explore with Pulumi AI

rancher2 logo
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

    Provides a Rancher v2 Setting resource. This can be used to create settings for Rancher v2 environments and retrieve their information.

    On create, if setting already exists, provider will import it and update its value.

    On destroy, if setting is a system setting like server-url, provider’ll not delete it from Rancher, it’ll just update setting value to default and remove it from tfstate.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as rancher2 from "@pulumi/rancher2";
    
    // Create a new rancher2 Setting
    const foo = new rancher2.Setting("foo", {value: "<VALUE>"});
    
    import pulumi
    import pulumi_rancher2 as rancher2
    
    # Create a new rancher2 Setting
    foo = rancher2.Setting("foo", value="<VALUE>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-rancher2/sdk/v6/go/rancher2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a new rancher2 Setting
    		_, err := rancher2.NewSetting(ctx, "foo", &rancher2.SettingArgs{
    			Value: pulumi.String("<VALUE>"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rancher2 = Pulumi.Rancher2;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new rancher2 Setting
        var foo = new Rancher2.Setting("foo", new()
        {
            Value = "<VALUE>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rancher2.Setting;
    import com.pulumi.rancher2.SettingArgs;
    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 foo = new Setting("foo", SettingArgs.builder()        
                .value("<VALUE>")
                .build());
    
        }
    }
    
    resources:
      # Create a new rancher2 Setting
      foo:
        type: rancher2:Setting
        properties:
          value: <VALUE>
    

    Create Setting Resource

    new Setting(name: string, args: SettingArgs, opts?: CustomResourceOptions);
    @overload
    def Setting(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                annotations: Optional[Mapping[str, Any]] = None,
                labels: Optional[Mapping[str, Any]] = None,
                name: Optional[str] = None,
                value: Optional[str] = None)
    @overload
    def Setting(resource_name: str,
                args: SettingArgs,
                opts: Optional[ResourceOptions] = None)
    func NewSetting(ctx *Context, name string, args SettingArgs, opts ...ResourceOption) (*Setting, error)
    public Setting(string name, SettingArgs args, CustomResourceOptions? opts = null)
    public Setting(String name, SettingArgs args)
    public Setting(String name, SettingArgs args, CustomResourceOptions options)
    
    type: rancher2:Setting
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SettingArgs
    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 SettingArgs
    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 SettingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SettingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Setting Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Setting resource accepts the following input properties:

    Value string
    The value of the setting (string)
    Annotations Dictionary<string, object>
    Annotations for setting object (map)
    Labels Dictionary<string, object>
    Labels for setting object (map)
    Name string
    The name of the setting (string)
    Value string
    The value of the setting (string)
    Annotations map[string]interface{}
    Annotations for setting object (map)
    Labels map[string]interface{}
    Labels for setting object (map)
    Name string
    The name of the setting (string)
    value String
    The value of the setting (string)
    annotations Map<String,Object>
    Annotations for setting object (map)
    labels Map<String,Object>
    Labels for setting object (map)
    name String
    The name of the setting (string)
    value string
    The value of the setting (string)
    annotations {[key: string]: any}
    Annotations for setting object (map)
    labels {[key: string]: any}
    Labels for setting object (map)
    name string
    The name of the setting (string)
    value str
    The value of the setting (string)
    annotations Mapping[str, Any]
    Annotations for setting object (map)
    labels Mapping[str, Any]
    Labels for setting object (map)
    name str
    The name of the setting (string)
    value String
    The value of the setting (string)
    annotations Map<Any>
    Annotations for setting object (map)
    labels Map<Any>
    Labels for setting object (map)
    name String
    The name of the setting (string)

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Setting Resource

    Get an existing Setting 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?: SettingState, opts?: CustomResourceOptions): Setting
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            annotations: Optional[Mapping[str, Any]] = None,
            labels: Optional[Mapping[str, Any]] = None,
            name: Optional[str] = None,
            value: Optional[str] = None) -> Setting
    func GetSetting(ctx *Context, name string, id IDInput, state *SettingState, opts ...ResourceOption) (*Setting, error)
    public static Setting Get(string name, Input<string> id, SettingState? state, CustomResourceOptions? opts = null)
    public static Setting get(String name, Output<String> id, SettingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Annotations Dictionary<string, object>
    Annotations for setting object (map)
    Labels Dictionary<string, object>
    Labels for setting object (map)
    Name string
    The name of the setting (string)
    Value string
    The value of the setting (string)
    Annotations map[string]interface{}
    Annotations for setting object (map)
    Labels map[string]interface{}
    Labels for setting object (map)
    Name string
    The name of the setting (string)
    Value string
    The value of the setting (string)
    annotations Map<String,Object>
    Annotations for setting object (map)
    labels Map<String,Object>
    Labels for setting object (map)
    name String
    The name of the setting (string)
    value String
    The value of the setting (string)
    annotations {[key: string]: any}
    Annotations for setting object (map)
    labels {[key: string]: any}
    Labels for setting object (map)
    name string
    The name of the setting (string)
    value string
    The value of the setting (string)
    annotations Mapping[str, Any]
    Annotations for setting object (map)
    labels Mapping[str, Any]
    Labels for setting object (map)
    name str
    The name of the setting (string)
    value str
    The value of the setting (string)
    annotations Map<Any>
    Annotations for setting object (map)
    labels Map<Any>
    Labels for setting object (map)
    name String
    The name of the setting (string)
    value String
    The value of the setting (string)

    Import

    Setting can be imported using the Rancher setting ID.

    $ pulumi import rancher2:index/setting:Setting foo &lt;setting_id&gt;
    

    Package Details

    Repository
    Rancher2 pulumi/pulumi-rancher2
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rancher2 Terraform Provider.
    rancher2 logo
    Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi