Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (29 sloc) 2.03 KB

Terminate Instances with End Date Policy

What it does

This Policy allows you to set a tag with a timestamp and terminate an instance at a specific time. It will not terminate locked instances.

How to Use

This policy relies on a tag to terminate instances based on a schedule. The tag value is in a timestamp notation.

You can follow the following example when tagging your instances. If you tag in the cloud natively you can ignore ec2,gce,azure, Flexera CMP will automatically add that on discovery.

Instance Terminate Tag Example

  • instance:terminate=2019-05-20T13:48:21Z
  • ec2:terminate=2019-05-20T13:48:21Z
  • gce:terminate=2019-05-20T13:48:21Z
  • azure:terminate=2019-05-20T13:48:21Z

Input Parameters

This policy has the following input parameters required when launching the policy.

  • Email addresses - Email addresses of the recipients you wish to notify
  • Tag of instances to terminate - Tags of instances to terminate in timestamp format, Eg: instance:terminate=*, ec2:terminate=*, gce:terminate=*, azure:terminate=*
  • Tags to ignore - List of tags that will exclude instances from being evaluated by this policy. Multiple tags are evaluated as an 'OR' condition. Tag must be of the format 'namespace:predicate=value'.

Policy Actions

The following policy actions are taken on any resources found to be out of compliance.

  • Terminate the instances.
  • Send an email report

Required Permissions

This policy requires permissions to access RightScale resources (clouds, instances and tags). Before applying this policy add the following roles to the user applying the policy. The roles should be applied to all Accounts where the policy will run or the Organization. For more information on modifying roles visit the Governance Docs

  • Cloud Management - Actor
  • Cloud Management - Observer

Supported Clouds

The following clouds are supported:

  • All RightScale enabled clouds

Cost

This Policy Template does not incur any cloud costs.

You can’t perform that action at this time.