azure-native.devtestlab.Secret
Explore with Pulumi AI
A secret. Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15.
Other available API versions: 2016-05-15.
Example Usage
Secrets_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var secret = new AzureNative.DevTestLab.Secret("secret", new()
{
LabName = "{labName}",
Name = "{secretName}",
ResourceGroupName = "resourceGroupName",
UserName = "{userName}",
Value = "{secret}",
});
});
package main
import (
devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewSecret(ctx, "secret", &devtestlab.SecretArgs{
LabName: pulumi.String("{labName}"),
Name: pulumi.String("{secretName}"),
ResourceGroupName: pulumi.String("resourceGroupName"),
UserName: pulumi.String("{userName}"),
Value: pulumi.String("{secret}"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.devtestlab.Secret;
import com.pulumi.azurenative.devtestlab.SecretArgs;
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 secret = new Secret("secret", SecretArgs.builder()
.labName("{labName}")
.name("{secretName}")
.resourceGroupName("resourceGroupName")
.userName("{userName}")
.value("{secret}")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
secret = azure_native.devtestlab.Secret("secret",
lab_name="{labName}",
name="{secretName}",
resource_group_name="resourceGroupName",
user_name="{userName}",
value="{secret}")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const secret = new azure_native.devtestlab.Secret("secret", {
labName: "{labName}",
name: "{secretName}",
resourceGroupName: "resourceGroupName",
userName: "{userName}",
value: "{secret}",
});
resources:
secret:
type: azure-native:devtestlab:Secret
properties:
labName: '{labName}'
name: '{secretName}'
resourceGroupName: resourceGroupName
userName: '{userName}'
value: '{secret}'
Create Secret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);
@overload
def Secret(resource_name: str,
args: SecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Secret(resource_name: str,
opts: Optional[ResourceOptions] = None,
lab_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
user_name: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
value: Optional[str] = None)
func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)
public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
public Secret(String name, SecretArgs args)
public Secret(String name, SecretArgs args, CustomResourceOptions options)
type: azure-native:devtestlab:Secret
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 SecretArgs
- 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 SecretArgs
- 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 SecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretArgs
- 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 azure_nativeSecretResource = new AzureNative.DevTestLab.Secret("azure-nativeSecretResource", new()
{
LabName = "string",
ResourceGroupName = "string",
UserName = "string",
Location = "string",
Name = "string",
Tags =
{
{ "string", "string" },
},
Value = "string",
});
example, err := devtestlab.NewSecret(ctx, "azure-nativeSecretResource", &devtestlab.SecretArgs{
LabName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
UserName: pulumi.String("string"),
Location: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Value: pulumi.String("string"),
})
var azure_nativeSecretResource = new Secret("azure-nativeSecretResource", SecretArgs.builder()
.labName("string")
.resourceGroupName("string")
.userName("string")
.location("string")
.name("string")
.tags(Map.of("string", "string"))
.value("string")
.build());
azure_native_secret_resource = azure_native.devtestlab.Secret("azure-nativeSecretResource",
lab_name="string",
resource_group_name="string",
user_name="string",
location="string",
name="string",
tags={
"string": "string",
},
value="string")
const azure_nativeSecretResource = new azure_native.devtestlab.Secret("azure-nativeSecretResource", {
labName: "string",
resourceGroupName: "string",
userName: "string",
location: "string",
name: "string",
tags: {
string: "string",
},
value: "string",
});
type: azure-native:devtestlab:Secret
properties:
labName: string
location: string
name: string
resourceGroupName: string
tags:
string: string
userName: string
value: string
Secret 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 Secret resource accepts the following input properties:
- Lab
Name string - The name of the lab.
- Resource
Group stringName - The name of the resource group.
- User
Name string - The name of the user profile.
- Location string
- The location of the resource.
- Name string
- The name of the secret.
- Dictionary<string, string>
- The tags of the resource.
- Value string
- The value of the secret for secret creation.
- Lab
Name string - The name of the lab.
- Resource
Group stringName - The name of the resource group.
- User
Name string - The name of the user profile.
- Location string
- The location of the resource.
- Name string
- The name of the secret.
- map[string]string
- The tags of the resource.
- Value string
- The value of the secret for secret creation.
- lab
Name String - The name of the lab.
- resource
Group StringName - The name of the resource group.
- user
Name String - The name of the user profile.
- location String
- The location of the resource.
- name String
- The name of the secret.
- Map<String,String>
- The tags of the resource.
- value String
- The value of the secret for secret creation.
- lab
Name string - The name of the lab.
- resource
Group stringName - The name of the resource group.
- user
Name string - The name of the user profile.
- location string
- The location of the resource.
- name string
- The name of the secret.
- {[key: string]: string}
- The tags of the resource.
- value string
- The value of the secret for secret creation.
- lab
Name String - The name of the lab.
- resource
Group StringName - The name of the resource group.
- user
Name String - The name of the user profile.
- location String
- The location of the resource.
- name String
- The name of the secret.
- Map<String>
- The tags of the resource.
- value String
- The value of the secret for secret creation.
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning status of the resource.
- Type string
- The type of the resource.
- Unique
Identifier string - The unique immutable identifier of a resource (Guid).
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning status of the resource.
- Type string
- The type of the resource.
- Unique
Identifier string - The unique immutable identifier of a resource (Guid).
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning status of the resource.
- type String
- The type of the resource.
- unique
Identifier String - The unique immutable identifier of a resource (Guid).
- id string
- The provider-assigned unique ID for this managed resource.
- provisioning
State string - The provisioning status of the resource.
- type string
- The type of the resource.
- unique
Identifier string - The unique immutable identifier of a resource (Guid).
- id str
- The provider-assigned unique ID for this managed resource.
- provisioning_
state str - The provisioning status of the resource.
- type str
- The type of the resource.
- unique_
identifier str - The unique immutable identifier of a resource (Guid).
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning status of the resource.
- type String
- The type of the resource.
- unique
Identifier String - The unique immutable identifier of a resource (Guid).
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:devtestlab:Secret {secretName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0