Secret

class Secret : KotlinCustomResource

Friendly Secret name mapping to the any Secret or secret related information. Uses Azure REST API version 2024-09-01. In version 2.x of the Azure Native provider, it used API version 2023-05-01. Other available API versions: 2023-05-01, 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cdn [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Secrets_Create

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var secret = new AzureNative.Cdn.Secret("secret", new()
{
Parameters = new AzureNative.Cdn.Inputs.CustomerCertificateParametersArgs
{
SecretSource = new AzureNative.Cdn.Inputs.ResourceReferenceArgs
{
Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/secrets/certificatename",
},
SecretVersion = "abcdef1234578900abcdef1234567890",
Type = "CustomerCertificate",
UseLatestVersion = false,
},
ProfileName = "profile1",
ResourceGroupName = "RG",
SecretName = "secret1",
});
});
package main
import (
cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cdn.NewSecret(ctx, "secret", &cdn.SecretArgs{
Parameters: &cdn.CustomerCertificateParametersArgs{
SecretSource: &cdn.ResourceReferenceArgs{
Id: pulumi.String("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/secrets/certificatename"),
},
SecretVersion: pulumi.String("abcdef1234578900abcdef1234567890"),
Type: pulumi.String("CustomerCertificate"),
UseLatestVersion: pulumi.Bool(false),
},
ProfileName: pulumi.String("profile1"),
ResourceGroupName: pulumi.String("RG"),
SecretName: pulumi.String("secret1"),
})
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.cdn.Secret;
import com.pulumi.azurenative.cdn.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()
.parameters(CustomerCertificateParametersArgs.builder()
.secretSource(ResourceReferenceArgs.builder()
.id("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/secrets/certificatename")
.build())
.secretVersion("abcdef1234578900abcdef1234567890")
.type("CustomerCertificate")
.useLatestVersion(false)
.build())
.profileName("profile1")
.resourceGroupName("RG")
.secretName("secret1")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:cdn:Secret secret1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard
val parameters: Output<Any>?

object which contains secret parameters

Link copied to clipboard
val profileName: Output<String>

The name of the profile which holds the secret.

Link copied to clipboard

Provisioning status

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Read only system data

Link copied to clipboard
val type: Output<String>

Resource type.

Link copied to clipboard
val urn: Output<String>