UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

204 lines • 9.1 kB
"use strict"; // *** 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.KeystoresAliasesSelfSignedCert = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * An Environment Keystore Alias for Self Signed Certificate Format in Apigee * * To get more information about KeystoresAliasesSelfSignedCert, see: * * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases/create) * * How-to Guides * * [Creating an environment](https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment) * * ## Example Usage * * ### Apigee Env Keystore Alias Self Signed Cert * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = new gcp.organizations.Project("project", { * projectId: "my-project", * name: "my-project", * orgId: "123456789", * billingAccount: "000000-0000000-0000000-000000", * deletionPolicy: "DELETE", * }); * const apigee = new gcp.projects.Service("apigee", { * project: project.projectId, * service: "apigee.googleapis.com", * }); * const servicenetworking = new gcp.projects.Service("servicenetworking", { * project: project.projectId, * service: "servicenetworking.googleapis.com", * }, { * dependsOn: [apigee], * }); * const compute = new gcp.projects.Service("compute", { * project: project.projectId, * service: "compute.googleapis.com", * }, { * dependsOn: [servicenetworking], * }); * const apigeeNetwork = new gcp.compute.Network("apigee_network", { * name: "apigee-network", * project: project.projectId, * }, { * dependsOn: [compute], * }); * const apigeeRange = new gcp.compute.GlobalAddress("apigee_range", { * name: "apigee-range", * purpose: "VPC_PEERING", * addressType: "INTERNAL", * prefixLength: 16, * network: apigeeNetwork.id, * project: project.projectId, * }); * const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigee_vpc_connection", { * network: apigeeNetwork.id, * service: "servicenetworking.googleapis.com", * reservedPeeringRanges: [apigeeRange.name], * }, { * dependsOn: [servicenetworking], * }); * const apigeeOrg = new gcp.apigee.Organization("apigee_org", { * analyticsRegion: "us-central1", * projectId: project.projectId, * authorizedNetwork: apigeeNetwork.id, * }, { * dependsOn: [ * apigeeVpcConnection, * apigee, * ], * }); * const apigeeEnvironmentKeystoreSsAlias = new gcp.apigee.Environment("apigee_environment_keystore_ss_alias", { * orgId: apigeeOrg.id, * name: "env-name", * description: "Apigee Environment", * displayName: "environment-1", * }); * const apigeeEnvironmentKeystoreAlias = new gcp.apigee.EnvKeystore("apigee_environment_keystore_alias", { * name: "env-keystore", * envId: apigeeEnvironmentKeystoreSsAlias.id, * }); * const apigeeEnvironmentKeystoreSsAliasKeystoresAliasesSelfSignedCert = new gcp.apigee.KeystoresAliasesSelfSignedCert("apigee_environment_keystore_ss_alias", { * environment: apigeeEnvironmentKeystoreSsAlias.name, * orgId: apigeeOrg.name, * keystore: apigeeEnvironmentKeystoreAlias.name, * alias: "alias", * keySize: "1024", * sigAlg: "SHA512withRSA", * certValidityInDays: 4, * subject: { * commonName: "selfsigned_example", * countryCode: "US", * locality: "TX", * org: "CCE", * orgUnit: "PSO", * }, * }); * ``` * * ## Import * * KeystoresAliasesSelfSignedCert can be imported using any of these accepted formats: * * * `organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}}` * * * `{{org_id}}/{{environment}}/{{keystore}}/{{alias}}` * * When using the `pulumi import` command, KeystoresAliasesSelfSignedCert can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:apigee/keystoresAliasesSelfSignedCert:KeystoresAliasesSelfSignedCert default organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}} * ``` * * ```sh * $ pulumi import gcp:apigee/keystoresAliasesSelfSignedCert:KeystoresAliasesSelfSignedCert default {{org_id}}/{{environment}}/{{keystore}}/{{alias}} * ``` */ class KeystoresAliasesSelfSignedCert extends pulumi.CustomResource { /** * Get an existing KeystoresAliasesSelfSignedCert 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 KeystoresAliasesSelfSignedCert(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of KeystoresAliasesSelfSignedCert. 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'] === KeystoresAliasesSelfSignedCert.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["alias"] = state ? state.alias : undefined; resourceInputs["certValidityInDays"] = state ? state.certValidityInDays : undefined; resourceInputs["certsInfos"] = state ? state.certsInfos : undefined; resourceInputs["environment"] = state ? state.environment : undefined; resourceInputs["keySize"] = state ? state.keySize : undefined; resourceInputs["keystore"] = state ? state.keystore : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["sigAlg"] = state ? state.sigAlg : undefined; resourceInputs["subject"] = state ? state.subject : undefined; resourceInputs["subjectAlternativeDnsNames"] = state ? state.subjectAlternativeDnsNames : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.alias === undefined) && !opts.urn) { throw new Error("Missing required property 'alias'"); } if ((!args || args.environment === undefined) && !opts.urn) { throw new Error("Missing required property 'environment'"); } if ((!args || args.keystore === undefined) && !opts.urn) { throw new Error("Missing required property 'keystore'"); } if ((!args || args.orgId === undefined) && !opts.urn) { throw new Error("Missing required property 'orgId'"); } if ((!args || args.sigAlg === undefined) && !opts.urn) { throw new Error("Missing required property 'sigAlg'"); } if ((!args || args.subject === undefined) && !opts.urn) { throw new Error("Missing required property 'subject'"); } resourceInputs["alias"] = args ? args.alias : undefined; resourceInputs["certValidityInDays"] = args ? args.certValidityInDays : undefined; resourceInputs["environment"] = args ? args.environment : undefined; resourceInputs["keySize"] = args ? args.keySize : undefined; resourceInputs["keystore"] = args ? args.keystore : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["sigAlg"] = args ? args.sigAlg : undefined; resourceInputs["subject"] = args ? args.subject : undefined; resourceInputs["subjectAlternativeDnsNames"] = args ? args.subjectAlternativeDnsNames : undefined; resourceInputs["certsInfos"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(KeystoresAliasesSelfSignedCert.__pulumiType, name, resourceInputs, opts); } } exports.KeystoresAliasesSelfSignedCert = KeystoresAliasesSelfSignedCert; /** @internal */ KeystoresAliasesSelfSignedCert.__pulumiType = 'gcp:apigee/keystoresAliasesSelfSignedCert:KeystoresAliasesSelfSignedCert'; //# sourceMappingURL=keystoresAliasesSelfSignedCert.js.map