Okta v4.0.0, Jun 1 23
Okta v4.0.0, Jun 1 23
okta.DomainCertificate
Explore with Pulumi AI
Import
This resource does not support importing.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var example = new Okta.Domain("example");
var test = new Okta.DomainCertificate("test", new()
{
DomainId = okta_domain.Test.Id,
Type = "PEM",
Certificate = @"-----BEGIN CERTIFICATE-----
MIIFNzCCBB+gAwIBAgISBAXomJWRama3ypu8TIxdA9wzMA0GCSqGSIb3DQEBCwUA
...
NSgRtSXq11j8O4JONi8EXe7cEtvzUiLR5PL3itsK2svtrZ9jIwQ95wOPaA==
-----END CERTIFICATE-----
",
CertificateChain = @"-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
...
Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
-----END CERTIFICATE-----
",
PrivateKey = @"-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5cyk6x63iBJSW
...
nUFLNE8pXSnsqb0eOL74f3uQ
-----END PRIVATE KEY-----
",
});
});
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := okta.NewDomain(ctx, "example", nil)
if err != nil {
return err
}
_, err = okta.NewDomainCertificate(ctx, "test", &okta.DomainCertificateArgs{
DomainId: pulumi.Any(okta_domain.Test.Id),
Type: pulumi.String("PEM"),
Certificate: pulumi.String("-----BEGIN CERTIFICATE-----\nMIIFNzCCBB+gAwIBAgISBAXomJWRama3ypu8TIxdA9wzMA0GCSqGSIb3DQEBCwUA\n...\nNSgRtSXq11j8O4JONi8EXe7cEtvzUiLR5PL3itsK2svtrZ9jIwQ95wOPaA==\n-----END CERTIFICATE-----\n"),
CertificateChain: pulumi.String("-----BEGIN CERTIFICATE-----\nMIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw\n...\nDfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5\n-----END CERTIFICATE-----\n"),
PrivateKey: pulumi.String("-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5cyk6x63iBJSW\n...\nnUFLNE8pXSnsqb0eOL74f3uQ\n-----END PRIVATE KEY-----\n"),
})
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.okta.Domain;
import com.pulumi.okta.DomainCertificate;
import com.pulumi.okta.DomainCertificateArgs;
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 example = new Domain("example");
var test = new DomainCertificate("test", DomainCertificateArgs.builder()
.domainId(okta_domain.test().id())
.type("PEM")
.certificate("""
-----BEGIN CERTIFICATE-----
MIIFNzCCBB+gAwIBAgISBAXomJWRama3ypu8TIxdA9wzMA0GCSqGSIb3DQEBCwUA
...
NSgRtSXq11j8O4JONi8EXe7cEtvzUiLR5PL3itsK2svtrZ9jIwQ95wOPaA==
-----END CERTIFICATE-----
""")
.certificateChain("""
-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
...
Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
-----END CERTIFICATE-----
""")
.privateKey("""
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5cyk6x63iBJSW
...
nUFLNE8pXSnsqb0eOL74f3uQ
-----END PRIVATE KEY-----
""")
.build());
}
}
import pulumi
import pulumi_okta as okta
example = okta.Domain("example")
test = okta.DomainCertificate("test",
domain_id=okta_domain["test"]["id"],
type="PEM",
certificate="""-----BEGIN CERTIFICATE-----
MIIFNzCCBB+gAwIBAgISBAXomJWRama3ypu8TIxdA9wzMA0GCSqGSIb3DQEBCwUA
...
NSgRtSXq11j8O4JONi8EXe7cEtvzUiLR5PL3itsK2svtrZ9jIwQ95wOPaA==
-----END CERTIFICATE-----
""",
certificate_chain="""-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
...
Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
-----END CERTIFICATE-----
""",
private_key="""-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5cyk6x63iBJSW
...
nUFLNE8pXSnsqb0eOL74f3uQ
-----END PRIVATE KEY-----
""")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.Domain("example", {});
const test = new okta.DomainCertificate("test", {
domainId: okta_domain.test.id,
type: "PEM",
certificate: `-----BEGIN CERTIFICATE-----
MIIFNzCCBB+gAwIBAgISBAXomJWRama3ypu8TIxdA9wzMA0GCSqGSIb3DQEBCwUA
...
NSgRtSXq11j8O4JONi8EXe7cEtvzUiLR5PL3itsK2svtrZ9jIwQ95wOPaA==
-----END CERTIFICATE-----
`,
certificateChain: `-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
...
Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
-----END CERTIFICATE-----
`,
privateKey: `-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5cyk6x63iBJSW
...
nUFLNE8pXSnsqb0eOL74f3uQ
-----END PRIVATE KEY-----
`,
});
resources:
example:
type: okta:Domain
test:
type: okta:DomainCertificate
properties:
domainId: ${okta_domain.test.id}
type: PEM
#certificate = file("www.example.com/cert.pem")
certificate: |
-----BEGIN CERTIFICATE-----
MIIFNzCCBB+gAwIBAgISBAXomJWRama3ypu8TIxdA9wzMA0GCSqGSIb3DQEBCwUA
...
NSgRtSXq11j8O4JONi8EXe7cEtvzUiLR5PL3itsK2svtrZ9jIwQ95wOPaA==
-----END CERTIFICATE-----
#certificate_chain = file("www.example.com/chain.pem")
certificateChain: |
-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
...
Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
-----END CERTIFICATE-----
#private_key = file("www.example.com/privkey.pem")
privateKey: |
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5cyk6x63iBJSW
...
nUFLNE8pXSnsqb0eOL74f3uQ
-----END PRIVATE KEY-----
Create DomainCertificate Resource
new DomainCertificate(name: string, args: DomainCertificateArgs, opts?: CustomResourceOptions);
@overload
def DomainCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
certificate: Optional[str] = None,
certificate_chain: Optional[str] = None,
domain_id: Optional[str] = None,
private_key: Optional[str] = None,
type: Optional[str] = None)
@overload
def DomainCertificate(resource_name: str,
args: DomainCertificateArgs,
opts: Optional[ResourceOptions] = None)
func NewDomainCertificate(ctx *Context, name string, args DomainCertificateArgs, opts ...ResourceOption) (*DomainCertificate, error)
public DomainCertificate(string name, DomainCertificateArgs args, CustomResourceOptions? opts = null)
public DomainCertificate(String name, DomainCertificateArgs args)
public DomainCertificate(String name, DomainCertificateArgs args, CustomResourceOptions options)
type: okta:DomainCertificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DomainCertificateArgs
- 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 DomainCertificateArgs
- 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 DomainCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DomainCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DomainCertificateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DomainCertificate 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 DomainCertificate resource accepts the following input properties:
- Certificate string
Certificate content.
- Certificate
Chain string Certificate certificate chain.
- Domain
Id string Domain ID.
- Private
Key string Certificate private key.
- Type string
Certificate type. Valid value is
"PEM"
.
- Certificate string
Certificate content.
- Certificate
Chain string Certificate certificate chain.
- Domain
Id string Domain ID.
- Private
Key string Certificate private key.
- Type string
Certificate type. Valid value is
"PEM"
.
- certificate String
Certificate content.
- certificate
Chain String Certificate certificate chain.
- domain
Id String Domain ID.
- private
Key String Certificate private key.
- type String
Certificate type. Valid value is
"PEM"
.
- certificate string
Certificate content.
- certificate
Chain string Certificate certificate chain.
- domain
Id string Domain ID.
- private
Key string Certificate private key.
- type string
Certificate type. Valid value is
"PEM"
.
- certificate str
Certificate content.
- certificate_
chain str Certificate certificate chain.
- domain_
id str Domain ID.
- private_
key str Certificate private key.
- type str
Certificate type. Valid value is
"PEM"
.
- certificate String
Certificate content.
- certificate
Chain String Certificate certificate chain.
- domain
Id String Domain ID.
- private
Key String Certificate private key.
- type String
Certificate type. Valid value is
"PEM"
.
Outputs
All input properties are implicitly available as output properties. Additionally, the DomainCertificate 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 DomainCertificate Resource
Get an existing DomainCertificate 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?: DomainCertificateState, opts?: CustomResourceOptions): DomainCertificate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
certificate: Optional[str] = None,
certificate_chain: Optional[str] = None,
domain_id: Optional[str] = None,
private_key: Optional[str] = None,
type: Optional[str] = None) -> DomainCertificate
func GetDomainCertificate(ctx *Context, name string, id IDInput, state *DomainCertificateState, opts ...ResourceOption) (*DomainCertificate, error)
public static DomainCertificate Get(string name, Input<string> id, DomainCertificateState? state, CustomResourceOptions? opts = null)
public static DomainCertificate get(String name, Output<String> id, DomainCertificateState 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 string
Certificate content.
- Certificate
Chain string Certificate certificate chain.
- Domain
Id string Domain ID.
- Private
Key string Certificate private key.
- Type string
Certificate type. Valid value is
"PEM"
.
- Certificate string
Certificate content.
- Certificate
Chain string Certificate certificate chain.
- Domain
Id string Domain ID.
- Private
Key string Certificate private key.
- Type string
Certificate type. Valid value is
"PEM"
.
- certificate String
Certificate content.
- certificate
Chain String Certificate certificate chain.
- domain
Id String Domain ID.
- private
Key String Certificate private key.
- type String
Certificate type. Valid value is
"PEM"
.
- certificate string
Certificate content.
- certificate
Chain string Certificate certificate chain.
- domain
Id string Domain ID.
- private
Key string Certificate private key.
- type string
Certificate type. Valid value is
"PEM"
.
- certificate str
Certificate content.
- certificate_
chain str Certificate certificate chain.
- domain_
id str Domain ID.
- private_
key str Certificate private key.
- type str
Certificate type. Valid value is
"PEM"
.
- certificate String
Certificate content.
- certificate
Chain String Certificate certificate chain.
- domain
Id String Domain ID.
- private
Key String Certificate private key.
- type String
Certificate type. Valid value is
"PEM"
.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
okta
Terraform Provider.