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

rancher2.ConfigMapV2

Explore with Pulumi AI

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

    Provides a Rancher ConfigMap v2 resource. This can be used to create k8s configMaps for Rancher v2 environments and retrieve their information. ConfigMap v2 resource is available at Rancher v2.5.x and above.

    Create ConfigMapV2 Resource

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

    Constructor syntax

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

    Example

    The following reference example uses placeholder values for all input properties.

    var configMapV2Resource = new Rancher2.ConfigMapV2("configMapV2Resource", new()
    {
        ClusterId = "string",
        Data = 
        {
            { "string", "any" },
        },
        Annotations = 
        {
            { "string", "any" },
        },
        Immutable = false,
        Labels = 
        {
            { "string", "any" },
        },
        Name = "string",
        Namespace = "string",
    });
    
    example, err := rancher2.NewConfigMapV2(ctx, "configMapV2Resource", &rancher2.ConfigMapV2Args{
    	ClusterId: pulumi.String("string"),
    	Data: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Annotations: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Immutable: pulumi.Bool(false),
    	Labels: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Name:      pulumi.String("string"),
    	Namespace: pulumi.String("string"),
    })
    
    var configMapV2Resource = new ConfigMapV2("configMapV2Resource", ConfigMapV2Args.builder()        
        .clusterId("string")
        .data(Map.of("string", "any"))
        .annotations(Map.of("string", "any"))
        .immutable(false)
        .labels(Map.of("string", "any"))
        .name("string")
        .namespace("string")
        .build());
    
    config_map_v2_resource = rancher2.ConfigMapV2("configMapV2Resource",
        cluster_id="string",
        data={
            "string": "any",
        },
        annotations={
            "string": "any",
        },
        immutable=False,
        labels={
            "string": "any",
        },
        name="string",
        namespace="string")
    
    const configMapV2Resource = new rancher2.ConfigMapV2("configMapV2Resource", {
        clusterId: "string",
        data: {
            string: "any",
        },
        annotations: {
            string: "any",
        },
        immutable: false,
        labels: {
            string: "any",
        },
        name: "string",
        namespace: "string",
    });
    
    type: rancher2:ConfigMapV2
    properties:
        annotations:
            string: any
        clusterId: string
        data:
            string: any
        immutable: false
        labels:
            string: any
        name: string
        namespace: string
    

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

    ClusterId string
    The cluster id of the configMap V2 (string)
    Data Dictionary<string, object>
    The data of the configMap v2 (map)
    Annotations Dictionary<string, object>
    Annotations for the configMap v2 (map)
    Immutable bool
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    Labels Dictionary<string, object>
    Labels for the configMap v2 (map)
    Name string
    The name of the configMap v2 (string)
    Namespace string
    The namespaces of the configMap v2. Default: default (string)
    ClusterId string
    The cluster id of the configMap V2 (string)
    Data map[string]interface{}
    The data of the configMap v2 (map)
    Annotations map[string]interface{}
    Annotations for the configMap v2 (map)
    Immutable bool
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    Labels map[string]interface{}
    Labels for the configMap v2 (map)
    Name string
    The name of the configMap v2 (string)
    Namespace string
    The namespaces of the configMap v2. Default: default (string)
    clusterId String
    The cluster id of the configMap V2 (string)
    data Map<String,Object>
    The data of the configMap v2 (map)
    annotations Map<String,Object>
    Annotations for the configMap v2 (map)
    immutable Boolean
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    labels Map<String,Object>
    Labels for the configMap v2 (map)
    name String
    The name of the configMap v2 (string)
    namespace String
    The namespaces of the configMap v2. Default: default (string)
    clusterId string
    The cluster id of the configMap V2 (string)
    data {[key: string]: any}
    The data of the configMap v2 (map)
    annotations {[key: string]: any}
    Annotations for the configMap v2 (map)
    immutable boolean
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    labels {[key: string]: any}
    Labels for the configMap v2 (map)
    name string
    The name of the configMap v2 (string)
    namespace string
    The namespaces of the configMap v2. Default: default (string)
    cluster_id str
    The cluster id of the configMap V2 (string)
    data Mapping[str, Any]
    The data of the configMap v2 (map)
    annotations Mapping[str, Any]
    Annotations for the configMap v2 (map)
    immutable bool
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    labels Mapping[str, Any]
    Labels for the configMap v2 (map)
    name str
    The name of the configMap v2 (string)
    namespace str
    The namespaces of the configMap v2. Default: default (string)
    clusterId String
    The cluster id of the configMap V2 (string)
    data Map<Any>
    The data of the configMap v2 (map)
    annotations Map<Any>
    Annotations for the configMap v2 (map)
    immutable Boolean
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    labels Map<Any>
    Labels for the configMap v2 (map)
    name String
    The name of the configMap v2 (string)
    namespace String
    The namespaces of the configMap v2. Default: default (string)

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceVersion string
    (Computed) The k8s resource version (string)
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceVersion string
    (Computed) The k8s resource version (string)
    id String
    The provider-assigned unique ID for this managed resource.
    resourceVersion String
    (Computed) The k8s resource version (string)
    id string
    The provider-assigned unique ID for this managed resource.
    resourceVersion string
    (Computed) The k8s resource version (string)
    id str
    The provider-assigned unique ID for this managed resource.
    resource_version str
    (Computed) The k8s resource version (string)
    id String
    The provider-assigned unique ID for this managed resource.
    resourceVersion String
    (Computed) The k8s resource version (string)

    Look up Existing ConfigMapV2 Resource

    Get an existing ConfigMapV2 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?: ConfigMapV2State, opts?: CustomResourceOptions): ConfigMapV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            annotations: Optional[Mapping[str, Any]] = None,
            cluster_id: Optional[str] = None,
            data: Optional[Mapping[str, Any]] = None,
            immutable: Optional[bool] = None,
            labels: Optional[Mapping[str, Any]] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            resource_version: Optional[str] = None) -> ConfigMapV2
    func GetConfigMapV2(ctx *Context, name string, id IDInput, state *ConfigMapV2State, opts ...ResourceOption) (*ConfigMapV2, error)
    public static ConfigMapV2 Get(string name, Input<string> id, ConfigMapV2State? state, CustomResourceOptions? opts = null)
    public static ConfigMapV2 get(String name, Output<String> id, ConfigMapV2State 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 the configMap v2 (map)
    ClusterId string
    The cluster id of the configMap V2 (string)
    Data Dictionary<string, object>
    The data of the configMap v2 (map)
    Immutable bool
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    Labels Dictionary<string, object>
    Labels for the configMap v2 (map)
    Name string
    The name of the configMap v2 (string)
    Namespace string
    The namespaces of the configMap v2. Default: default (string)
    ResourceVersion string
    (Computed) The k8s resource version (string)
    Annotations map[string]interface{}
    Annotations for the configMap v2 (map)
    ClusterId string
    The cluster id of the configMap V2 (string)
    Data map[string]interface{}
    The data of the configMap v2 (map)
    Immutable bool
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    Labels map[string]interface{}
    Labels for the configMap v2 (map)
    Name string
    The name of the configMap v2 (string)
    Namespace string
    The namespaces of the configMap v2. Default: default (string)
    ResourceVersion string
    (Computed) The k8s resource version (string)
    annotations Map<String,Object>
    Annotations for the configMap v2 (map)
    clusterId String
    The cluster id of the configMap V2 (string)
    data Map<String,Object>
    The data of the configMap v2 (map)
    immutable Boolean
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    labels Map<String,Object>
    Labels for the configMap v2 (map)
    name String
    The name of the configMap v2 (string)
    namespace String
    The namespaces of the configMap v2. Default: default (string)
    resourceVersion String
    (Computed) The k8s resource version (string)
    annotations {[key: string]: any}
    Annotations for the configMap v2 (map)
    clusterId string
    The cluster id of the configMap V2 (string)
    data {[key: string]: any}
    The data of the configMap v2 (map)
    immutable boolean
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    labels {[key: string]: any}
    Labels for the configMap v2 (map)
    name string
    The name of the configMap v2 (string)
    namespace string
    The namespaces of the configMap v2. Default: default (string)
    resourceVersion string
    (Computed) The k8s resource version (string)
    annotations Mapping[str, Any]
    Annotations for the configMap v2 (map)
    cluster_id str
    The cluster id of the configMap V2 (string)
    data Mapping[str, Any]
    The data of the configMap v2 (map)
    immutable bool
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    labels Mapping[str, Any]
    Labels for the configMap v2 (map)
    name str
    The name of the configMap v2 (string)
    namespace str
    The namespaces of the configMap v2. Default: default (string)
    resource_version str
    (Computed) The k8s resource version (string)
    annotations Map<Any>
    Annotations for the configMap v2 (map)
    clusterId String
    The cluster id of the configMap V2 (string)
    data Map<Any>
    The data of the configMap v2 (map)
    immutable Boolean
    If set to true, any configMap update will remove and recreate the configMap. This is a beta field enabled by k8s ImmutableEphemeralVolumes feature gate. Default: false (bool)
    labels Map<Any>
    Labels for the configMap v2 (map)
    name String
    The name of the configMap v2 (string)
    namespace String
    The namespaces of the configMap v2. Default: default (string)
    resourceVersion String
    (Computed) The k8s resource version (string)

    Import

    V2 configMaps can be imported using the Rancher cluster ID, ConfigMap V2 namespace and name.

    $ pulumi import rancher2:index/configMapV2:ConfigMapV2 foo &lt;CLUSTER_ID&gt;.&lt;SECRET_V2_NAMESPACE&gt;/&lt;SECRET_V2_NAME&gt;
    

    To learn more about importing existing cloud resources, see Importing resources.

    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