azure-native.cdn.Secret
Explore with Pulumi AI
Friendly Secret name mapping to the any Secret or secret related information. API Version: 2020-09-01.
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
        {
            CertificateAuthority = "Symantec",
            SecretSource = new AzureNative.Cdn.Inputs.ResourceReferenceArgs
            {
                Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/certificate/certName",
            },
            SecretVersion = "67c452f83c804aed80aa3a21e523c226",
            SubjectAlternativeNames = new[]
            {
                "foo.contoso.com",
                "www3.foo.contoso.com",
            },
            Type = "CustomerCertificate",
            UseLatestVersion = false,
        },
        ProfileName = "profile1",
        ResourceGroupName = "RG",
        SecretName = "secret1",
    });
});
package main
import (
	cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn"
	"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.CustomerCertificateParameters{
				CertificateAuthority: "Symantec",
				SecretSource: cdn.ResourceReference{
					Id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/certificate/certName",
				},
				SecretVersion: "67c452f83c804aed80aa3a21e523c226",
				SubjectAlternativeNames: []string{
					"foo.contoso.com",
					"www3.foo.contoso.com",
				},
				Type:             "CustomerCertificate",
				UseLatestVersion: 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(Map.ofEntries(
                Map.entry("certificateAuthority", "Symantec"),
                Map.entry("secretSource", Map.of("id", "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/certificate/certName")),
                Map.entry("secretVersion", "67c452f83c804aed80aa3a21e523c226"),
                Map.entry("subjectAlternativeNames",                 
                    "foo.contoso.com",
                    "www3.foo.contoso.com"),
                Map.entry("type", "CustomerCertificate"),
                Map.entry("useLatestVersion", false)
            ))
            .profileName("profile1")
            .resourceGroupName("RG")
            .secretName("secret1")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const secret = new azure_native.cdn.Secret("secret", {
    parameters: {
        certificateAuthority: "Symantec",
        secretSource: {
            id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/certificate/certName",
        },
        secretVersion: "67c452f83c804aed80aa3a21e523c226",
        subjectAlternativeNames: [
            "foo.contoso.com",
            "www3.foo.contoso.com",
        ],
        type: "CustomerCertificate",
        useLatestVersion: false,
    },
    profileName: "profile1",
    resourceGroupName: "RG",
    secretName: "secret1",
});
import pulumi
import pulumi_azure_native as azure_native
secret = azure_native.cdn.Secret("secret",
    parameters=azure_native.cdn.CustomerCertificateParametersArgs(
        certificate_authority="Symantec",
        secret_source=azure_native.cdn.ResourceReferenceArgs(
            id="/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/certificate/certName",
        ),
        secret_version="67c452f83c804aed80aa3a21e523c226",
        subject_alternative_names=[
            "foo.contoso.com",
            "www3.foo.contoso.com",
        ],
        type="CustomerCertificate",
        use_latest_version=False,
    ),
    profile_name="profile1",
    resource_group_name="RG",
    secret_name="secret1")
resources:
  secret:
    type: azure-native:cdn:Secret
    properties:
      parameters:
        certificateAuthority: Symantec
        secretSource:
          id: /subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/certificate/certName
        secretVersion: 67c452f83c804aed80aa3a21e523c226
        subjectAlternativeNames:
          - foo.contoso.com
          - www3.foo.contoso.com
        type: CustomerCertificate
        useLatestVersion: false
      profileName: profile1
      resourceGroupName: RG
      secretName: secret1
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,
           profile_name: Optional[str] = None,
           resource_group_name: Optional[str] = None,
           parameters: Optional[Union[CustomerCertificateParametersArgs, ManagedCertificateParametersArgs, UrlSigningKeyParametersArgs]] = None,
           secret_name: 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:cdn: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 secretResource = new AzureNative.Cdn.Secret("secretResource", new()
{
    ProfileName = "string",
    ResourceGroupName = "string",
    Parameters = 
    {
        { "secretSource", 
        {
            { "id", "string" },
        } },
        { "type", "CustomerCertificate" },
        { "certificateAuthority", "string" },
        { "secretVersion", "string" },
        { "subjectAlternativeNames", new[]
        {
            "string",
        } },
        { "useLatestVersion", false },
    },
    SecretName = "string",
});
example, err := cdn.NewSecret(ctx, "secretResource", &cdn.SecretArgs{
	ProfileName:       "string",
	ResourceGroupName: "string",
	Parameters: map[string]interface{}{
		"secretSource": map[string]interface{}{
			"id": "string",
		},
		"type":                 "CustomerCertificate",
		"certificateAuthority": "string",
		"secretVersion":        "string",
		"subjectAlternativeNames": []string{
			"string",
		},
		"useLatestVersion": false,
	},
	SecretName: "string",
})
var secretResource = new Secret("secretResource", SecretArgs.builder()
    .profileName("string")
    .resourceGroupName("string")
    .parameters(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .secretName("string")
    .build());
secret_resource = azure_native.cdn.Secret("secretResource",
    profile_name=string,
    resource_group_name=string,
    parameters={
        secretSource: {
            id: string,
        },
        type: CustomerCertificate,
        certificateAuthority: string,
        secretVersion: string,
        subjectAlternativeNames: [string],
        useLatestVersion: False,
    },
    secret_name=string)
const secretResource = new azure_native.cdn.Secret("secretResource", {
    profileName: "string",
    resourceGroupName: "string",
    parameters: {
        secretSource: {
            id: "string",
        },
        type: "CustomerCertificate",
        certificateAuthority: "string",
        secretVersion: "string",
        subjectAlternativeNames: ["string"],
        useLatestVersion: false,
    },
    secretName: "string",
});
type: azure-native:cdn:Secret
properties:
    parameters:
        certificateAuthority: string
        secretSource:
            id: string
        secretVersion: string
        subjectAlternativeNames:
            - string
        type: CustomerCertificate
        useLatestVersion: false
    profileName: string
    resourceGroupName: string
    secretName: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Secret resource accepts the following input properties:
- ProfileName string
- Name of the CDN profile which is unique within the resource group.
- ResourceGroup stringName 
- Name of the Resource group within the Azure subscription.
- Parameters
Pulumi.Azure | Pulumi.Native. Cdn. Inputs. Customer Certificate Parameters Azure | Pulumi.Native. Cdn. Inputs. Managed Certificate Parameters Azure Native. Cdn. Inputs. Url Signing Key Parameters 
- object which contains secret parameters
- SecretName string
- Name of the Secret under the profile.
- ProfileName string
- Name of the CDN profile which is unique within the resource group.
- ResourceGroup stringName 
- Name of the Resource group within the Azure subscription.
- Parameters
CustomerCertificate | ManagedParameters Args Certificate | UrlParameters Args Signing Key Parameters Args 
- object which contains secret parameters
- SecretName string
- Name of the Secret under the profile.
- profileName String
- Name of the CDN profile which is unique within the resource group.
- resourceGroup StringName 
- Name of the Resource group within the Azure subscription.
- parameters
CustomerCertificate | ManagedParameters Certificate | UrlParameters Signing Key Parameters 
- object which contains secret parameters
- secretName String
- Name of the Secret under the profile.
- profileName string
- Name of the CDN profile which is unique within the resource group.
- resourceGroup stringName 
- Name of the Resource group within the Azure subscription.
- parameters
CustomerCertificate | ManagedParameters Certificate | UrlParameters Signing Key Parameters 
- object which contains secret parameters
- secretName string
- Name of the Secret under the profile.
- profile_name str
- Name of the CDN profile which is unique within the resource group.
- resource_group_ strname 
- Name of the Resource group within the Azure subscription.
- parameters
CustomerCertificate | ManagedParameters Args Certificate | UrlParameters Args Signing Key Parameters Args 
- object which contains secret parameters
- secret_name str
- Name of the Secret under the profile.
- profileName String
- Name of the CDN profile which is unique within the resource group.
- resourceGroup StringName 
- Name of the Resource group within the Azure subscription.
- parameters Property Map | Property Map | Property Map
- object which contains secret parameters
- secretName String
- Name of the Secret under the profile.
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
- DeploymentStatus string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- ProvisioningState string
- Provisioning status
- SystemData Pulumi.Azure Native. Cdn. Outputs. System Data Response 
- Read only system data
- Type string
- Resource type.
- DeploymentStatus string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- ProvisioningState string
- Provisioning status
- SystemData SystemData Response 
- Read only system data
- Type string
- Resource type.
- deploymentStatus String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- provisioningState String
- Provisioning status
- systemData SystemData Response 
- Read only system data
- type String
- Resource type.
- deploymentStatus string
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- provisioningState string
- Provisioning status
- systemData SystemData Response 
- Read only system data
- type string
- Resource type.
- deployment_status str
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name.
- provisioning_state str
- Provisioning status
- system_data SystemData Response 
- Read only system data
- type str
- Resource type.
- deploymentStatus String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- provisioningState String
- Provisioning status
- systemData Property Map
- Read only system data
- type String
- Resource type.
Supporting Types
CustomerCertificateParameters, CustomerCertificateParametersArgs      
- SecretSource Pulumi.Azure Native. Cdn. Inputs. Resource Reference 
- Resource reference to the KV secret
- string
- Certificate issuing authority.
- SecretVersion string
- Version of the secret to be used
- SubjectAlternative List<string>Names 
- The list of SANs.
- UseLatest boolVersion 
- Whether to use the latest version for the certificate
- SecretSource ResourceReference 
- Resource reference to the KV secret
- string
- Certificate issuing authority.
- SecretVersion string
- Version of the secret to be used
- SubjectAlternative []stringNames 
- The list of SANs.
- UseLatest boolVersion 
- Whether to use the latest version for the certificate
- secretSource ResourceReference 
- Resource reference to the KV secret
- String
- Certificate issuing authority.
- secretVersion String
- Version of the secret to be used
- subjectAlternative List<String>Names 
- The list of SANs.
- useLatest BooleanVersion 
- Whether to use the latest version for the certificate
- secretSource ResourceReference 
- Resource reference to the KV secret
- string
- Certificate issuing authority.
- secretVersion string
- Version of the secret to be used
- subjectAlternative string[]Names 
- The list of SANs.
- useLatest booleanVersion 
- Whether to use the latest version for the certificate
- secret_source ResourceReference 
- Resource reference to the KV secret
- str
- Certificate issuing authority.
- secret_version str
- Version of the secret to be used
- subject_alternative_ Sequence[str]names 
- The list of SANs.
- use_latest_ boolversion 
- Whether to use the latest version for the certificate
- secretSource Property Map
- Resource reference to the KV secret
- String
- Certificate issuing authority.
- secretVersion String
- Version of the secret to be used
- subjectAlternative List<String>Names 
- The list of SANs.
- useLatest BooleanVersion 
- Whether to use the latest version for the certificate
CustomerCertificateParametersResponse, CustomerCertificateParametersResponseArgs        
- SecretSource Pulumi.Azure Native. Cdn. Inputs. Resource Reference Response 
- Resource reference to the KV secret
- string
- Certificate issuing authority.
- SecretVersion string
- Version of the secret to be used
- SubjectAlternative List<string>Names 
- The list of SANs.
- UseLatest boolVersion 
- Whether to use the latest version for the certificate
- SecretSource ResourceReference Response 
- Resource reference to the KV secret
- string
- Certificate issuing authority.
- SecretVersion string
- Version of the secret to be used
- SubjectAlternative []stringNames 
- The list of SANs.
- UseLatest boolVersion 
- Whether to use the latest version for the certificate
- secretSource ResourceReference Response 
- Resource reference to the KV secret
- String
- Certificate issuing authority.
- secretVersion String
- Version of the secret to be used
- subjectAlternative List<String>Names 
- The list of SANs.
- useLatest BooleanVersion 
- Whether to use the latest version for the certificate
- secretSource ResourceReference Response 
- Resource reference to the KV secret
- string
- Certificate issuing authority.
- secretVersion string
- Version of the secret to be used
- subjectAlternative string[]Names 
- The list of SANs.
- useLatest booleanVersion 
- Whether to use the latest version for the certificate
- secret_source ResourceReference Response 
- Resource reference to the KV secret
- str
- Certificate issuing authority.
- secret_version str
- Version of the secret to be used
- subject_alternative_ Sequence[str]names 
- The list of SANs.
- use_latest_ boolversion 
- Whether to use the latest version for the certificate
- secretSource Property Map
- Resource reference to the KV secret
- String
- Certificate issuing authority.
- secretVersion String
- Version of the secret to be used
- subjectAlternative List<String>Names 
- The list of SANs.
- useLatest BooleanVersion 
- Whether to use the latest version for the certificate
ManagedCertificateParameters, ManagedCertificateParametersArgs      
ManagedCertificateParametersResponse, ManagedCertificateParametersResponseArgs        
ResourceReference, ResourceReferenceArgs    
- Id string
- Resource ID.
- Id string
- Resource ID.
- id String
- Resource ID.
- id string
- Resource ID.
- id str
- Resource ID.
- id String
- Resource ID.
ResourceReferenceResponse, ResourceReferenceResponseArgs      
- Id string
- Resource ID.
- Id string
- Resource ID.
- id String
- Resource ID.
- id string
- Resource ID.
- id str
- Resource ID.
- id String
- Resource ID.
SystemDataResponse, SystemDataResponseArgs      
- CreatedAt string
- The timestamp of resource creation (UTC)
- CreatedBy string
- An identifier for the identity that created the resource
- CreatedBy stringType 
- The type of identity that created the resource
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- An identifier for the identity that last modified the resource
- LastModified stringBy Type 
- The type of identity that last modified the resource
- CreatedAt string
- The timestamp of resource creation (UTC)
- CreatedBy string
- An identifier for the identity that created the resource
- CreatedBy stringType 
- The type of identity that created the resource
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- An identifier for the identity that last modified the resource
- LastModified stringBy Type 
- The type of identity that last modified the resource
- createdAt String
- The timestamp of resource creation (UTC)
- createdBy String
- An identifier for the identity that created the resource
- createdBy StringType 
- The type of identity that created the resource
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- An identifier for the identity that last modified the resource
- lastModified StringBy Type 
- The type of identity that last modified the resource
- createdAt string
- The timestamp of resource creation (UTC)
- createdBy string
- An identifier for the identity that created the resource
- createdBy stringType 
- The type of identity that created the resource
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- An identifier for the identity that last modified the resource
- lastModified stringBy Type 
- The type of identity that last modified the resource
- created_at str
- The timestamp of resource creation (UTC)
- created_by str
- An identifier for the identity that created the resource
- created_by_ strtype 
- The type of identity that created the resource
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- An identifier for the identity that last modified the resource
- last_modified_ strby_ type 
- The type of identity that last modified the resource
- createdAt String
- The timestamp of resource creation (UTC)
- createdBy String
- An identifier for the identity that created the resource
- createdBy StringType 
- The type of identity that created the resource
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- An identifier for the identity that last modified the resource
- lastModified StringBy Type 
- The type of identity that last modified the resource
UrlSigningKeyParameters, UrlSigningKeyParametersArgs        
- KeyId string
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- SecretSource Pulumi.Azure Native. Cdn. Inputs. Resource Reference 
- Resource reference to the KV secret
- SecretVersion string
- Version of the secret to be used
- KeyId string
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- SecretSource ResourceReference 
- Resource reference to the KV secret
- SecretVersion string
- Version of the secret to be used
- keyId String
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- secretSource ResourceReference 
- Resource reference to the KV secret
- secretVersion String
- Version of the secret to be used
- keyId string
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- secretSource ResourceReference 
- Resource reference to the KV secret
- secretVersion string
- Version of the secret to be used
- key_id str
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- secret_source ResourceReference 
- Resource reference to the KV secret
- secret_version str
- Version of the secret to be used
- keyId String
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- secretSource Property Map
- Resource reference to the KV secret
- secretVersion String
- Version of the secret to be used
UrlSigningKeyParametersResponse, UrlSigningKeyParametersResponseArgs          
- KeyId string
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- SecretSource Pulumi.Azure Native. Cdn. Inputs. Resource Reference Response 
- Resource reference to the KV secret
- SecretVersion string
- Version of the secret to be used
- KeyId string
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- SecretSource ResourceReference Response 
- Resource reference to the KV secret
- SecretVersion string
- Version of the secret to be used
- keyId String
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- secretSource ResourceReference Response 
- Resource reference to the KV secret
- secretVersion String
- Version of the secret to be used
- keyId string
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- secretSource ResourceReference Response 
- Resource reference to the KV secret
- secretVersion string
- Version of the secret to be used
- key_id str
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- secret_source ResourceReference Response 
- Resource reference to the KV secret
- secret_version str
- Version of the secret to be used
- keyId String
- Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
- secretSource Property Map
- Resource reference to the KV secret
- secretVersion String
- Version of the secret to be used
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:cdn:Secret secret1 /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/secrets/secret1 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0