harness.autostopping.GcpProxy
Explore with Pulumi AI
Resource for creating an GCP Autostopping proxy
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const test = new harness.autostopping.GcpProxy("test", {
name: "name",
cloudConnectorId: "cloud_connector_id",
hostName: "host_name",
region: "region",
vpc: "https://www.googleapis.com/compute/v1/projects/project_id/global/networks/netwok_id",
zone: "zone",
securityGroups: ["http-server"],
machineType: "e2-micro",
subnetId: "https://www.googleapis.com/compute/v1/projects/project_id/regions/region/subnetworks/subnet_name",
apiKey: "",
allocateStaticIp: false,
certificates: {
keySecretId: "projects/project_id/secrets/secret_id/versions/1",
certSecretId: "projects/project_id/secrets/secret_id/versions/1",
},
deleteCloudResourcesOnDestroy: false,
});
import pulumi
import pulumi_harness as harness
test = harness.autostopping.GcpProxy("test",
name="name",
cloud_connector_id="cloud_connector_id",
host_name="host_name",
region="region",
vpc="https://www.googleapis.com/compute/v1/projects/project_id/global/networks/netwok_id",
zone="zone",
security_groups=["http-server"],
machine_type="e2-micro",
subnet_id="https://www.googleapis.com/compute/v1/projects/project_id/regions/region/subnetworks/subnet_name",
api_key="",
allocate_static_ip=False,
certificates={
"key_secret_id": "projects/project_id/secrets/secret_id/versions/1",
"cert_secret_id": "projects/project_id/secrets/secret_id/versions/1",
},
delete_cloud_resources_on_destroy=False)
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/autostopping"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := autostopping.NewGcpProxy(ctx, "test", &autostopping.GcpProxyArgs{
Name: pulumi.String("name"),
CloudConnectorId: pulumi.String("cloud_connector_id"),
HostName: pulumi.String("host_name"),
Region: pulumi.String("region"),
Vpc: pulumi.String("https://www.googleapis.com/compute/v1/projects/project_id/global/networks/netwok_id"),
Zone: pulumi.String("zone"),
SecurityGroups: pulumi.StringArray{
pulumi.String("http-server"),
},
MachineType: pulumi.String("e2-micro"),
SubnetId: pulumi.String("https://www.googleapis.com/compute/v1/projects/project_id/regions/region/subnetworks/subnet_name"),
ApiKey: pulumi.String(""),
AllocateStaticIp: pulumi.Bool(false),
Certificates: &autostopping.GcpProxyCertificatesArgs{
KeySecretId: pulumi.String("projects/project_id/secrets/secret_id/versions/1"),
CertSecretId: pulumi.String("projects/project_id/secrets/secret_id/versions/1"),
},
DeleteCloudResourcesOnDestroy: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var test = new Harness.Autostopping.GcpProxy("test", new()
{
Name = "name",
CloudConnectorId = "cloud_connector_id",
HostName = "host_name",
Region = "region",
Vpc = "https://www.googleapis.com/compute/v1/projects/project_id/global/networks/netwok_id",
Zone = "zone",
SecurityGroups = new[]
{
"http-server",
},
MachineType = "e2-micro",
SubnetId = "https://www.googleapis.com/compute/v1/projects/project_id/regions/region/subnetworks/subnet_name",
ApiKey = "",
AllocateStaticIp = false,
Certificates = new Harness.Autostopping.Inputs.GcpProxyCertificatesArgs
{
KeySecretId = "projects/project_id/secrets/secret_id/versions/1",
CertSecretId = "projects/project_id/secrets/secret_id/versions/1",
},
DeleteCloudResourcesOnDestroy = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.autostopping.GcpProxy;
import com.pulumi.harness.autostopping.GcpProxyArgs;
import com.pulumi.harness.autostopping.inputs.GcpProxyCertificatesArgs;
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 test = new GcpProxy("test", GcpProxyArgs.builder()
.name("name")
.cloudConnectorId("cloud_connector_id")
.hostName("host_name")
.region("region")
.vpc("https://www.googleapis.com/compute/v1/projects/project_id/global/networks/netwok_id")
.zone("zone")
.securityGroups("http-server")
.machineType("e2-micro")
.subnetId("https://www.googleapis.com/compute/v1/projects/project_id/regions/region/subnetworks/subnet_name")
.apiKey("")
.allocateStaticIp(false)
.certificates(GcpProxyCertificatesArgs.builder()
.keySecretId("projects/project_id/secrets/secret_id/versions/1")
.certSecretId("projects/project_id/secrets/secret_id/versions/1")
.build())
.deleteCloudResourcesOnDestroy(false)
.build());
}
}
resources:
test:
type: harness:autostopping:GcpProxy
properties:
name: name
cloudConnectorId: cloud_connector_id
hostName: host_name
region: region
vpc: https://www.googleapis.com/compute/v1/projects/project_id/global/networks/netwok_id
zone: zone
securityGroups:
- http-server
machineType: e2-micro
subnetId: https://www.googleapis.com/compute/v1/projects/project_id/regions/region/subnetworks/subnet_name
apiKey:
allocateStaticIp: false
certificates:
keySecretId: projects/project_id/secrets/secret_id/versions/1
certSecretId: projects/project_id/secrets/secret_id/versions/1
deleteCloudResourcesOnDestroy: false
Create GcpProxy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GcpProxy(name: string, args: GcpProxyArgs, opts?: CustomResourceOptions);
@overload
def GcpProxy(resource_name: str,
args: GcpProxyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GcpProxy(resource_name: str,
opts: Optional[ResourceOptions] = None,
machine_type: Optional[str] = None,
api_key: Optional[str] = None,
cloud_connector_id: Optional[str] = None,
delete_cloud_resources_on_destroy: Optional[bool] = None,
host_name: Optional[str] = None,
region: Optional[str] = None,
subnet_id: Optional[str] = None,
vpc: Optional[str] = None,
zone: Optional[str] = None,
certificates: Optional[GcpProxyCertificatesArgs] = None,
allocate_static_ip: Optional[bool] = None,
name: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None)
func NewGcpProxy(ctx *Context, name string, args GcpProxyArgs, opts ...ResourceOption) (*GcpProxy, error)
public GcpProxy(string name, GcpProxyArgs args, CustomResourceOptions? opts = null)
public GcpProxy(String name, GcpProxyArgs args)
public GcpProxy(String name, GcpProxyArgs args, CustomResourceOptions options)
type: harness:autostopping:GcpProxy
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 GcpProxyArgs
- 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 GcpProxyArgs
- 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 GcpProxyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GcpProxyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GcpProxyArgs
- 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 gcpProxyResource = new Harness.Autostopping.GcpProxy("gcpProxyResource", new()
{
MachineType = "string",
ApiKey = "string",
CloudConnectorId = "string",
DeleteCloudResourcesOnDestroy = false,
HostName = "string",
Region = "string",
SubnetId = "string",
Vpc = "string",
Zone = "string",
Certificates = new Harness.Autostopping.Inputs.GcpProxyCertificatesArgs
{
CertSecretId = "string",
KeySecretId = "string",
},
AllocateStaticIp = false,
Name = "string",
SecurityGroups = new[]
{
"string",
},
});
example, err := autostopping.NewGcpProxy(ctx, "gcpProxyResource", &autostopping.GcpProxyArgs{
MachineType: pulumi.String("string"),
ApiKey: pulumi.String("string"),
CloudConnectorId: pulumi.String("string"),
DeleteCloudResourcesOnDestroy: pulumi.Bool(false),
HostName: pulumi.String("string"),
Region: pulumi.String("string"),
SubnetId: pulumi.String("string"),
Vpc: pulumi.String("string"),
Zone: pulumi.String("string"),
Certificates: &autostopping.GcpProxyCertificatesArgs{
CertSecretId: pulumi.String("string"),
KeySecretId: pulumi.String("string"),
},
AllocateStaticIp: pulumi.Bool(false),
Name: pulumi.String("string"),
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
})
var gcpProxyResource = new GcpProxy("gcpProxyResource", GcpProxyArgs.builder()
.machineType("string")
.apiKey("string")
.cloudConnectorId("string")
.deleteCloudResourcesOnDestroy(false)
.hostName("string")
.region("string")
.subnetId("string")
.vpc("string")
.zone("string")
.certificates(GcpProxyCertificatesArgs.builder()
.certSecretId("string")
.keySecretId("string")
.build())
.allocateStaticIp(false)
.name("string")
.securityGroups("string")
.build());
gcp_proxy_resource = harness.autostopping.GcpProxy("gcpProxyResource",
machine_type="string",
api_key="string",
cloud_connector_id="string",
delete_cloud_resources_on_destroy=False,
host_name="string",
region="string",
subnet_id="string",
vpc="string",
zone="string",
certificates={
"cert_secret_id": "string",
"key_secret_id": "string",
},
allocate_static_ip=False,
name="string",
security_groups=["string"])
const gcpProxyResource = new harness.autostopping.GcpProxy("gcpProxyResource", {
machineType: "string",
apiKey: "string",
cloudConnectorId: "string",
deleteCloudResourcesOnDestroy: false,
hostName: "string",
region: "string",
subnetId: "string",
vpc: "string",
zone: "string",
certificates: {
certSecretId: "string",
keySecretId: "string",
},
allocateStaticIp: false,
name: "string",
securityGroups: ["string"],
});
type: harness:autostopping:GcpProxy
properties:
allocateStaticIp: false
apiKey: string
certificates:
certSecretId: string
keySecretId: string
cloudConnectorId: string
deleteCloudResourcesOnDestroy: false
hostName: string
machineType: string
name: string
region: string
securityGroups:
- string
subnetId: string
vpc: string
zone: string
GcpProxy 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 GcpProxy resource accepts the following input properties:
- Api
Key string - Harness NG API key
- Cloud
Connector stringId - Id of the cloud connector
- Delete
Cloud boolResources On Destroy - Host
Name string - Hostname for the proxy
- Machine
Type string - Machine instance type
- Region string
- Region in which cloud resources are hosted
- Subnet
Id string - VPC in which cloud resources are hosted
- Vpc string
- VPC in which cloud resources are hosted
- Zone string
- Zone in which cloud resources are hosted
- Allocate
Static boolIp - Boolean value to indicate if proxy vm needs to have static IP
- Certificates
Gcp
Proxy Certificates - Name string
- Name of the proxy
- Security
Groups List<string> - Security Group to define the security rules that determine the inbound and outbound traffic
- Api
Key string - Harness NG API key
- Cloud
Connector stringId - Id of the cloud connector
- Delete
Cloud boolResources On Destroy - Host
Name string - Hostname for the proxy
- Machine
Type string - Machine instance type
- Region string
- Region in which cloud resources are hosted
- Subnet
Id string - VPC in which cloud resources are hosted
- Vpc string
- VPC in which cloud resources are hosted
- Zone string
- Zone in which cloud resources are hosted
- Allocate
Static boolIp - Boolean value to indicate if proxy vm needs to have static IP
- Certificates
Gcp
Proxy Certificates Args - Name string
- Name of the proxy
- Security
Groups []string - Security Group to define the security rules that determine the inbound and outbound traffic
- api
Key String - Harness NG API key
- cloud
Connector StringId - Id of the cloud connector
- delete
Cloud BooleanResources On Destroy - host
Name String - Hostname for the proxy
- machine
Type String - Machine instance type
- region String
- Region in which cloud resources are hosted
- subnet
Id String - VPC in which cloud resources are hosted
- vpc String
- VPC in which cloud resources are hosted
- zone String
- Zone in which cloud resources are hosted
- allocate
Static BooleanIp - Boolean value to indicate if proxy vm needs to have static IP
- certificates
Gcp
Proxy Certificates - name String
- Name of the proxy
- security
Groups List<String> - Security Group to define the security rules that determine the inbound and outbound traffic
- api
Key string - Harness NG API key
- cloud
Connector stringId - Id of the cloud connector
- delete
Cloud booleanResources On Destroy - host
Name string - Hostname for the proxy
- machine
Type string - Machine instance type
- region string
- Region in which cloud resources are hosted
- subnet
Id string - VPC in which cloud resources are hosted
- vpc string
- VPC in which cloud resources are hosted
- zone string
- Zone in which cloud resources are hosted
- allocate
Static booleanIp - Boolean value to indicate if proxy vm needs to have static IP
- certificates
Gcp
Proxy Certificates - name string
- Name of the proxy
- security
Groups string[] - Security Group to define the security rules that determine the inbound and outbound traffic
- api_
key str - Harness NG API key
- cloud_
connector_ strid - Id of the cloud connector
- delete_
cloud_ boolresources_ on_ destroy - host_
name str - Hostname for the proxy
- machine_
type str - Machine instance type
- region str
- Region in which cloud resources are hosted
- subnet_
id str - VPC in which cloud resources are hosted
- vpc str
- VPC in which cloud resources are hosted
- zone str
- Zone in which cloud resources are hosted
- allocate_
static_ boolip - Boolean value to indicate if proxy vm needs to have static IP
- certificates
Gcp
Proxy Certificates Args - name str
- Name of the proxy
- security_
groups Sequence[str] - Security Group to define the security rules that determine the inbound and outbound traffic
- api
Key String - Harness NG API key
- cloud
Connector StringId - Id of the cloud connector
- delete
Cloud BooleanResources On Destroy - host
Name String - Hostname for the proxy
- machine
Type String - Machine instance type
- region String
- Region in which cloud resources are hosted
- subnet
Id String - VPC in which cloud resources are hosted
- vpc String
- VPC in which cloud resources are hosted
- zone String
- Zone in which cloud resources are hosted
- allocate
Static BooleanIp - Boolean value to indicate if proxy vm needs to have static IP
- certificates Property Map
- name String
- Name of the proxy
- security
Groups List<String> - Security Group to define the security rules that determine the inbound and outbound traffic
Outputs
All input properties are implicitly available as output properties. Additionally, the GcpProxy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- identifier string
- Unique identifier of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- identifier str
- Unique identifier of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the resource
Look up Existing GcpProxy Resource
Get an existing GcpProxy 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?: GcpProxyState, opts?: CustomResourceOptions): GcpProxy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allocate_static_ip: Optional[bool] = None,
api_key: Optional[str] = None,
certificates: Optional[GcpProxyCertificatesArgs] = None,
cloud_connector_id: Optional[str] = None,
delete_cloud_resources_on_destroy: Optional[bool] = None,
host_name: Optional[str] = None,
identifier: Optional[str] = None,
machine_type: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
subnet_id: Optional[str] = None,
vpc: Optional[str] = None,
zone: Optional[str] = None) -> GcpProxy
func GetGcpProxy(ctx *Context, name string, id IDInput, state *GcpProxyState, opts ...ResourceOption) (*GcpProxy, error)
public static GcpProxy Get(string name, Input<string> id, GcpProxyState? state, CustomResourceOptions? opts = null)
public static GcpProxy get(String name, Output<String> id, GcpProxyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Allocate
Static boolIp - Boolean value to indicate if proxy vm needs to have static IP
- Api
Key string - Harness NG API key
- Certificates
Gcp
Proxy Certificates - Cloud
Connector stringId - Id of the cloud connector
- Delete
Cloud boolResources On Destroy - Host
Name string - Hostname for the proxy
- Identifier string
- Unique identifier of the resource
- Machine
Type string - Machine instance type
- Name string
- Name of the proxy
- Region string
- Region in which cloud resources are hosted
- Security
Groups List<string> - Security Group to define the security rules that determine the inbound and outbound traffic
- Subnet
Id string - VPC in which cloud resources are hosted
- Vpc string
- VPC in which cloud resources are hosted
- Zone string
- Zone in which cloud resources are hosted
- Allocate
Static boolIp - Boolean value to indicate if proxy vm needs to have static IP
- Api
Key string - Harness NG API key
- Certificates
Gcp
Proxy Certificates Args - Cloud
Connector stringId - Id of the cloud connector
- Delete
Cloud boolResources On Destroy - Host
Name string - Hostname for the proxy
- Identifier string
- Unique identifier of the resource
- Machine
Type string - Machine instance type
- Name string
- Name of the proxy
- Region string
- Region in which cloud resources are hosted
- Security
Groups []string - Security Group to define the security rules that determine the inbound and outbound traffic
- Subnet
Id string - VPC in which cloud resources are hosted
- Vpc string
- VPC in which cloud resources are hosted
- Zone string
- Zone in which cloud resources are hosted
- allocate
Static BooleanIp - Boolean value to indicate if proxy vm needs to have static IP
- api
Key String - Harness NG API key
- certificates
Gcp
Proxy Certificates - cloud
Connector StringId - Id of the cloud connector
- delete
Cloud BooleanResources On Destroy - host
Name String - Hostname for the proxy
- identifier String
- Unique identifier of the resource
- machine
Type String - Machine instance type
- name String
- Name of the proxy
- region String
- Region in which cloud resources are hosted
- security
Groups List<String> - Security Group to define the security rules that determine the inbound and outbound traffic
- subnet
Id String - VPC in which cloud resources are hosted
- vpc String
- VPC in which cloud resources are hosted
- zone String
- Zone in which cloud resources are hosted
- allocate
Static booleanIp - Boolean value to indicate if proxy vm needs to have static IP
- api
Key string - Harness NG API key
- certificates
Gcp
Proxy Certificates - cloud
Connector stringId - Id of the cloud connector
- delete
Cloud booleanResources On Destroy - host
Name string - Hostname for the proxy
- identifier string
- Unique identifier of the resource
- machine
Type string - Machine instance type
- name string
- Name of the proxy
- region string
- Region in which cloud resources are hosted
- security
Groups string[] - Security Group to define the security rules that determine the inbound and outbound traffic
- subnet
Id string - VPC in which cloud resources are hosted
- vpc string
- VPC in which cloud resources are hosted
- zone string
- Zone in which cloud resources are hosted
- allocate_
static_ boolip - Boolean value to indicate if proxy vm needs to have static IP
- api_
key str - Harness NG API key
- certificates
Gcp
Proxy Certificates Args - cloud_
connector_ strid - Id of the cloud connector
- delete_
cloud_ boolresources_ on_ destroy - host_
name str - Hostname for the proxy
- identifier str
- Unique identifier of the resource
- machine_
type str - Machine instance type
- name str
- Name of the proxy
- region str
- Region in which cloud resources are hosted
- security_
groups Sequence[str] - Security Group to define the security rules that determine the inbound and outbound traffic
- subnet_
id str - VPC in which cloud resources are hosted
- vpc str
- VPC in which cloud resources are hosted
- zone str
- Zone in which cloud resources are hosted
- allocate
Static BooleanIp - Boolean value to indicate if proxy vm needs to have static IP
- api
Key String - Harness NG API key
- certificates Property Map
- cloud
Connector StringId - Id of the cloud connector
- delete
Cloud BooleanResources On Destroy - host
Name String - Hostname for the proxy
- identifier String
- Unique identifier of the resource
- machine
Type String - Machine instance type
- name String
- Name of the proxy
- region String
- Region in which cloud resources are hosted
- security
Groups List<String> - Security Group to define the security rules that determine the inbound and outbound traffic
- subnet
Id String - VPC in which cloud resources are hosted
- vpc String
- VPC in which cloud resources are hosted
- zone String
- Zone in which cloud resources are hosted
Supporting Types
GcpProxyCertificates, GcpProxyCertificatesArgs
- Cert
Secret stringId - Certificate secret ID
- Key
Secret stringId - Private key secret ID
- Cert
Secret stringId - Certificate secret ID
- Key
Secret stringId - Private key secret ID
- cert
Secret StringId - Certificate secret ID
- key
Secret StringId - Private key secret ID
- cert
Secret stringId - Certificate secret ID
- key
Secret stringId - Private key secret ID
- cert_
secret_ strid - Certificate secret ID
- key_
secret_ strid - Private key secret ID
- cert
Secret StringId - Certificate secret ID
- key
Secret StringId - Private key secret ID
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.