@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
258 lines • 9.49 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.CaPool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* A CaPool represents a group of CertificateAuthorities that form a trust anchor. A CaPool can be used to manage
* issuance policies for one or more CertificateAuthority resources and to rotate CA certificates in and out of the
* trust anchor.
*
* ## Example Usage
*
* ### Privateca Capool Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.certificateauthority.CaPool("default", {
* name: "my-pool",
* location: "us-central1",
* tier: "ENTERPRISE",
* publishingOptions: {
* publishCaCert: true,
* publishCrl: true,
* },
* labels: {
* foo: "bar",
* },
* });
* ```
* ### Privateca Capool All Fields
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.certificateauthority.CaPool("default", {
* name: "my-pool",
* location: "us-central1",
* tier: "ENTERPRISE",
* publishingOptions: {
* publishCaCert: false,
* publishCrl: true,
* encodingFormat: "PEM",
* },
* labels: {
* foo: "bar",
* },
* issuancePolicy: {
* allowedKeyTypes: [
* {
* ellipticCurve: {
* signatureAlgorithm: "ECDSA_P256",
* },
* },
* {
* rsa: {
* minModulusSize: "5",
* maxModulusSize: "10",
* },
* },
* ],
* maximumLifetime: "50000s",
* allowedIssuanceModes: {
* allowCsrBasedIssuance: true,
* allowConfigBasedIssuance: true,
* },
* identityConstraints: {
* allowSubjectPassthrough: true,
* allowSubjectAltNamesPassthrough: true,
* celExpression: {
* expression: "subject_alt_names.all(san, san.type == DNS || san.type == EMAIL )",
* title: "My title",
* },
* },
* baselineValues: {
* aiaOcspServers: ["example.com"],
* additionalExtensions: [{
* critical: true,
* value: "asdf",
* objectId: {
* objectIdPaths: [
* 1,
* 7,
* ],
* },
* }],
* policyIds: [
* {
* objectIdPaths: [
* 1,
* 5,
* ],
* },
* {
* objectIdPaths: [
* 1,
* 5,
* 7,
* ],
* },
* ],
* caOptions: {
* isCa: true,
* maxIssuerPathLength: 10,
* },
* keyUsage: {
* baseKeyUsage: {
* digitalSignature: true,
* contentCommitment: true,
* keyEncipherment: false,
* dataEncipherment: true,
* keyAgreement: true,
* certSign: false,
* crlSign: true,
* decipherOnly: true,
* },
* extendedKeyUsage: {
* serverAuth: true,
* clientAuth: false,
* emailProtection: true,
* codeSigning: true,
* timeStamping: true,
* },
* },
* nameConstraints: {
* critical: true,
* permittedDnsNames: [
* "*.example1.com",
* "*.example2.com",
* ],
* excludedDnsNames: [
* "*.deny.example1.com",
* "*.deny.example2.com",
* ],
* permittedIpRanges: [
* "10.0.0.0/8",
* "11.0.0.0/8",
* ],
* excludedIpRanges: [
* "10.1.1.0/24",
* "11.1.1.0/24",
* ],
* permittedEmailAddresses: [
* ".example1.com",
* ".example2.com",
* ],
* excludedEmailAddresses: [
* ".deny.example1.com",
* ".deny.example2.com",
* ],
* permittedUris: [
* ".example1.com",
* ".example2.com",
* ],
* excludedUris: [
* ".deny.example1.com",
* ".deny.example2.com",
* ],
* },
* },
* },
* });
* ```
*
* ## Import
*
* CaPool can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/caPools/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, CaPool can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:certificateauthority/caPool:CaPool default projects/{{project}}/locations/{{location}}/caPools/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:certificateauthority/caPool:CaPool default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:certificateauthority/caPool:CaPool default {{location}}/{{name}}
* ```
*/
class CaPool extends pulumi.CustomResource {
/**
* Get an existing CaPool resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new CaPool(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of CaPool. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === CaPool.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["issuancePolicy"] = state ? state.issuancePolicy : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["publishingOptions"] = state ? state.publishingOptions : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["tier"] = state ? state.tier : undefined;
}
else {
const args = argsOrState;
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.tier === undefined) && !opts.urn) {
throw new Error("Missing required property 'tier'");
}
resourceInputs["issuancePolicy"] = args ? args.issuancePolicy : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["publishingOptions"] = args ? args.publishingOptions : undefined;
resourceInputs["tier"] = args ? args.tier : undefined;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(CaPool.__pulumiType, name, resourceInputs, opts);
}
}
exports.CaPool = CaPool;
/** @internal */
CaPool.__pulumiType = 'gcp:certificateauthority/caPool:CaPool';
//# sourceMappingURL=caPool.js.map