We recommend using Azure Native.
azure.nginx.Certificate
Explore with Pulumi AI
Manages a Certificate for an NGinx Deployment.
Example Usage
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
private static string ReadFileBase64(string path) {
return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(File.ReadAllText(path)));
}
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var examplePublicIp = new Azure.Network.PublicIp("examplePublicIp", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AllocationMethod = "Static",
Sku = "Standard",
Tags =
{
{ "environment", "Production" },
},
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
{
AddressSpaces = new[]
{
"10.0.0.0/16",
},
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
{
ResourceGroupName = exampleResourceGroup.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
Delegations = new[]
{
new Azure.Network.Inputs.SubnetDelegationArgs
{
Name = "delegation",
ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
{
Name = "NGINX.NGINXPLUS/nginxDeployments",
Actions = new[]
{
"Microsoft.Network/virtualNetworks/subnets/join/action",
},
},
},
},
});
var exampleDeployment = new Azure.Nginx.Deployment("exampleDeployment", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Sku = "publicpreview_Monthly_gmz7xq9ge3py",
Location = exampleResourceGroup.Location,
ManagedResourceGroup = "example",
DiagnoseSupportEnabled = true,
FrontendPublic = new Azure.Nginx.Inputs.DeploymentFrontendPublicArgs
{
IpAddresses = new[]
{
examplePublicIp.Id,
},
},
NetworkInterfaces = new[]
{
new Azure.Nginx.Inputs.DeploymentNetworkInterfaceArgs
{
SubnetId = exampleSubnet.Id,
},
},
});
var current = Azure.Core.GetClientConfig.Invoke();
var exampleKeyVault = new Azure.KeyVault.KeyVault("exampleKeyVault", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
SkuName = "premium",
AccessPolicies = new[]
{
new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
{
TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
ObjectId = current.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
CertificatePermissions = new[]
{
"Create",
"Delete",
"DeleteIssuers",
"Get",
"GetIssuers",
"Import",
"List",
"ListIssuers",
"ManageContacts",
"ManageIssuers",
"SetIssuers",
"Update",
},
},
},
});
var exampleCertificate = new Azure.KeyVault.Certificate("exampleCertificate", new()
{
KeyVaultId = exampleKeyVault.Id,
KeyVaultCertificate = new Azure.KeyVault.Inputs.CertificateCertificateArgs
{
Contents = ReadFileBase64("certificate-to-import.pfx"),
Password = "",
},
});
var exampleNginx_certificateCertificate = new Azure.Nginx.Certificate("exampleNginx/certificateCertificate", new()
{
NginxDeploymentId = exampleDeployment.Id,
KeyVirtualPath = "/src/cert/soservermekey.key",
CertificateVirtualPath = "/src/cert/server.cert",
KeyVaultSecretId = exampleCertificate.SecretId,
});
});
package main
import (
"encoding/base64"
"os"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/nginx"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func filebase64OrPanic(path string) pulumi.StringPtrInput {
if fileData, err := os.ReadFile(path); err == nil {
return pulumi.String(base64.StdEncoding.EncodeToString(fileData[:]))
} else {
panic(err.Error())
}
}
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
examplePublicIp, err := network.NewPublicIp(ctx, "examplePublicIp", &network.PublicIpArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AllocationMethod: pulumi.String("Static"),
Sku: pulumi.String("Standard"),
Tags: pulumi.StringMap{
"environment": pulumi.String("Production"),
},
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
ResourceGroupName: exampleResourceGroup.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
Delegations: network.SubnetDelegationArray{
&network.SubnetDelegationArgs{
Name: pulumi.String("delegation"),
ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
Name: pulumi.String("NGINX.NGINXPLUS/nginxDeployments"),
Actions: pulumi.StringArray{
pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
},
},
},
},
})
if err != nil {
return err
}
exampleDeployment, err := nginx.NewDeployment(ctx, "exampleDeployment", &nginx.DeploymentArgs{
ResourceGroupName: exampleResourceGroup.Name,
Sku: pulumi.String("publicpreview_Monthly_gmz7xq9ge3py"),
Location: exampleResourceGroup.Location,
ManagedResourceGroup: pulumi.String("example"),
DiagnoseSupportEnabled: pulumi.Bool(true),
FrontendPublic: &nginx.DeploymentFrontendPublicArgs{
IpAddresses: pulumi.StringArray{
examplePublicIp.ID(),
},
},
NetworkInterfaces: nginx.DeploymentNetworkInterfaceArray{
&nginx.DeploymentNetworkInterfaceArgs{
SubnetId: exampleSubnet.ID(),
},
},
})
if err != nil {
return err
}
current, err := core.GetClientConfig(ctx, nil, nil)
if err != nil {
return err
}
exampleKeyVault, err := keyvault.NewKeyVault(ctx, "exampleKeyVault", &keyvault.KeyVaultArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
TenantId: *pulumi.String(current.TenantId),
SkuName: pulumi.String("premium"),
AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
&keyvault.KeyVaultAccessPolicyArgs{
TenantId: *pulumi.String(current.TenantId),
ObjectId: *pulumi.String(current.ObjectId),
CertificatePermissions: pulumi.StringArray{
pulumi.String("Create"),
pulumi.String("Delete"),
pulumi.String("DeleteIssuers"),
pulumi.String("Get"),
pulumi.String("GetIssuers"),
pulumi.String("Import"),
pulumi.String("List"),
pulumi.String("ListIssuers"),
pulumi.String("ManageContacts"),
pulumi.String("ManageIssuers"),
pulumi.String("SetIssuers"),
pulumi.String("Update"),
},
},
},
})
if err != nil {
return err
}
exampleCertificate, err := keyvault.NewCertificate(ctx, "exampleCertificate", &keyvault.CertificateArgs{
KeyVaultId: exampleKeyVault.ID(),
Certificate: &keyvault.CertificateCertificateArgs{
Contents: filebase64OrPanic("certificate-to-import.pfx"),
Password: pulumi.String(""),
},
})
if err != nil {
return err
}
_, err = nginx.NewCertificate(ctx, "exampleNginx/certificateCertificate", &nginx.CertificateArgs{
NginxDeploymentId: exampleDeployment.ID(),
KeyVirtualPath: pulumi.String("/src/cert/soservermekey.key"),
CertificateVirtualPath: pulumi.String("/src/cert/server.cert"),
KeyVaultSecretId: exampleCertificate.SecretId,
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.PublicIp;
import com.pulumi.azure.network.PublicIpArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
import com.pulumi.azure.nginx.Deployment;
import com.pulumi.azure.nginx.DeploymentArgs;
import com.pulumi.azure.nginx.inputs.DeploymentFrontendPublicArgs;
import com.pulumi.azure.nginx.inputs.DeploymentNetworkInterfaceArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.keyvault.KeyVault;
import com.pulumi.azure.keyvault.KeyVaultArgs;
import com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs;
import com.pulumi.azure.keyvault.Certificate;
import com.pulumi.azure.keyvault.CertificateArgs;
import com.pulumi.azure.keyvault.inputs.CertificateCertificateArgs;
import com.pulumi.azure.nginx.Certificate;
import com.pulumi.azure.nginx.CertificateArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.allocationMethod("Static")
.sku("Standard")
.tags(Map.of("environment", "Production"))
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.addressSpaces("10.0.0.0/16")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.delegations(SubnetDelegationArgs.builder()
.name("delegation")
.serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
.name("NGINX.NGINXPLUS/nginxDeployments")
.actions("Microsoft.Network/virtualNetworks/subnets/join/action")
.build())
.build())
.build());
var exampleDeployment = new Deployment("exampleDeployment", DeploymentArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.sku("publicpreview_Monthly_gmz7xq9ge3py")
.location(exampleResourceGroup.location())
.managedResourceGroup("example")
.diagnoseSupportEnabled(true)
.frontendPublic(DeploymentFrontendPublicArgs.builder()
.ipAddresses(examplePublicIp.id())
.build())
.networkInterfaces(DeploymentNetworkInterfaceArgs.builder()
.subnetId(exampleSubnet.id())
.build())
.build());
final var current = CoreFunctions.getClientConfig();
var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.skuName("premium")
.accessPolicies(KeyVaultAccessPolicyArgs.builder()
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
.certificatePermissions(
"Create",
"Delete",
"DeleteIssuers",
"Get",
"GetIssuers",
"Import",
"List",
"ListIssuers",
"ManageContacts",
"ManageIssuers",
"SetIssuers",
"Update")
.build())
.build());
var exampleCertificate = new Certificate("exampleCertificate", CertificateArgs.builder()
.keyVaultId(exampleKeyVault.id())
.certificate(CertificateCertificateArgs.builder()
.contents(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get("certificate-to-import.pfx"))))
.password("")
.build())
.build());
var exampleNginx_certificateCertificate = new Certificate("exampleNginx/certificateCertificate", CertificateArgs.builder()
.nginxDeploymentId(exampleDeployment.id())
.keyVirtualPath("/src/cert/soservermekey.key")
.certificateVirtualPath("/src/cert/server.cert")
.keyVaultSecretId(exampleCertificate.secretId())
.build());
}
}
import pulumi
import base64
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_public_ip = azure.network.PublicIp("examplePublicIp",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
allocation_method="Static",
sku="Standard",
tags={
"environment": "Production",
})
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
address_spaces=["10.0.0.0/16"],
location=example_resource_group.location,
resource_group_name=example_resource_group.name)
example_subnet = azure.network.Subnet("exampleSubnet",
resource_group_name=example_resource_group.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10.0.2.0/24"],
delegations=[azure.network.SubnetDelegationArgs(
name="delegation",
service_delegation=azure.network.SubnetDelegationServiceDelegationArgs(
name="NGINX.NGINXPLUS/nginxDeployments",
actions=["Microsoft.Network/virtualNetworks/subnets/join/action"],
),
)])
example_deployment = azure.nginx.Deployment("exampleDeployment",
resource_group_name=example_resource_group.name,
sku="publicpreview_Monthly_gmz7xq9ge3py",
location=example_resource_group.location,
managed_resource_group="example",
diagnose_support_enabled=True,
frontend_public=azure.nginx.DeploymentFrontendPublicArgs(
ip_addresses=[example_public_ip.id],
),
network_interfaces=[azure.nginx.DeploymentNetworkInterfaceArgs(
subnet_id=example_subnet.id,
)])
current = azure.core.get_client_config()
example_key_vault = azure.keyvault.KeyVault("exampleKeyVault",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
tenant_id=current.tenant_id,
sku_name="premium",
access_policies=[azure.keyvault.KeyVaultAccessPolicyArgs(
tenant_id=current.tenant_id,
object_id=current.object_id,
certificate_permissions=[
"Create",
"Delete",
"DeleteIssuers",
"Get",
"GetIssuers",
"Import",
"List",
"ListIssuers",
"ManageContacts",
"ManageIssuers",
"SetIssuers",
"Update",
],
)])
example_certificate = azure.keyvault.Certificate("exampleCertificate",
key_vault_id=example_key_vault.id,
certificate=azure.keyvault.CertificateCertificateArgs(
contents=(lambda path: base64.b64encode(open(path).read().encode()).decode())("certificate-to-import.pfx"),
password="",
))
example_nginx_certificate_certificate = azure.nginx.Certificate("exampleNginx/certificateCertificate",
nginx_deployment_id=example_deployment.id,
key_virtual_path="/src/cert/soservermekey.key",
certificate_virtual_path="/src/cert/server.cert",
key_vault_secret_id=example_certificate.secret_id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as fs from "fs";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePublicIp = new azure.network.PublicIp("examplePublicIp", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
allocationMethod: "Static",
sku: "Standard",
tags: {
environment: "Production",
},
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
addressSpaces: ["10.0.0.0/16"],
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
resourceGroupName: exampleResourceGroup.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10.0.2.0/24"],
delegations: [{
name: "delegation",
serviceDelegation: {
name: "NGINX.NGINXPLUS/nginxDeployments",
actions: ["Microsoft.Network/virtualNetworks/subnets/join/action"],
},
}],
});
const exampleDeployment = new azure.nginx.Deployment("exampleDeployment", {
resourceGroupName: exampleResourceGroup.name,
sku: "publicpreview_Monthly_gmz7xq9ge3py",
location: exampleResourceGroup.location,
managedResourceGroup: "example",
diagnoseSupportEnabled: true,
frontendPublic: {
ipAddresses: [examplePublicIp.id],
},
networkInterfaces: [{
subnetId: exampleSubnet.id,
}],
});
const current = azure.core.getClientConfig({});
const exampleKeyVault = new azure.keyvault.KeyVault("exampleKeyVault", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
tenantId: current.then(current => current.tenantId),
skuName: "premium",
accessPolicies: [{
tenantId: current.then(current => current.tenantId),
objectId: current.then(current => current.objectId),
certificatePermissions: [
"Create",
"Delete",
"DeleteIssuers",
"Get",
"GetIssuers",
"Import",
"List",
"ListIssuers",
"ManageContacts",
"ManageIssuers",
"SetIssuers",
"Update",
],
}],
});
const exampleCertificate = new azure.keyvault.Certificate("exampleCertificate", {
keyVaultId: exampleKeyVault.id,
certificate: {
contents: Buffer.from(fs.readFileSync("certificate-to-import.pfx"), 'binary').toString('base64'),
password: "",
},
});
const exampleNginx_certificateCertificate = new azure.nginx.Certificate("exampleNginx/certificateCertificate", {
nginxDeploymentId: exampleDeployment.id,
keyVirtualPath: "/src/cert/soservermekey.key",
certificateVirtualPath: "/src/cert/server.cert",
keyVaultSecretId: exampleCertificate.secretId,
});
Coming soon!
Create Certificate Resource
new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
certificate_virtual_path: Optional[str] = None,
key_vault_secret_id: Optional[str] = None,
key_virtual_path: Optional[str] = None,
name: Optional[str] = None,
nginx_deployment_id: Optional[str] = None)
@overload
def Certificate(resource_name: str,
args: CertificateArgs,
opts: Optional[ResourceOptions] = None)
func NewCertificate(ctx *Context, name string, args CertificateArgs, opts ...ResourceOption) (*Certificate, error)
public Certificate(string name, CertificateArgs args, CustomResourceOptions? opts = null)
public Certificate(String name, CertificateArgs args)
public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
type: azure:nginx:Certificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CertificateArgs
- 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 CertificateArgs
- 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 CertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CertificateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Certificate 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 Certificate resource accepts the following input properties:
- Certificate
Virtual stringPath Specify the path to the cert file of this certificate.
- Key
Vault stringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- Key
Virtual stringPath Specify the path to the key file of this certificate.
- Nginx
Deployment stringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- Name string
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- Certificate
Virtual stringPath Specify the path to the cert file of this certificate.
- Key
Vault stringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- Key
Virtual stringPath Specify the path to the key file of this certificate.
- Nginx
Deployment stringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- Name string
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- certificate
Virtual StringPath Specify the path to the cert file of this certificate.
- key
Vault StringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- key
Virtual StringPath Specify the path to the key file of this certificate.
- nginx
Deployment StringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- name String
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- certificate
Virtual stringPath Specify the path to the cert file of this certificate.
- key
Vault stringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- key
Virtual stringPath Specify the path to the key file of this certificate.
- nginx
Deployment stringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- name string
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- certificate_
virtual_ strpath Specify the path to the cert file of this certificate.
- key_
vault_ strsecret_ id Specify the ID of the Key Vault Secret for this certificate.
- key_
virtual_ strpath Specify the path to the key file of this certificate.
- nginx_
deployment_ strid The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- name str
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- certificate
Virtual StringPath Specify the path to the cert file of this certificate.
- key
Vault StringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- key
Virtual StringPath Specify the path to the key file of this certificate.
- nginx
Deployment StringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- name String
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Certificate 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 Certificate Resource
Get an existing Certificate 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?: CertificateState, opts?: CustomResourceOptions): Certificate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
certificate_virtual_path: Optional[str] = None,
key_vault_secret_id: Optional[str] = None,
key_virtual_path: Optional[str] = None,
name: Optional[str] = None,
nginx_deployment_id: Optional[str] = None) -> Certificate
func GetCertificate(ctx *Context, name string, id IDInput, state *CertificateState, opts ...ResourceOption) (*Certificate, error)
public static Certificate Get(string name, Input<string> id, CertificateState? state, CustomResourceOptions? opts = null)
public static Certificate get(String name, Output<String> id, CertificateState 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.
- Certificate
Virtual stringPath Specify the path to the cert file of this certificate.
- Key
Vault stringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- Key
Virtual stringPath Specify the path to the key file of this certificate.
- Name string
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- Nginx
Deployment stringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- Certificate
Virtual stringPath Specify the path to the cert file of this certificate.
- Key
Vault stringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- Key
Virtual stringPath Specify the path to the key file of this certificate.
- Name string
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- Nginx
Deployment stringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- certificate
Virtual StringPath Specify the path to the cert file of this certificate.
- key
Vault StringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- key
Virtual StringPath Specify the path to the key file of this certificate.
- name String
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- nginx
Deployment StringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- certificate
Virtual stringPath Specify the path to the cert file of this certificate.
- key
Vault stringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- key
Virtual stringPath Specify the path to the key file of this certificate.
- name string
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- nginx
Deployment stringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- certificate_
virtual_ strpath Specify the path to the cert file of this certificate.
- key_
vault_ strsecret_ id Specify the ID of the Key Vault Secret for this certificate.
- key_
virtual_ strpath Specify the path to the key file of this certificate.
- name str
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- nginx_
deployment_ strid The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
- certificate
Virtual StringPath Specify the path to the cert file of this certificate.
- key
Vault StringSecret Id Specify the ID of the Key Vault Secret for this certificate.
- key
Virtual StringPath Specify the path to the key file of this certificate.
- name String
The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created.
- nginx
Deployment StringId The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created.
Import
An Nginx Certificate can be imported using the resource id
, e.g.
$ pulumi import azure:nginx/certificate:Certificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Nginx.NginxPlus/nginxDeployments/deploy1/certificates/cer1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.