flexibleengine.WafCertificate
Explore with Pulumi AI
Manages a WAF certificate resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const certificate1 = new flexibleengine.WafCertificate("certificate1", {
certificate: `-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUN3w1KX8/T/HWVxZIOdHXPhUOnsAwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
...
dKvZbPEsygYRIjwyhHHUh/YXH8KDI/uu6u6AxDckQ3rP1BkkKXr5NPBGjVgM3ZI=
-----END CERTIFICATE-----
`,
privateKey: `-----BEGIN PRIVATE KEY-----
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC+9uwFVenCdPD9
5LWSWMuy4riZW718wxBpYV5Y9N8nM7N0qZLLdpImZrzBbaBldTI+AZGI3Nupuurw
...
s9urs/Kk/tbQhsEvu0X8FyGwo0zH6rG8apTFTlac+v4mJ4vlpxSvT5+FW2lgLISE
+4sM7kp0qO3/p+45HykwBY5iHq3H
-----END PRIVATE KEY-----
`,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
certificate1 = flexibleengine.WafCertificate("certificate1",
certificate="""-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUN3w1KX8/T/HWVxZIOdHXPhUOnsAwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
...
dKvZbPEsygYRIjwyhHHUh/YXH8KDI/uu6u6AxDckQ3rP1BkkKXr5NPBGjVgM3ZI=
-----END CERTIFICATE-----
""",
private_key="""-----BEGIN PRIVATE KEY-----
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC+9uwFVenCdPD9
5LWSWMuy4riZW718wxBpYV5Y9N8nM7N0qZLLdpImZrzBbaBldTI+AZGI3Nupuurw
...
s9urs/Kk/tbQhsEvu0X8FyGwo0zH6rG8apTFTlac+v4mJ4vlpxSvT5+FW2lgLISE
+4sM7kp0qO3/p+45HykwBY5iHq3H
-----END PRIVATE KEY-----
""")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewWafCertificate(ctx, "certificate1", &flexibleengine.WafCertificateArgs{
Certificate: pulumi.String(`-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUN3w1KX8/T/HWVxZIOdHXPhUOnsAwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
...
dKvZbPEsygYRIjwyhHHUh/YXH8KDI/uu6u6AxDckQ3rP1BkkKXr5NPBGjVgM3ZI=
-----END CERTIFICATE-----
`),
PrivateKey: pulumi.String(`-----BEGIN PRIVATE KEY-----
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC+9uwFVenCdPD9
5LWSWMuy4riZW718wxBpYV5Y9N8nM7N0qZLLdpImZrzBbaBldTI+AZGI3Nupuurw
...
s9urs/Kk/tbQhsEvu0X8FyGwo0zH6rG8apTFTlac+v4mJ4vlpxSvT5+FW2lgLISE
+4sM7kp0qO3/p+45HykwBY5iHq3H
-----END PRIVATE KEY-----
`),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var certificate1 = new Flexibleengine.WafCertificate("certificate1", new()
{
Certificate = @"-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUN3w1KX8/T/HWVxZIOdHXPhUOnsAwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
...
dKvZbPEsygYRIjwyhHHUh/YXH8KDI/uu6u6AxDckQ3rP1BkkKXr5NPBGjVgM3ZI=
-----END CERTIFICATE-----
",
PrivateKey = @"-----BEGIN PRIVATE KEY-----
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC+9uwFVenCdPD9
5LWSWMuy4riZW718wxBpYV5Y9N8nM7N0qZLLdpImZrzBbaBldTI+AZGI3Nupuurw
...
s9urs/Kk/tbQhsEvu0X8FyGwo0zH6rG8apTFTlac+v4mJ4vlpxSvT5+FW2lgLISE
+4sM7kp0qO3/p+45HykwBY5iHq3H
-----END PRIVATE KEY-----
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.WafCertificate;
import com.pulumi.flexibleengine.WafCertificateArgs;
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 certificate1 = new WafCertificate("certificate1", WafCertificateArgs.builder()
.certificate("""
-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUN3w1KX8/T/HWVxZIOdHXPhUOnsAwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
...
dKvZbPEsygYRIjwyhHHUh/YXH8KDI/uu6u6AxDckQ3rP1BkkKXr5NPBGjVgM3ZI=
-----END CERTIFICATE-----
""")
.privateKey("""
-----BEGIN PRIVATE KEY-----
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC+9uwFVenCdPD9
5LWSWMuy4riZW718wxBpYV5Y9N8nM7N0qZLLdpImZrzBbaBldTI+AZGI3Nupuurw
...
s9urs/Kk/tbQhsEvu0X8FyGwo0zH6rG8apTFTlac+v4mJ4vlpxSvT5+FW2lgLISE
+4sM7kp0qO3/p+45HykwBY5iHq3H
-----END PRIVATE KEY-----
""")
.build());
}
}
resources:
certificate1:
type: flexibleengine:WafCertificate
properties:
certificate: |+
-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUN3w1KX8/T/HWVxZIOdHXPhUOnsAwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
...
dKvZbPEsygYRIjwyhHHUh/YXH8KDI/uu6u6AxDckQ3rP1BkkKXr5NPBGjVgM3ZI=
-----END CERTIFICATE-----
privateKey: |+
-----BEGIN PRIVATE KEY-----
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC+9uwFVenCdPD9
5LWSWMuy4riZW718wxBpYV5Y9N8nM7N0qZLLdpImZrzBbaBldTI+AZGI3Nupuurw
...
s9urs/Kk/tbQhsEvu0X8FyGwo0zH6rG8apTFTlac+v4mJ4vlpxSvT5+FW2lgLISE
+4sM7kp0qO3/p+45HykwBY5iHq3H
-----END PRIVATE KEY-----
Create WafCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafCertificate(name: string, args: WafCertificateArgs, opts?: CustomResourceOptions);
@overload
def WafCertificate(resource_name: str,
args: WafCertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WafCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
certificate: Optional[str] = None,
private_key: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[WafCertificateTimeoutsArgs] = None,
waf_certificate_id: Optional[str] = None)
func NewWafCertificate(ctx *Context, name string, args WafCertificateArgs, opts ...ResourceOption) (*WafCertificate, error)
public WafCertificate(string name, WafCertificateArgs args, CustomResourceOptions? opts = null)
public WafCertificate(String name, WafCertificateArgs args)
public WafCertificate(String name, WafCertificateArgs args, CustomResourceOptions options)
type: flexibleengine:WafCertificate
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 WafCertificateArgs
- 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 WafCertificateArgs
- 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 WafCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafCertificateArgs
- 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 wafCertificateResource = new Flexibleengine.WafCertificate("wafCertificateResource", new()
{
Certificate = "string",
PrivateKey = "string",
Name = "string",
Region = "string",
Timeouts = new Flexibleengine.Inputs.WafCertificateTimeoutsArgs
{
Create = "string",
Delete = "string",
},
WafCertificateId = "string",
});
example, err := flexibleengine.NewWafCertificate(ctx, "wafCertificateResource", &flexibleengine.WafCertificateArgs{
Certificate: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &flexibleengine.WafCertificateTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
WafCertificateId: pulumi.String("string"),
})
var wafCertificateResource = new WafCertificate("wafCertificateResource", WafCertificateArgs.builder()
.certificate("string")
.privateKey("string")
.name("string")
.region("string")
.timeouts(WafCertificateTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.wafCertificateId("string")
.build());
waf_certificate_resource = flexibleengine.WafCertificate("wafCertificateResource",
certificate="string",
private_key="string",
name="string",
region="string",
timeouts={
"create": "string",
"delete": "string",
},
waf_certificate_id="string")
const wafCertificateResource = new flexibleengine.WafCertificate("wafCertificateResource", {
certificate: "string",
privateKey: "string",
name: "string",
region: "string",
timeouts: {
create: "string",
"delete": "string",
},
wafCertificateId: "string",
});
type: flexibleengine:WafCertificate
properties:
certificate: string
name: string
privateKey: string
region: string
timeouts:
create: string
delete: string
wafCertificateId: string
WafCertificate 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 WafCertificate resource accepts the following input properties:
- Certificate string
- Specifies the certificate content. Changing this creates a new certificate.
- Private
Key string - Specifies the private key. Changing this creates a new certificate.
- Name string
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - Region string
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- Timeouts
Waf
Certificate Timeouts - Waf
Certificate stringId - The certificate ID in UUID format.
- Certificate string
- Specifies the certificate content. Changing this creates a new certificate.
- Private
Key string - Specifies the private key. Changing this creates a new certificate.
- Name string
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - Region string
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- Timeouts
Waf
Certificate Timeouts Args - Waf
Certificate stringId - The certificate ID in UUID format.
- certificate String
- Specifies the certificate content. Changing this creates a new certificate.
- private
Key String - Specifies the private key. Changing this creates a new certificate.
- name String
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - region String
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- timeouts
Waf
Certificate Timeouts - waf
Certificate StringId - The certificate ID in UUID format.
- certificate string
- Specifies the certificate content. Changing this creates a new certificate.
- private
Key string - Specifies the private key. Changing this creates a new certificate.
- name string
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - region string
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- timeouts
Waf
Certificate Timeouts - waf
Certificate stringId - The certificate ID in UUID format.
- certificate str
- Specifies the certificate content. Changing this creates a new certificate.
- private_
key str - Specifies the private key. Changing this creates a new certificate.
- name str
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - region str
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- timeouts
Waf
Certificate Timeouts Args - waf_
certificate_ strid - The certificate ID in UUID format.
- certificate String
- Specifies the certificate content. Changing this creates a new certificate.
- private
Key String - Specifies the private key. Changing this creates a new certificate.
- name String
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - region String
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- timeouts Property Map
- waf
Certificate StringId - The certificate ID in UUID format.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafCertificate resource produces the following output properties:
- Expiration string
- Indicates the time when the certificate expires.
- Id string
- The provider-assigned unique ID for this managed resource.
- Expiration string
- Indicates the time when the certificate expires.
- Id string
- The provider-assigned unique ID for this managed resource.
- expiration String
- Indicates the time when the certificate expires.
- id String
- The provider-assigned unique ID for this managed resource.
- expiration string
- Indicates the time when the certificate expires.
- id string
- The provider-assigned unique ID for this managed resource.
- expiration str
- Indicates the time when the certificate expires.
- id str
- The provider-assigned unique ID for this managed resource.
- expiration String
- Indicates the time when the certificate expires.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing WafCertificate Resource
Get an existing WafCertificate 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?: WafCertificateState, opts?: CustomResourceOptions): WafCertificate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
certificate: Optional[str] = None,
expiration: Optional[str] = None,
name: Optional[str] = None,
private_key: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[WafCertificateTimeoutsArgs] = None,
waf_certificate_id: Optional[str] = None) -> WafCertificate
func GetWafCertificate(ctx *Context, name string, id IDInput, state *WafCertificateState, opts ...ResourceOption) (*WafCertificate, error)
public static WafCertificate Get(string name, Input<string> id, WafCertificateState? state, CustomResourceOptions? opts = null)
public static WafCertificate get(String name, Output<String> id, WafCertificateState state, CustomResourceOptions options)
resources: _: type: flexibleengine:WafCertificate get: id: ${id}
- 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
- Specifies the certificate content. Changing this creates a new certificate.
- Expiration string
- Indicates the time when the certificate expires.
- Name string
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - Private
Key string - Specifies the private key. Changing this creates a new certificate.
- Region string
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- Timeouts
Waf
Certificate Timeouts - Waf
Certificate stringId - The certificate ID in UUID format.
- Certificate string
- Specifies the certificate content. Changing this creates a new certificate.
- Expiration string
- Indicates the time when the certificate expires.
- Name string
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - Private
Key string - Specifies the private key. Changing this creates a new certificate.
- Region string
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- Timeouts
Waf
Certificate Timeouts Args - Waf
Certificate stringId - The certificate ID in UUID format.
- certificate String
- Specifies the certificate content. Changing this creates a new certificate.
- expiration String
- Indicates the time when the certificate expires.
- name String
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - private
Key String - Specifies the private key. Changing this creates a new certificate.
- region String
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- timeouts
Waf
Certificate Timeouts - waf
Certificate StringId - The certificate ID in UUID format.
- certificate string
- Specifies the certificate content. Changing this creates a new certificate.
- expiration string
- Indicates the time when the certificate expires.
- name string
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - private
Key string - Specifies the private key. Changing this creates a new certificate.
- region string
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- timeouts
Waf
Certificate Timeouts - waf
Certificate stringId - The certificate ID in UUID format.
- certificate str
- Specifies the certificate content. Changing this creates a new certificate.
- expiration str
- Indicates the time when the certificate expires.
- name str
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - private_
key str - Specifies the private key. Changing this creates a new certificate.
- region str
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- timeouts
Waf
Certificate Timeouts Args - waf_
certificate_ strid - The certificate ID in UUID format.
- certificate String
- Specifies the certificate content. Changing this creates a new certificate.
- expiration String
- Indicates the time when the certificate expires.
- name String
- Specifies the certificate name. The maximum length is 256 characters.
Only digits, letters, underscores(
_
), and hyphens(-
) are allowed. - private
Key String - Specifies the private key. Changing this creates a new certificate.
- region String
- Specifies the region in which to create the certificate resource. If omitted, the provider-level region will be used. Changing this will create a new certificate resource.
- timeouts Property Map
- waf
Certificate StringId - The certificate ID in UUID format.
Supporting Types
WafCertificateTimeouts, WafCertificateTimeoutsArgs
Import
Certificates can be imported using the id
, e.g.
$ pulumi import flexibleengine:index/wafCertificate:WafCertificate cert_1 9251a0ed5aa640b68a35cf2eb6a3b733
Note that the imported state is not identical to your resource definition, due to security reason.
The missing attributes include certificate
, and private_key
. You can ignore changes as below.
hcl
resource “flexibleengine_waf_certificate” “cert_1” {
...
lifecycle {
ignore_changes = [
certificate, private_key,
]
}
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.