Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename stepfunctions modules #1310

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ Name | Description
[community.aws.aws_region_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_region_info_module.rst)|Gather information about AWS regions.
[community.aws.aws_secret](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_secret_module.rst)|Manage secrets stored in AWS Secrets Manager
[community.aws.aws_ssm_parameter_store](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_ssm_parameter_store_module.rst)|Manage key-value pairs in AWS SSM parameter store
[community.aws.aws_step_functions_state_machine](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_step_functions_state_machine_module.rst)|Manage AWS Step Functions state machines
[community.aws.aws_step_functions_state_machine_execution](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_step_functions_state_machine_execution_module.rst)|Start or stop execution of an AWS Step Functions state machine.
[community.aws.batch_compute_environment](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.batch_compute_environment_module.rst)|Manage AWS Batch Compute Environments
[community.aws.batch_job_definition](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.batch_job_definition_module.rst)|Manage AWS Batch Job Definitions
[community.aws.batch_job_queue](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.batch_job_queue_module.rst)|Manage AWS Batch Job Queues
Expand Down Expand Up @@ -211,6 +209,8 @@ Name | Description
[community.aws.sns_topic](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.sns_topic_module.rst)|Manages AWS SNS topics and subscriptions
[community.aws.sns_topic_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.sns_topic_info_module.rst)|sns_topic_info module
[community.aws.sqs_queue](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.sqs_queue_module.rst)|Creates or deletes AWS SQS queues
[community.aws.stepfunctions_state_machine](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.stepfunctions_state_machine_module.rst)|Manage AWS Step Functions state machines
[community.aws.stepfunctions_state_machine_execution](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.stepfunctions_state_machine_execution_module.rst)|Start or stop execution of an AWS Step Functions state machine
[community.aws.storagegateway_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.storagegateway_info_module.rst)|Fetch AWS Storage Gateway information
[community.aws.sts_assume_role](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.sts_assume_role_module.rst)|Assume a role using AWS Security Token Service and obtain temporary credentials
[community.aws.sts_session_token](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.sts_session_token_module.rst)|Obtain a session token from the AWS Security Token Service
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/1310-rename_stepfunctions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- aws_step_functions_state_machine - the ``aws_step_functions_state_machine`` module has been renamed to ``stepfunctions_state_machine``, ``aws_step_functions_state_machine`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1310).
- aws_step_functions_state_machine_execution - the ``aws_step_functions_state_machine_execution`` module has been renamed to ``stepfunctions_state_machine_execution``, ``aws_step_functions_state_machine_execution`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1310).
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. _community.aws.aws_step_functions_state_machine_execution_module:
.. _community.aws.stepfunctions_state_machine_execution_module:


********************************************************
community.aws.aws_step_functions_state_machine_execution
********************************************************
***************************************************
community.aws.stepfunctions_state_machine_execution
***************************************************

**Start or stop execution of an AWS Step Functions state machine.**
**Start or stop execution of an AWS Step Functions state machine**


Version added: 1.0.0
Expand All @@ -18,6 +18,7 @@ Version added: 1.0.0
Synopsis
--------
- Start or stop execution of a state machine in AWS Step Functions.
- Prior to release 5.0.0 this module was called ``community.aws.aws_step_functions_state_machine_execution``. The usage did not change.



Expand Down Expand Up @@ -57,7 +58,7 @@ Parameters
</ul>
</td>
<td>
<div>Desired action (start or stop) for a state machine execution.</div>
<div>Desired action (<code>start</code> or <code>stop</code>) for a state machine execution.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -343,13 +344,13 @@ Examples
.. code-block:: yaml

- name: Start an execution of a state machine
community.aws.aws_step_functions_state_machine_execution:
community.aws.stepfunctions_state_machine_execution:
name: an_execution_name
execution_input: '{ "IsHelloWorldExample": true }'
state_machine_arn: "arn:aws:states:us-west-2:682285639423:stateMachine:HelloWorldStateMachine"

- name: Stop an execution of a state machine
community.aws.aws_step_functions_state_machine_execution:
community.aws.stepfunctions_state_machine_execution:
action: stop
execution_arn: "arn:aws:states:us-west-2:682285639423:execution:HelloWorldStateMachineCopy:a1e8e2b5-5dfe-d40e-d9e3-6201061047c8"
cause: "cause of task failure"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _community.aws.aws_step_functions_state_machine_module:
.. _community.aws.stepfunctions_state_machine_module:


**********************************************
community.aws.aws_step_functions_state_machine
**********************************************
*****************************************
community.aws.stepfunctions_state_machine
*****************************************

**Manage AWS Step Functions state machines**

Expand All @@ -19,6 +19,7 @@ Synopsis
--------
- Create, update and delete state machines in AWS Step Functions.
- Calling the module in ``state=present`` for an existing AWS Step Functions state machine will attempt to update the state machine definition, IAM Role, or tags with the provided data.
- Prior to release 5.0.0 this module was called ``community.aws.aws_step_functions_state_machine``. The usage did not change.



Expand Down Expand Up @@ -140,7 +141,7 @@ Parameters
</td>
<td>
<div>The Amazon States Language definition of the state machine. See <a href='https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html'>https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html</a> for more information on the Amazon States Language.</div>
<div>This parameter is required when <code>state=present</code>.</div>
<div>Required when <em>state=present</em>.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -172,7 +173,7 @@ Parameters
<td>
</td>
<td>
<div>Name of the state machine</div>
<div>Name of the state machine.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -241,7 +242,7 @@ Parameters
</td>
<td>
<div>The ARN of the IAM Role that will be used by the state machine for its executions.</div>
<div>This parameter is required when <code>state=present</code>.</div>
<div>Required when <em>state=present</em>.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -278,7 +279,7 @@ Parameters
</ul>
</td>
<td>
<div>Desired state for the state machine</div>
<div>Desired state for the state machine.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -338,7 +339,7 @@ Examples

# Create a new AWS Step Functions state machine
- name: Setup HelloWorld state machine
community.aws.aws_step_functions_state_machine:
community.aws.stepfunctions_state_machine:
name: "HelloWorldStateMachine"
definition: "{{ lookup('file','state_machine.json') }}"
role_arn: arn:aws:iam::987654321012:role/service-role/invokeLambdaStepFunctionsRole
Expand All @@ -347,7 +348,7 @@ Examples

# Update an existing state machine
- name: Change IAM Role and tags of HelloWorld state machine
community.aws.aws_step_functions_state_machine:
community.aws.stepfunctions_state_machine:
name: HelloWorldStateMachine
definition: "{{ lookup('file','state_machine.json') }}"
role_arn: arn:aws:iam::987654321012:role/service-role/anotherStepFunctionsRole
Expand All @@ -356,7 +357,7 @@ Examples

# Remove the AWS Step Functions state machine
- name: Delete HelloWorld state machine
community.aws.aws_step_functions_state_machine:
community.aws.stepfunctions_state_machine:
name: HelloWorldStateMachine
state: absent

Expand Down
8 changes: 8 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ action_groups:
- sns_topic
- sns_topic_info
- sqs_queue
- stepfunctions_state_machine
- stepfunctions_state_machine_execution
- sts_assume_role
- sts_session_token
- storagegateway_info
Expand Down Expand Up @@ -348,6 +350,12 @@ plugin_routing:
aws_sgw_info:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.storagegateway_info
aws_step_functions_state_machine:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.stepfunctions_state_machine
aws_step_functions_state_machine_execution:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.stepfunctions_state_machine_execution
aws_waf_condition:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.waf_condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,53 @@

DOCUMENTATION = '''
---
module: aws_step_functions_state_machine
module: stepfunctions_state_machine
version_added: 1.0.0
short_description: Manage AWS Step Functions state machines
description:
- Create, update and delete state machines in AWS Step Functions.
- Calling the module in C(state=present) for an existing AWS Step Functions state machine
will attempt to update the state machine definition, IAM Role, or tags with the provided data.
- Create, update and delete state machines in AWS Step Functions.
- Calling the module in C(state=present) for an existing AWS Step Functions state machine
will attempt to update the state machine definition, IAM Role, or tags with the provided data.
- Prior to release 5.0.0 this module was called C(community.aws.aws_step_functions_state_machine).
tremble marked this conversation as resolved.
Show resolved Hide resolved
The usage did not change.

options:
name:
description:
- Name of the state machine
- Name of the state machine.
required: true
type: str
definition:
description:
- The Amazon States Language definition of the state machine. See
U(https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) for more
information on the Amazon States Language.
- "This parameter is required when C(state=present)."
- Required when I(state=present).
type: json
role_arn:
description:
- The ARN of the IAM Role that will be used by the state machine for its executions.
- "This parameter is required when C(state=present)."
- Required when I(state=present).
type: str
state:
description:
- Desired state for the state machine
- Desired state for the state machine.
default: present
choices: [ present, absent ]
type: str

extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags
author:
- Tom De Keyser (@tdekeyser)
- Tom De Keyser (@tdekeyser)
'''

EXAMPLES = '''
# Create a new AWS Step Functions state machine
- name: Setup HelloWorld state machine
community.aws.aws_step_functions_state_machine:
community.aws.stepfunctions_state_machine:
name: "HelloWorldStateMachine"
definition: "{{ lookup('file','state_machine.json') }}"
role_arn: arn:aws:iam::987654321012:role/service-role/invokeLambdaStepFunctionsRole
Expand All @@ -62,7 +64,7 @@

# Update an existing state machine
- name: Change IAM Role and tags of HelloWorld state machine
community.aws.aws_step_functions_state_machine:
community.aws.stepfunctions_state_machine:
name: HelloWorldStateMachine
definition: "{{ lookup('file','state_machine.json') }}"
role_arn: arn:aws:iam::987654321012:role/service-role/anotherStepFunctionsRole
Expand All @@ -71,7 +73,7 @@

# Remove the AWS Step Functions state machine
- name: Delete HelloWorld state machine
community.aws.aws_step_functions_state_machine:
community.aws.stepfunctions_state_machine:
name: HelloWorldStateMachine
state: absent
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@

DOCUMENTATION = '''
---
module: aws_step_functions_state_machine_execution
module: stepfunctions_state_machine_execution
version_added: 1.0.0

short_description: Start or stop execution of an AWS Step Functions state machine.

short_description: Start or stop execution of an AWS Step Functions state machine

description:
- Start or stop execution of a state machine in AWS Step Functions.
- Prior to release 5.0.0 this module was called C(community.aws.aws_step_functions_state_machine_execution).
tremble marked this conversation as resolved.
Show resolved Hide resolved
The usage did not change.

options:
action:
description: Desired action (start or stop) for a state machine execution.
description: Desired action (C(start) or C(stop)) for a state machine execution.
default: start
choices: [ start, stop ]
type: str
Expand All @@ -47,23 +48,22 @@
default: ''

extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.aws
- amazon.aws.ec2

author:
- Prasad Katti (@prasadkatti)
'''

EXAMPLES = '''
- name: Start an execution of a state machine
community.aws.aws_step_functions_state_machine_execution:
community.aws.stepfunctions_state_machine_execution:
name: an_execution_name
execution_input: '{ "IsHelloWorldExample": true }'
state_machine_arn: "arn:aws:states:us-west-2:682285639423:stateMachine:HelloWorldStateMachine"

- name: Stop an execution of a state machine
community.aws.aws_step_functions_state_machine_execution:
community.aws.stepfunctions_state_machine_execution:
action: stop
execution_arn: "arn:aws:states:us-west-2:682285639423:execution:HelloWorldStateMachineCopy:a1e8e2b5-5dfe-d40e-d9e3-6201061047c8"
cause: "cause of task failure"
Expand Down

This file was deleted.

3 changes: 3 additions & 0 deletions tests/integration/targets/stepfunctions_state_machine/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cloud/aws

stepfunctions_state_machine_execution