Expand description
Represents an Autoscaler resource.
Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define.
To get more information about RegionAutoscaler, see:
- API documentation
- How-to Guides
§Example Usage
§Region Autoscaler Basic
resources:
foobar:
type: gcp:compute:RegionAutoscaler
properties:
name: my-region-autoscaler
region: us-central1
target: ${foobarRegionInstanceGroupManager.id}
autoscalingPolicy:
maxReplicas: 5
minReplicas: 1
cooldownPeriod: 60
cpuUtilization:
target: 0.5
foobarInstanceTemplate:
type: gcp:compute:InstanceTemplate
name: foobar
properties:
name: my-instance-template
machineType: e2-standard-4
disks:
- sourceImage: debian-cloud/debian-11
diskSizeGb: 250
networkInterfaces:
- network: default
accessConfigs:
- networkTier: PREMIUM
serviceAccount:
scopes:
- https://www.googleapis.com/auth/devstorage.read_only
- https://www.googleapis.com/auth/logging.write
- https://www.googleapis.com/auth/monitoring.write
- https://www.googleapis.com/auth/pubsub
- https://www.googleapis.com/auth/service.management.readonly
- https://www.googleapis.com/auth/servicecontrol
- https://www.googleapis.com/auth/trace.append
foobarTargetPool:
type: gcp:compute:TargetPool
name: foobar
properties:
name: my-target-pool
foobarRegionInstanceGroupManager:
type: gcp:compute:RegionInstanceGroupManager
name: foobar
properties:
name: my-region-igm
region: us-central1
versions:
- instanceTemplate: ${foobarInstanceTemplate.id}
name: primary
targetPools:
- ${foobarTargetPool.id}
baseInstanceName: foobar
variables:
debian9:
fn::invoke:
function: gcp:compute:getImage
arguments:
family: debian-11
project: debian-cloud
§Import
RegionAutoscaler can be imported using any of these accepted formats:
-
projects/{{project}}/regions/{{region}}/autoscalers/{{name}}
-
{{project}}/{{region}}/{{name}}
-
{{region}}/{{name}}
-
{{name}}
When using the pulumi import
command, RegionAutoscaler can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/regionAutoscaler:RegionAutoscaler default projects/{{project}}/regions/{{region}}/autoscalers/{{name}}
$ pulumi import gcp:compute/regionAutoscaler:RegionAutoscaler default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/regionAutoscaler:RegionAutoscaler default {{region}}/{{name}}
$ pulumi import gcp:compute/regionAutoscaler:RegionAutoscaler default {{name}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments