Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


5.2.3 Stack deletion

Function

This plugin deletes stacks in an AWS CloudFormation environment. Deleting stacks causes all the AWS resources related to these stacks to be deleted by AWS CloudFormation.

This plugin assumes the following server:

- AWS control server (execution target server)

A server on which AWS Tools for Windows PowerShell (abbreviated hereafter to "AWS Tools") is installed. AWS Tools transfers the plugin to, and executes it on, this server.

The script within this plugin executes the following AWS Tools commandlet:

- Remove-CFNStack -StackName "Stack name (AWS.stackName property value)"

- Force

After executing these commandlets, verify that the deleted stacks no longer exist.

For details about AWS Tools commandlets, see the AWS document "AWS Tools for Windows PowerShell Cmdlet Reference".

Use situation

This plugin can be used to delete AWS resources created from a template file. It can also be used to delete any unnecessary stacks, such as stacks failing to create AWS resources.

Prerequisites

For the latest support information about [Required product for the system], [Required products for the service template execution server], and [Prerequisite OS for the required products for the service template execution server], see the Release Notes.

[Required product for the system]

- JP1/Automatic Operation 11-00 or later

[Required products for the service template execution server]

- AWS Tools for Windows PowerShell

- Microsoft .Net Framework 3.5 or later

[Prerequisite OS for the required products for the service template execution server]

- Windows Server 2008 R2 Standard/Enterprise/Datacenter

- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

Note that this does not apply to environments in which Server Core is installed.

Cautions

(1) Do not specify character strings containing double quotation marks (") or single quotation marks (') in the properties of this plugin.

(2) The plugin checks whether the deletion target exists. If it does not exist, the plugin will terminate abnormally with return value 12.

(3) The plugin checks whether the deletion target exists. If it exists and the status is "DELETE_IN_PROGRESS", the plugin will terminate abnormally with return value 12.

(4) If AWS resources cannot be deleted, the corresponding stacks will remain undeleted.

(5) For other notes, see the notes in the AWS document "AWS Tools for Windows PowerShell Cmdlet Reference".

Execution privilege

(1) Policies must be set up so that IAM users logging in to AWS can perform the following actions:

- Deleting stacks and obtaining information

- Deleting AWS resources

Version

02.01.00

Plug-in tags

Delete VM,AWS

Plug-in name displayed in the task log

awsDeleteStack

Return code

0: Normal

12: Error (User error) Invalid property

23: Error (Invalid environment) Required environment is invalid

27: Error (Check task logs for the nature of error)

41: Error (Error detected in plugin) Missing property (Error detected in plugin script)

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

plugin.destinationHost

Host name of the execution target server

Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported.

--

Input

R

AWS.accessKeyId

Access key ID

Specify the access key ID for connecting to AWS.

--

Input

R

AWS.secretAccessKey

Secret access key

Specify the secret access key for connecting to AWS.

--

Input

R

AWS.region

Region

Specify an AWS region that is a connection destination.

--

Input

R

AWS.stackName

Stack name

Specify the name of a stack.

--

Input

R

AWS.checkStackDeletionCount

Frequency of stack deletion completion check

Specify the number of times to check whether stack deletion is complete. This parameter, along with the interval for stack deletion completion check, indicates the maximum waiting time.

--

Input

R

AWS.checkStackDeletionInterval

Interval for stack deletion completion check

Specify the interval in seconds to check whether stack deletion is complete.

--

Input

R

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O