Skip to content

Commit

Permalink
POL-1268 AWS/Azure Expiring Reserved Instances Revamp (#2335)
Browse files Browse the repository at this point in the history
* update

* fix

* update

* update
  • Loading branch information
XOmniverse authored Jun 21, 2024
1 parent aac51e2 commit fab168b
Show file tree
Hide file tree
Showing 10 changed files with 689 additions and 274 deletions.
7 changes: 7 additions & 0 deletions cost/aws/reserved_instances/expiration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v3.0.0

- Policy is no longer deprecated
- Added ability to filter results by Billing Center
- Additional fields added to incident to provide more context
- Streamlined code for better readability and faster execution

## v2.2.1

- Added `deprecated` field to policy metadata. Functionality is unchanged.
Expand Down
34 changes: 13 additions & 21 deletions cost/aws/reserved_instances/expiration/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
# AWS Expiring Reserved Instances

## Deprecated
## What It Does

This policy is no longer being updated.
This policy template produces a report of all AWS reservations that have expired or are going to expire within a user-specified number of days. Optionally, this report can be emailed.

## What it does
## Input Parameters

- *Email Addresses* - Email addresses of the recipients you wish to notify when new incidents are created.
- *Days Until Expiration* - The number of days until expiration to include a Reservation in the report. Set to `0` to only report expired Reservations.
- *Allow/Deny Billing Centers* - Allow or Deny entered Billing Centers.
- *Allow/Deny Billing Center List* - A list of allowed or denied Billing Center names/IDs. Leave blank to report on Reservations in all Billing Centers.

This Policy Template leverages the Optima Bill Data for AWS Reserved Instances. It will notify only if expiration is within the timeframe specified in `Number of days to prior to expiration date to trigger incident` field. It will email the user specified in `Email addresses of the recipients you wish to notify`.
## Policy Actions

- Send an email report

## Prerequisites

This Policy Template uses [Credentials](https://docs.flexera.com/flexera/EN/Automation/ManagingCredentialsExternal.htm) for authenticating to datasources -- in order to apply this policy you must have a Credential registered in the system that is compatible with this policy. If there are no Credentials listed when you apply the policy, please contact your Flexera Org Admin and ask them to register a Credential that is compatible with this policy. The information below should be consulted when creating the credential(s).

- [**Flexera Credential**](https://docs.flexera.com/flexera/EN/Automation/ProviderCredentials.htm) (*provider=flexera*) which has the following roles:
- `actor`
- `observer`
- `credential_viewer`
- `billing_center_viewer`

The [Provider-Specific Credentials](https://docs.flexera.com/flexera/EN/Automation/ProviderCredentials.htm) page in the docs has detailed instructions for setting up Credentials for the most common providers.

## Input Parameters

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

- *Number of days to prior to expiration date to trigger incident* - enter the number of days you want before the Reserved Instance expires.
- *Email addresses of the recipients you wish to notify* - A list of email addresses to notify

## Policy Actions

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

- Send an email report

## Supported Clouds

- AWS

## Cost

This Policy Template does not launch any instances, and so does not incur any cloud costs.
This Policy Template does not incur any cloud costs.
Loading

0 comments on commit fab168b

Please sign in to comment.