permalink |
---|
/compute_resource_policy/ |
compute_resource_policy
represents the google_compute_resource_policy
Terraform resource.
This package contains functions and utilities for setting up the resource using Jsonnet code.
fn new()
fn newAttrs()
fn withDescription()
fn withDiskConsistencyGroupPolicy()
fn withDiskConsistencyGroupPolicyMixin()
fn withGroupPlacementPolicy()
fn withGroupPlacementPolicyMixin()
fn withInstanceSchedulePolicy()
fn withInstanceSchedulePolicyMixin()
fn withName()
fn withProject()
fn withRegion()
fn withSnapshotSchedulePolicy()
fn withSnapshotSchedulePolicyMixin()
fn withTimeouts()
fn withTimeoutsMixin()
obj disk_consistency_group_policy
obj group_placement_policy
obj instance_schedule_policy
obj snapshot_schedule_policy
obj timeouts
new()
google.compute_resource_policy.new
injects a new google_compute_resource_policy
Terraform resource
block into the root module document.
Additionally, this inserts a private function into the _ref
attribute that generates references to attributes of the
resource. For example, if you added a new instance to the root using:
# arguments omitted for brevity
google.compute_resource_policy.new('some_id')
You can get the reference to the id
field of the created google.compute_resource_policy
using the reference:
$._ref.google_compute_resource_policy.some_id.get('id')
This is the same as directly entering "${ google_compute_resource_policy.some_id.id }"
as the value.
NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use super
, self
,
or $
to refer to the root object. Instead, make an explicit outer object using local
.
Args:
resourceLabel
(string
): The name label of the block.description
(string
): An optional description of this resource. Provide this property when you create the resource. Whennull
, thedescription
field will be omitted from the resulting object.name
(string
): The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z'? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project
(string
): Set theproject
field on the resulting resource block. Whennull
, theproject
field will be omitted from the resulting object.region
(string
): Region where resource policy resides. Whennull
, theregion
field will be omitted from the resulting object.disk_consistency_group_policy
(list[obj]
): Replication consistency group for asynchronous disk replication. Whennull
, thedisk_consistency_group_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.disk_consistency_group_policy.new constructor.group_placement_policy
(list[obj]
): Resource policy for instances used for placement configuration. Whennull
, thegroup_placement_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.group_placement_policy.new constructor.instance_schedule_policy
(list[obj]
): Resource policy for scheduling instance operations. Whennull
, theinstance_schedule_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.instance_schedule_policy.new constructor.snapshot_schedule_policy
(list[obj]
): Policy for creating snapshots of persistent disks. Whennull
, thesnapshot_schedule_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.new constructor.timeouts
(obj
): Set thetimeouts
field on the resulting resource block. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.timeouts.new constructor.
Returns:
- A mixin object that injects the new resource into the root Terraform configuration.
newAttrs()
google.compute_resource_policy.newAttrs
constructs a new object with attributes and blocks configured for the compute_resource_policy
Terraform resource.
Unlike google.compute_resource_policy.new, this function will not inject the resource
block into the root Terraform document. Instead, this must be passed in as the attrs
argument for the
tf.withResource function to build a complete block.
This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to injecting into a complete block.
Args:
description
(string
): An optional description of this resource. Provide this property when you create the resource. Whennull
, thedescription
field will be omitted from the resulting object.name
(string
): The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z'? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project
(string
): Set theproject
field on the resulting object. Whennull
, theproject
field will be omitted from the resulting object.region
(string
): Region where resource policy resides. Whennull
, theregion
field will be omitted from the resulting object.disk_consistency_group_policy
(list[obj]
): Replication consistency group for asynchronous disk replication. Whennull
, thedisk_consistency_group_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.disk_consistency_group_policy.new constructor.group_placement_policy
(list[obj]
): Resource policy for instances used for placement configuration. Whennull
, thegroup_placement_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.group_placement_policy.new constructor.instance_schedule_policy
(list[obj]
): Resource policy for scheduling instance operations. Whennull
, theinstance_schedule_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.instance_schedule_policy.new constructor.snapshot_schedule_policy
(list[obj]
): Policy for creating snapshots of persistent disks. Whennull
, thesnapshot_schedule_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.new constructor.timeouts
(obj
): Set thetimeouts
field on the resulting object. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.timeouts.new constructor.
Returns:
- An attribute object that can be used with tf.withResource to construct a new
compute_resource_policy
resource into the root Terraform configuration.
withDescription()
google.string.withDescription
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the description field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thedescription
field.
withDiskConsistencyGroupPolicy()
google.list[obj].withDiskConsistencyGroupPolicy
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the disk_consistency_group_policy field.
This function will replace the array with the passed in value
. If you wish to instead append the
passed in value to the existing array, use the google.list[obj].withDiskConsistencyGroupPolicyMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for thedisk_consistency_group_policy
field.
withDiskConsistencyGroupPolicyMixin()
google.list[obj].withDiskConsistencyGroupPolicyMixin
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the disk_consistency_group_policy field.
This function will append the passed in array or object to the existing array. If you wish
to instead replace the array with the passed in value
, use the google.list[obj].withDiskConsistencyGroupPolicy
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for thedisk_consistency_group_policy
field.
withGroupPlacementPolicy()
google.list[obj].withGroupPlacementPolicy
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the group_placement_policy field.
This function will replace the array with the passed in value
. If you wish to instead append the
passed in value to the existing array, use the google.list[obj].withGroupPlacementPolicyMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for thegroup_placement_policy
field.
withGroupPlacementPolicyMixin()
google.list[obj].withGroupPlacementPolicyMixin
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the group_placement_policy field.
This function will append the passed in array or object to the existing array. If you wish
to instead replace the array with the passed in value
, use the google.list[obj].withGroupPlacementPolicy
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for thegroup_placement_policy
field.
withInstanceSchedulePolicy()
google.list[obj].withInstanceSchedulePolicy
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the instance_schedule_policy field.
This function will replace the array with the passed in value
. If you wish to instead append the
passed in value to the existing array, use the google.list[obj].withInstanceSchedulePolicyMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for theinstance_schedule_policy
field.
withInstanceSchedulePolicyMixin()
google.list[obj].withInstanceSchedulePolicyMixin
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the instance_schedule_policy field.
This function will append the passed in array or object to the existing array. If you wish
to instead replace the array with the passed in value
, use the google.list[obj].withInstanceSchedulePolicy
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for theinstance_schedule_policy
field.
withName()
google.string.withName
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the name field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thename
field.
withProject()
google.string.withProject
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the project field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theproject
field.
withRegion()
google.string.withRegion
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the region field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theregion
field.
withSnapshotSchedulePolicy()
google.list[obj].withSnapshotSchedulePolicy
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the snapshot_schedule_policy field.
This function will replace the array with the passed in value
. If you wish to instead append the
passed in value to the existing array, use the google.list[obj].withSnapshotSchedulePolicyMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for thesnapshot_schedule_policy
field.
withSnapshotSchedulePolicyMixin()
google.list[obj].withSnapshotSchedulePolicyMixin
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the snapshot_schedule_policy field.
This function will append the passed in array or object to the existing array. If you wish
to instead replace the array with the passed in value
, use the google.list[obj].withSnapshotSchedulePolicy
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for thesnapshot_schedule_policy
field.
withTimeouts()
google.obj.withTimeouts
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will replace the map with the passed in value
. If you wish to instead merge the
passed in value to the existing map, use the google.obj.withTimeoutsMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
withTimeoutsMixin()
google.obj.withTimeoutsMixin
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will merge the passed in value to the existing map. If you wish
to instead replace the entire map with the passed in value
, use the google.obj.withTimeouts
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
new()
google.compute_resource_policy.disk_consistency_group_policy.new
constructs a new object with attributes and blocks configured for the disk_consistency_group_policy
Terraform sub block.
Args:
enabled
(bool
): Enable disk consistency on the resource policy.
Returns:
- An attribute object that represents the
disk_consistency_group_policy
sub block.
new()
google.compute_resource_policy.group_placement_policy.new
constructs a new object with attributes and blocks configured for the group_placement_policy
Terraform sub block.
Args:
availability_domain_count
(number
): The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network Whennull
, theavailability_domain_count
field will be omitted from the resulting object.collocation
(string
): Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify 'COLLOCATED' to enable collocation. Can only be specified with 'vm_count'. If compute instances are created with a COLLOCATED policy, then exactly 'vm_count' instances must be created at the same time with the resource policy attached. Possible values: ["COLLOCATED"] Whennull
, thecollocation
field will be omitted from the resulting object.vm_count
(number
): Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs. Whennull
, thevm_count
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
group_placement_policy
sub block.
new()
google.compute_resource_policy.instance_schedule_policy.new
constructs a new object with attributes and blocks configured for the instance_schedule_policy
Terraform sub block.
Args:
expiration_time
(string
): The expiration time of the schedule. The timestamp is an RFC3339 string. Whennull
, theexpiration_time
field will be omitted from the resulting object.start_time
(string
): The start time of the schedule. The timestamp is an RFC3339 string. Whennull
, thestart_time
field will be omitted from the resulting object.time_zone
(string
): Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database.vm_start_schedule
(list[obj]
): Specifies the schedule for starting instances. Whennull
, thevm_start_schedule
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.instance_schedule_policy.vm_start_schedule.new constructor.vm_stop_schedule
(list[obj]
): Specifies the schedule for stopping instances. Whennull
, thevm_stop_schedule
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.instance_schedule_policy.vm_stop_schedule.new constructor.
Returns:
- An attribute object that represents the
instance_schedule_policy
sub block.
new()
google.compute_resource_policy.instance_schedule_policy.vm_start_schedule.new
constructs a new object with attributes and blocks configured for the vm_start_schedule
Terraform sub block.
Args:
schedule
(string
): Specifies the frequency for the operation, using the unix-cron format.
Returns:
- An attribute object that represents the
vm_start_schedule
sub block.
new()
google.compute_resource_policy.instance_schedule_policy.vm_stop_schedule.new
constructs a new object with attributes and blocks configured for the vm_stop_schedule
Terraform sub block.
Args:
schedule
(string
): Specifies the frequency for the operation, using the unix-cron format.
Returns:
- An attribute object that represents the
vm_stop_schedule
sub block.
new()
google.compute_resource_policy.snapshot_schedule_policy.new
constructs a new object with attributes and blocks configured for the snapshot_schedule_policy
Terraform sub block.
Args:
retention_policy
(list[obj]
): Retention policy applied to snapshots created by this resource policy. Whennull
, theretention_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.retention_policy.new constructor.schedule
(list[obj]
): Contains one of an 'hourlySchedule', 'dailySchedule', or 'weeklySchedule'. Whennull
, theschedule
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.schedule.new constructor.snapshot_properties
(list[obj]
): Properties with which the snapshots are created, such as labels. Whennull
, thesnapshot_properties
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.snapshot_properties.new constructor.
Returns:
- An attribute object that represents the
snapshot_schedule_policy
sub block.
new()
google.compute_resource_policy.snapshot_schedule_policy.retention_policy.new
constructs a new object with attributes and blocks configured for the retention_policy
Terraform sub block.
Args:
max_retention_days
(number
): Maximum age of the snapshot that is allowed to be kept.on_source_disk_delete
(string
): Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Default value: "KEEP_AUTO_SNAPSHOTS" Possible values: ["KEEP_AUTO_SNAPSHOTS", "APPLY_RETENTION_POLICY"] Whennull
, theon_source_disk_delete
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
retention_policy
sub block.
new()
google.compute_resource_policy.snapshot_schedule_policy.schedule.new
constructs a new object with attributes and blocks configured for the schedule
Terraform sub block.
Args:
daily_schedule
(list[obj]
): The policy will execute every nth day at the specified time. Whennull
, thedaily_schedule
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.schedule.daily_schedule.new constructor.hourly_schedule
(list[obj]
): The policy will execute every nth hour starting at the specified time. Whennull
, thehourly_schedule
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.schedule.hourly_schedule.new constructor.weekly_schedule
(list[obj]
): Allows specifying a snapshot time for each day of the week. Whennull
, theweekly_schedule
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.schedule.weekly_schedule.new constructor.
Returns:
- An attribute object that represents the
schedule
sub block.
new()
google.compute_resource_policy.snapshot_schedule_policy.schedule.daily_schedule.new
constructs a new object with attributes and blocks configured for the daily_schedule
Terraform sub block.
Args:
days_in_cycle
(number
): Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. Days in cycle for snapshot schedule policy must be 1.start_time
(string
): This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
Returns:
- An attribute object that represents the
daily_schedule
sub block.
new()
google.compute_resource_policy.snapshot_schedule_policy.schedule.hourly_schedule.new
constructs a new object with attributes and blocks configured for the hourly_schedule
Terraform sub block.
Args:
hours_in_cycle
(number
): The number of hours between snapshots.start_time
(string
): Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00
Returns:
- An attribute object that represents the
hourly_schedule
sub block.
new()
google.compute_resource_policy.snapshot_schedule_policy.schedule.weekly_schedule.new
constructs a new object with attributes and blocks configured for the weekly_schedule
Terraform sub block.
Args:
day_of_weeks
(list[obj]
): May contain up to seven (one for each day of the week) snapshot times. Whennull
, theday_of_weeks
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_resource_policy.snapshot_schedule_policy.schedule.weekly_schedule.day_of_weeks.new constructor.
Returns:
- An attribute object that represents the
weekly_schedule
sub block.
new()
google.compute_resource_policy.snapshot_schedule_policy.schedule.weekly_schedule.day_of_weeks.new
constructs a new object with attributes and blocks configured for the day_of_weeks
Terraform sub block.
Args:
day
(string
): The day of the week to create the snapshot. e.g. MONDAY Possible values: ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]start_time
(string
): Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.
Returns:
- An attribute object that represents the
day_of_weeks
sub block.
new()
google.compute_resource_policy.snapshot_schedule_policy.snapshot_properties.new
constructs a new object with attributes and blocks configured for the snapshot_properties
Terraform sub block.
Args:
chain_name
(string
): Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. Whennull
, thechain_name
field will be omitted from the resulting object.guest_flush
(bool
): Whether to perform a 'guest aware' snapshot. Whennull
, theguest_flush
field will be omitted from the resulting object.labels
(obj
): A set of key-value pairs. Whennull
, thelabels
field will be omitted from the resulting object.storage_locations
(list
): Cloud Storage bucket location to store the auto snapshot (regional or multi-regional) Whennull
, thestorage_locations
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
snapshot_properties
sub block.
new()
google.compute_resource_policy.timeouts.new
constructs a new object with attributes and blocks configured for the timeouts
Terraform sub block.
Args:
create
(string
): Set thecreate
field on the resulting object. Whennull
, thecreate
field will be omitted from the resulting object.delete
(string
): Set thedelete
field on the resulting object. Whennull
, thedelete
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
timeouts
sub block.