@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
206 lines • 7.64 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Settings = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* IAP settings - manage IAP settings
*
* To get more information about Settings, see:
*
* * [API documentation](https://cloud.google.com/iap/docs/reference/rest/v1/IapSettings)
* * How-to Guides
* * [Customizing IAP](https://cloud.google.com/iap/docs/customizing)
*
* ## Example Usage
*
* ### Iap Settings Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const defaultHealthCheck = new gcp.compute.HealthCheck("default", {
* name: "iap-bs-health-check",
* checkIntervalSec: 1,
* timeoutSec: 1,
* tcpHealthCheck: {
* port: 80,
* },
* });
* const _default = new gcp.compute.RegionBackendService("default", {
* name: "iap-settings-tf",
* region: "us-central1",
* healthChecks: defaultHealthCheck.id,
* connectionDrainingTimeoutSec: 10,
* sessionAffinity: "CLIENT_IP",
* });
* const iapSettings = new gcp.iap.Settings("iap_settings", {
* name: pulumi.all([project, _default.name]).apply(([project, name]) => `projects/${project.number}/iap_web/compute-us-central1/services/${name}`),
* accessSettings: {
* identitySources: ["WORKFORCE_IDENTITY_FEDERATION"],
* allowedDomainsSettings: {
* domains: ["test.abc.com"],
* enable: true,
* },
* corsSettings: {
* allowHttpOptions: true,
* },
* reauthSettings: {
* method: "SECURE_KEY",
* maxAge: "305s",
* policyType: "MINIMUM",
* },
* gcipSettings: {
* loginPageUri: "https://test.com/?apiKey=abc",
* },
* oauthSettings: {
* loginHint: "test",
* },
* workforceIdentitySettings: {
* workforcePools: "wif-pool",
* oauth2: {
* clientId: "test-client-id",
* clientSecret: "test-client-secret",
* },
* },
* },
* applicationSettings: {
* cookieDomain: "test.abc.com",
* csmSettings: {
* rctokenAud: "test-aud-set",
* },
* accessDeniedPageSettings: {
* accessDeniedPageUri: "test-uri",
* generateTroubleshootingUri: true,
* remediationTokenGenerationEnabled: false,
* },
* attributePropagationSettings: {
* outputCredentials: ["HEADER"],
* expression: "attributes.saml_attributes.filter(attribute, attribute.name in [\"test1\", \"test2\"])",
* enable: false,
* },
* },
* });
* ```
* ### Iap Settings Oauth Storage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const defaultHealthCheck = new gcp.compute.HealthCheck("default", {
* name: "iap-bs-health-check-oauth",
* checkIntervalSec: 1,
* timeoutSec: 1,
* tcpHealthCheck: {
* port: 80,
* },
* });
* const _default = new gcp.compute.RegionBackendService("default", {
* name: "iap-settings-oauth",
* region: "us-central1",
* healthChecks: defaultHealthCheck.id,
* connectionDrainingTimeoutSec: 10,
* sessionAffinity: "CLIENT_IP",
* });
* const iapSettingsOauth = new gcp.iap.Settings("iap_settings_oauth", {
* name: pulumi.all([project, _default.name]).apply(([project, name]) => `projects/${project.number}/iap_web/compute-us-central1/services/${name}`),
* accessSettings: {
* oauthSettings: {
* clientId: "test-client-id",
* clientSecret: "test-client-secret",
* },
* },
* });
* ```
*
* ## Import
*
* Settings can be imported using any of these accepted formats:
*
* * `{{name}}/iapSettings`
* * `{{name}}`
*
* When using the `pulumi import` command, Settings can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:iap/settings:Settings default {{name}}/iapSettings
* $ pulumi import gcp:iap/settings:Settings default {{name}}
* ```
*/
class Settings extends pulumi.CustomResource {
/**
* Get an existing Settings 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 Settings(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:iap/settings:Settings';
/**
* Returns true if the given object is an instance of Settings. 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'] === Settings.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessSettings"] = state?.accessSettings;
resourceInputs["applicationSettings"] = state?.applicationSettings;
resourceInputs["deletionPolicy"] = state?.deletionPolicy;
resourceInputs["name"] = state?.name;
}
else {
const args = argsOrState;
resourceInputs["accessSettings"] = args?.accessSettings;
resourceInputs["applicationSettings"] = args?.applicationSettings;
resourceInputs["deletionPolicy"] = args?.deletionPolicy;
resourceInputs["name"] = args?.name;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Settings.__pulumiType, name, resourceInputs, opts);
}
}
exports.Settings = Settings;
//# sourceMappingURL=settings.js.map