SecurityGateway class
Deployment of Security Gateway.
Example Usage
Beyondcorp Security Gateway Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.beyondcorp.SecurityGateway("example", {
securityGatewayId: "default",
displayName: "My Security Gateway resource",
hubs: [{
region: "us-central1",
}],
});
import pulumi
import pulumi_gcp as gcp
example = gcp.beyondcorp.SecurityGateway("example",
security_gateway_id="default",
display_name="My Security Gateway resource",
hubs=[{
"region": "us-central1",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = new Gcp.Beyondcorp.SecurityGateway("example", new()
{
SecurityGatewayId = "default",
DisplayName = "My Security Gateway resource",
Hubs = new[]
{
new Gcp.Beyondcorp.Inputs.SecurityGatewayHubArgs
{
Region = "us-central1",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/beyondcorp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := beyondcorp.NewSecurityGateway(ctx, "example", &beyondcorp.SecurityGatewayArgs{
SecurityGatewayId: pulumi.String("default"),
DisplayName: pulumi.String("My Security Gateway resource"),
Hubs: beyondcorp.SecurityGatewayHubArray{
&beyondcorp.SecurityGatewayHubArgs{
Region: pulumi.String("us-central1"),
},
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_beyondcorp_securitygateway" "example" {
security_gateway_id = "default"
display_name = "My Security Gateway resource"
hubs {
region = "us-central1"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.beyondcorp.SecurityGateway;
import com.pulumi.gcp.beyondcorp.SecurityGatewayArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayHubArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 SecurityGateway("example", SecurityGatewayArgs.builder()
.securityGatewayId("default")
.displayName("My Security Gateway resource")
.hubs(SecurityGatewayHubArgs.builder()
.region("us-central1")
.build())
.build());
}
}
resources:
example:
type: gcp:beyondcorp:SecurityGateway
properties:
securityGatewayId: default
displayName: My Security Gateway resource
hubs:
- region: us-central1
Beyondcorp Security Gateway Logging
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example_logging = new gcp.beyondcorp.SecurityGateway("example-logging", {
securityGatewayId: "default-logging",
displayName: "My Security Gateway resource with logging enabled",
hubs: [{
region: "us-central1",
}],
logging: {},
});
import pulumi
import pulumi_gcp as gcp
example_logging = gcp.beyondcorp.SecurityGateway("example-logging",
security_gateway_id="default-logging",
display_name="My Security Gateway resource with logging enabled",
hubs=[{
"region": "us-central1",
}],
logging={})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example_logging = new Gcp.Beyondcorp.SecurityGateway("example-logging", new()
{
SecurityGatewayId = "default-logging",
DisplayName = "My Security Gateway resource with logging enabled",
Hubs = new[]
{
new Gcp.Beyondcorp.Inputs.SecurityGatewayHubArgs
{
Region = "us-central1",
},
},
Logging = new() { },
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/beyondcorp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := beyondcorp.NewSecurityGateway(ctx, "example-logging", &beyondcorp.SecurityGatewayArgs{
SecurityGatewayId: pulumi.String("default-logging"),
DisplayName: pulumi.String("My Security Gateway resource with logging enabled"),
Hubs: beyondcorp.SecurityGatewayHubArray{
&beyondcorp.SecurityGatewayHubArgs{
Region: pulumi.String("us-central1"),
},
},
Logging: &beyondcorp.SecurityGatewayLoggingArgs{},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_beyondcorp_securitygateway" "example-logging" {
security_gateway_id = "default-logging"
display_name = "My Security Gateway resource with logging enabled"
hubs {
region = "us-central1"
}
logging = {}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.beyondcorp.SecurityGateway;
import com.pulumi.gcp.beyondcorp.SecurityGatewayArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayHubArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayLoggingArgs;
import java.util.ArrayList;
import java.util.Arrays;
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_logging = new SecurityGateway("example-logging", SecurityGatewayArgs.builder()
.securityGatewayId("default-logging")
.displayName("My Security Gateway resource with logging enabled")
.hubs(SecurityGatewayHubArgs.builder()
.region("us-central1")
.build())
.logging(SecurityGatewayLoggingArgs.builder()
.build())
.build());
}
}
resources:
example-logging:
type: gcp:beyondcorp:SecurityGateway
properties:
securityGatewayId: default-logging
displayName: My Security Gateway resource with logging enabled
hubs:
- region: us-central1
logging: {}
Beyondcorp Security Gateway Spa
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example_spa = new gcp.beyondcorp.SecurityGateway("example-spa", {
securityGatewayId: "default-spa",
displayName: "My SPA Security Gateway resource",
proxyProtocolConfig: {
allowedClientHeaders: [
"header1",
"header2",
],
contextualHeaders: {
userInfo: {
outputType: "PROTOBUF",
},
groupInfo: {
outputType: "JSON",
},
deviceInfo: {
outputType: "NONE",
},
outputType: "NONE",
},
metadataHeaders: {
"metadata-header1": "value1",
"metadata-header2": "value2",
},
gatewayIdentity: "RESOURCE_NAME",
clientIp: true,
},
serviceDiscovery: {
apiGateway: {
resourceOverride: {
path: "/api/v1/routes",
},
},
},
});
import pulumi
import pulumi_gcp as gcp
example_spa = gcp.beyondcorp.SecurityGateway("example-spa",
security_gateway_id="default-spa",
display_name="My SPA Security Gateway resource",
proxy_protocol_config={
"allowed_client_headers": [
"header1",
"header2",
],
"contextual_headers": {
"user_info": {
"output_type": "PROTOBUF",
},
"group_info": {
"output_type": "JSON",
},
"device_info": {
"output_type": "NONE",
},
"output_type": "NONE",
},
"metadata_headers": {
"metadata-header1": "value1",
"metadata-header2": "value2",
},
"gateway_identity": "RESOURCE_NAME",
"client_ip": True,
},
service_discovery={
"api_gateway": {
"resource_override": {
"path": "/api/v1/routes",
},
},
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example_spa = new Gcp.Beyondcorp.SecurityGateway("example-spa", new()
{
SecurityGatewayId = "default-spa",
DisplayName = "My SPA Security Gateway resource",
ProxyProtocolConfig = new Gcp.Beyondcorp.Inputs.SecurityGatewayProxyProtocolConfigArgs
{
AllowedClientHeaders = new[]
{
"header1",
"header2",
},
ContextualHeaders = new Gcp.Beyondcorp.Inputs.SecurityGatewayProxyProtocolConfigContextualHeadersArgs
{
UserInfo = new Gcp.Beyondcorp.Inputs.SecurityGatewayProxyProtocolConfigContextualHeadersUserInfoArgs
{
OutputType = "PROTOBUF",
},
GroupInfo = new Gcp.Beyondcorp.Inputs.SecurityGatewayProxyProtocolConfigContextualHeadersGroupInfoArgs
{
OutputType = "JSON",
},
DeviceInfo = new Gcp.Beyondcorp.Inputs.SecurityGatewayProxyProtocolConfigContextualHeadersDeviceInfoArgs
{
OutputType = "NONE",
},
OutputType = "NONE",
},
MetadataHeaders =
{
{ "metadata-header1", "value1" },
{ "metadata-header2", "value2" },
},
GatewayIdentity = "RESOURCE_NAME",
ClientIp = true,
},
ServiceDiscovery = new Gcp.Beyondcorp.Inputs.SecurityGatewayServiceDiscoveryArgs
{
ApiGateway = new Gcp.Beyondcorp.Inputs.SecurityGatewayServiceDiscoveryApiGatewayArgs
{
ResourceOverride = new Gcp.Beyondcorp.Inputs.SecurityGatewayServiceDiscoveryApiGatewayResourceOverrideArgs
{
Path = "/api/v1/routes",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/beyondcorp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := beyondcorp.NewSecurityGateway(ctx, "example-spa", &beyondcorp.SecurityGatewayArgs{
SecurityGatewayId: pulumi.String("default-spa"),
DisplayName: pulumi.String("My SPA Security Gateway resource"),
ProxyProtocolConfig: &beyondcorp.SecurityGatewayProxyProtocolConfigArgs{
AllowedClientHeaders: pulumi.StringArray{
pulumi.String("header1"),
pulumi.String("header2"),
},
ContextualHeaders: &beyondcorp.SecurityGatewayProxyProtocolConfigContextualHeadersArgs{
UserInfo: &beyondcorp.SecurityGatewayProxyProtocolConfigContextualHeadersUserInfoArgs{
OutputType: pulumi.String("PROTOBUF"),
},
GroupInfo: &beyondcorp.SecurityGatewayProxyProtocolConfigContextualHeadersGroupInfoArgs{
OutputType: pulumi.String("JSON"),
},
DeviceInfo: &beyondcorp.SecurityGatewayProxyProtocolConfigContextualHeadersDeviceInfoArgs{
OutputType: pulumi.String("NONE"),
},
OutputType: pulumi.String("NONE"),
},
MetadataHeaders: pulumi.StringMap{
"metadata-header1": pulumi.String("value1"),
"metadata-header2": pulumi.String("value2"),
},
GatewayIdentity: pulumi.String("RESOURCE_NAME"),
ClientIp: pulumi.Bool(true),
},
ServiceDiscovery: &beyondcorp.SecurityGatewayServiceDiscoveryArgs{
ApiGateway: &beyondcorp.SecurityGatewayServiceDiscoveryApiGatewayArgs{
ResourceOverride: &beyondcorp.SecurityGatewayServiceDiscoveryApiGatewayResourceOverrideArgs{
Path: pulumi.String("/api/v1/routes"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_beyondcorp_securitygateway" "example-spa" {
security_gateway_id = "default-spa"
display_name = "My SPA Security Gateway resource"
proxy_protocol_config = {
allowed_client_headers = ["header1", "header2"]
contextual_headers = {
user_info = {
output_type = "PROTOBUF"
}
group_info = {
output_type = "JSON"
}
device_info = {
output_type = "NONE"
}
output_type = "NONE"
}
metadata_headers = {
"metadata-header1" = "value1"
"metadata-header2" = "value2"
}
gateway_identity = "RESOURCE_NAME"
client_ip = true
}
service_discovery = {
api_gateway = {
resource_override = {
path = "/api/v1/routes"
}
}
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.beyondcorp.SecurityGateway;
import com.pulumi.gcp.beyondcorp.SecurityGatewayArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayProxyProtocolConfigArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayProxyProtocolConfigContextualHeadersArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayProxyProtocolConfigContextualHeadersUserInfoArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayProxyProtocolConfigContextualHeadersGroupInfoArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayProxyProtocolConfigContextualHeadersDeviceInfoArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayServiceDiscoveryArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayServiceDiscoveryApiGatewayArgs;
import com.pulumi.gcp.beyondcorp.inputs.SecurityGatewayServiceDiscoveryApiGatewayResourceOverrideArgs;
import java.util.ArrayList;
import java.util.Arrays;
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_spa = new SecurityGateway("example-spa", SecurityGatewayArgs.builder()
.securityGatewayId("default-spa")
.displayName("My SPA Security Gateway resource")
.proxyProtocolConfig(SecurityGatewayProxyProtocolConfigArgs.builder()
.allowedClientHeaders(
"header1",
"header2")
.contextualHeaders(SecurityGatewayProxyProtocolConfigContextualHeadersArgs.builder()
.userInfo(SecurityGatewayProxyProtocolConfigContextualHeadersUserInfoArgs.builder()
.outputType("PROTOBUF")
.build())
.groupInfo(SecurityGatewayProxyProtocolConfigContextualHeadersGroupInfoArgs.builder()
.outputType("JSON")
.build())
.deviceInfo(SecurityGatewayProxyProtocolConfigContextualHeadersDeviceInfoArgs.builder()
.outputType("NONE")
.build())
.outputType("NONE")
.build())
.metadataHeaders(Map.ofEntries(
Map.entry("metadata-header1", "value1"),
Map.entry("metadata-header2", "value2")
))
.gatewayIdentity("RESOURCE_NAME")
.clientIp(true)
.build())
.serviceDiscovery(SecurityGatewayServiceDiscoveryArgs.builder()
.apiGateway(SecurityGatewayServiceDiscoveryApiGatewayArgs.builder()
.resourceOverride(SecurityGatewayServiceDiscoveryApiGatewayResourceOverrideArgs.builder()
.path("/api/v1/routes")
.build())
.build())
.build())
.build());
}
}
resources:
example-spa:
type: gcp:beyondcorp:SecurityGateway
properties:
securityGatewayId: default-spa
displayName: My SPA Security Gateway resource
proxyProtocolConfig:
allowedClientHeaders:
- header1
- header2
contextualHeaders:
userInfo:
outputType: PROTOBUF
groupInfo:
outputType: JSON
deviceInfo:
outputType: NONE
outputType: NONE
metadataHeaders:
metadata-header1: value1
metadata-header2: value2
gatewayIdentity: RESOURCE_NAME
clientIp: true
serviceDiscovery:
apiGateway:
resourceOverride:
path: /api/v1/routes
Import
SecurityGateway can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}}{{project}}/{{location}}/{{security_gateway_id}}{{location}}/{{security_gateway_id}}
When using the pulumi import command, SecurityGateway can be imported using one of the formats above. For example:
$ pulumi import gcp:beyondcorp/securityGateway:SecurityGateway default projects/{{project}}/locations/{{location}}/securityGateways/{{security_gateway_id}}
$ pulumi import gcp:beyondcorp/securityGateway:SecurityGateway default {{project}}/{{location}}/{{security_gateway_id}}
$ pulumi import gcp:beyondcorp/securityGateway:SecurityGateway default {{location}}/{{security_gateway_id}}
Constructors
- SecurityGateway(String name, {SecurityGatewayArgs? args, CustomResourceOptions? options})
-
Creates a new SecurityGateway.
nameThe Pulumi resource name.argsArguments used to configure this SecurityGateway. The set of arguments for SecurityGateway.optionsResource options controlling this resource's behavior. - SecurityGateway.reference(String urn)
- Creates a typed reference to an existing SecurityGateway resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createTime
↔ Output<
String> -
Output only. Timestamp when the resource was created.
latefinal
-
delegatingServiceAccount
↔ Output<
String> -
Service account used for operations that involve resources in consumer projects.
latefinal
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
displayName
↔ Output<
String?> -
Optional. An arbitrary user-provided name for the SecurityGateway.
Cannot exceed 64 characters.
latefinal
-
externalIps
↔ Output<
List< String> > -
Output only. IP addresses that will be used for establishing
connection to the endpoints.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hubs
↔ Output<
List< SecurityGatewayHub> ?> -
Optional. Map of Hubs that represents regional data path deployment with GCP region
as a key.
Structure is documented below.
latefinal
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
location
↔ Output<
String?> -
(Optional, Deprecated)
Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. Must be omitted or set toglobal.latefinal -
logging
↔ Output<
Map< String, dynamic> ?> -
Settings related to Cloud Logging.
latefinal
-
name
↔ Output<
String> -
Identifier. Name of the resource.
latefinal
-
project
↔ Output<
String> -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
latefinal
-
proxyProtocolConfig
↔ Output<
SecurityGatewayProxyProtocolConfig?> -
Shared proxy configuration for all apps.
Structure is documented below.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
securityGatewayId
↔ Output<
String> -
Optional. User-settable SecurityGateway resource ID.
latefinal
-
serviceDiscovery
↔ Output<
SecurityGatewayServiceDiscovery?> -
Settings related to the Service Discovery.
Structure is documented below.
latefinal
-
state
↔ Output<
String> -
Output only. The operational state of the SecurityGateway.
Possible values:
STATE_UNSPECIFIED
CREATING
UPDATING
DELETING
RUNNING
DOWN
ERROR
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
updateTime
↔ Output<
String> -
Output only. Timestamp when the resource was last modified.
latefinal
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {SecurityGatewayState? state, CustomResourceOptions? options}) → SecurityGateway -
Gets an existing SecurityGateway resource's state with the given
nameandid.