From ed4100082910290ad2a23a8b76e85b34502b9094 Mon Sep 17 00:00:00 2001 From: Jill R <4121322+jillr@users.noreply.github.com> Date: Thu, 8 Oct 2020 15:02:52 -0700 Subject: [PATCH] Prepare 1.2.1 release (#256) --- CHANGELOG.rst | 18 + changelogs/changelog.yaml | 24 + .../197-ec2_scaling_policy-boto3.yml | 3 - .../221_222_ssm_bucket_operations.yaml | 2 - .../224-port-rds_subnet_group-boto3.yaml | 2 - ...conversion-for-creating-read-replicas.yaml | 2 - ...-fix_ssm_inventory_plugin_timeout_var.yaml | 2 - ...-add-sts-token-to-aws-ssm-conn-plugin.yaml | 2 - docs/community.aws.aws_ssm_connection.rst | 59 ++- ...ommunity.aws.ec2_scaling_policy_module.rst | 500 +++++++++++++++++- .../community.aws.rds_subnet_group_module.rst | 84 ++- galaxy.yml | 4 +- tests/requirements.yml | 4 +- 13 files changed, 665 insertions(+), 41 deletions(-) delete mode 100644 changelogs/fragments/197-ec2_scaling_policy-boto3.yml delete mode 100644 changelogs/fragments/221_222_ssm_bucket_operations.yaml delete mode 100644 changelogs/fragments/224-port-rds_subnet_group-boto3.yaml delete mode 100644 changelogs/fragments/229-fix-type-conversion-for-creating-read-replicas.yaml delete mode 100644 changelogs/fragments/234-fix_ssm_inventory_plugin_timeout_var.yaml delete mode 100644 changelogs/fragments/25-add-sts-token-to-aws-ssm-conn-plugin.yaml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d16cf927037..7f88ea72945 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,24 @@ community.aws Release Notes .. contents:: Topics +v1.2.1 +====== + +Minor Changes +------------- + +- aws_ssm connection plugin - Change the (internal) variable name from timeout to plugin_timeout to avoid conflicts with ansible/ansible default timeout (#69284, +- aws_ssm connection plugin - add STS token options to aws_ssm connection plugin. +- ec2_scaling_policy - Add support for step_adjustments +- ec2_scaling_policy - Migrate from boto to boto3 +- rds_subnet_group module - Add Boto3 support and remove Boto support. + +Bugfixes +-------- + +- aws_ssm connection plugin - namespace file uploads to S3 into unique folders per host, to prevent name collisions. Also deletes files from S3 to ensure temp files are not left behind. (https://github.com/ansible-collections/community.aws/issues/221, https://github.com/ansible-collections/community.aws/issues/222) +- rds_instance - fixed tag type conversion issue for creating read replicas. + v1.2.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index b1e25c93aa4..d42c71fe91a 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -730,3 +730,27 @@ releases: - 22-ec2_instance-mod-sgs.yml - iam_no_log.yml release_date: '2020-08-28' + 1.2.1: + changes: + bugfixes: + - aws_ssm connection plugin - namespace file uploads to S3 into unique folders + per host, to prevent name collisions. Also deletes files from S3 to ensure + temp files are not left behind. (https://github.com/ansible-collections/community.aws/issues/221, + https://github.com/ansible-collections/community.aws/issues/222) + - rds_instance - fixed tag type conversion issue for creating read replicas. + minor_changes: + - aws_ssm connection plugin - Change the (internal) variable name from timeout + to plugin_timeout to avoid conflicts with ansible/ansible default timeout + (#69284, + - aws_ssm connection plugin - add STS token options to aws_ssm connection plugin. + - ec2_scaling_policy - Add support for step_adjustments + - ec2_scaling_policy - Migrate from boto to boto3 + - rds_subnet_group module - Add Boto3 support and remove Boto support. + fragments: + - 197-ec2_scaling_policy-boto3.yml + - 221_222_ssm_bucket_operations.yaml + - 224-port-rds_subnet_group-boto3.yaml + - 229-fix-type-conversion-for-creating-read-replicas.yaml + - 234-fix_ssm_inventory_plugin_timeout_var.yaml + - 25-add-sts-token-to-aws-ssm-conn-plugin.yaml + release_date: '2020-10-07' diff --git a/changelogs/fragments/197-ec2_scaling_policy-boto3.yml b/changelogs/fragments/197-ec2_scaling_policy-boto3.yml deleted file mode 100644 index f09e1d36f59..00000000000 --- a/changelogs/fragments/197-ec2_scaling_policy-boto3.yml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: -- ec2_scaling_policy - Migrate from boto to boto3 -- ec2_scaling_policy - Add support for step_adjustments diff --git a/changelogs/fragments/221_222_ssm_bucket_operations.yaml b/changelogs/fragments/221_222_ssm_bucket_operations.yaml deleted file mode 100644 index 247d5e3697e..00000000000 --- a/changelogs/fragments/221_222_ssm_bucket_operations.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - aws_ssm connection plugin - namespace file uploads to S3 into unique folders per host, to prevent name collisions. Also deletes files from S3 to ensure temp files are not left behind. (https://github.com/ansible-collections/community.aws/issues/221, https://github.com/ansible-collections/community.aws/issues/222) diff --git a/changelogs/fragments/224-port-rds_subnet_group-boto3.yaml b/changelogs/fragments/224-port-rds_subnet_group-boto3.yaml deleted file mode 100644 index b5d35eb75cc..00000000000 --- a/changelogs/fragments/224-port-rds_subnet_group-boto3.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - rds_subnet_group module - Add Boto3 support and remove Boto support. diff --git a/changelogs/fragments/229-fix-type-conversion-for-creating-read-replicas.yaml b/changelogs/fragments/229-fix-type-conversion-for-creating-read-replicas.yaml deleted file mode 100644 index 569dc4133dd..00000000000 --- a/changelogs/fragments/229-fix-type-conversion-for-creating-read-replicas.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - rds_instance - fixed tag type conversion issue for creating read replicas. diff --git a/changelogs/fragments/234-fix_ssm_inventory_plugin_timeout_var.yaml b/changelogs/fragments/234-fix_ssm_inventory_plugin_timeout_var.yaml deleted file mode 100644 index 3395ecb9542..00000000000 --- a/changelogs/fragments/234-fix_ssm_inventory_plugin_timeout_var.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - aws_ssm connection plugin - Change the (internal) variable name from timeout to plugin_timeout to avoid conflicts with ansible/ansible default timeout (#69284, #71722). Developers subclassing this plugin will need to update accordingly. diff --git a/changelogs/fragments/25-add-sts-token-to-aws-ssm-conn-plugin.yaml b/changelogs/fragments/25-add-sts-token-to-aws-ssm-conn-plugin.yaml deleted file mode 100644 index fb03b59eef8..00000000000 --- a/changelogs/fragments/25-add-sts-token-to-aws-ssm-conn-plugin.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - aws_ssm connection plugin - add STS token options to aws_ssm connection plugin. diff --git a/docs/community.aws.aws_ssm_connection.rst b/docs/community.aws.aws_ssm_connection.rst index da3d5c515df..fc8c364abea 100644 --- a/docs/community.aws.aws_ssm_connection.rst +++ b/docs/community.aws.aws_ssm_connection.rst @@ -41,6 +41,25 @@ Parameters Configuration Comments + + +
+ access_key_id + +
+ - +
+
added in 1.3.0
+ + + + +
var: ansible_aws_ssm_access_key_id
+ + +
The STS access key to use when connecting via session-manager.
+ +
@@ -137,7 +156,45 @@ Parameters
- timeout + secret_access_key + +
+ - +
+
added in 1.3.0
+ + + + +
var: ansible_aws_ssm_secret_access_key
+ + +
The STS secret key to use when connecting via session-manager.
+ + + + +
+ session_token + +
+ - +
+
added in 1.3.0
+ + + + +
var: ansible_aws_ssm_session_token
+ + +
The STS session token to use when connecting via session-manager.
+ + + + +
+ ssm_timeout
integer diff --git a/docs/community.aws.ec2_scaling_policy_module.rst b/docs/community.aws.ec2_scaling_policy_module.rst index 70daec2511a..e501135c211 100644 --- a/docs/community.aws.ec2_scaling_policy_module.rst +++ b/docs/community.aws.ec2_scaling_policy_module.rst @@ -37,12 +37,12 @@ Parameters - + - - - - - - - - - - + + + + + + + + + + - - + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterParameter Choices/Defaults Comments
+
adjustment_type @@ -59,26 +59,27 @@ Parameters
The type of change in capacity of the autoscaling group.
+
Required if state is present.
+
asg_name
string - / required
Name of the associated autoscaling group.
+
Required if state is present.
+
aws_access_key @@ -96,7 +97,7 @@ Parameters
+
aws_ca_bundle @@ -113,7 +114,7 @@ Parameters
+
aws_config @@ -130,7 +131,7 @@ Parameters
+
aws_secret_key @@ -148,7 +149,7 @@ Parameters
+
cooldown @@ -160,10 +161,11 @@ Parameters
The minimum period of time (in seconds) between which autoscaling actions can take place.
+
Only used when policy_type is SimpleScaling.
+
debug_botocore_endpoint_logs @@ -182,7 +184,7 @@ Parameters
+
ec2_url @@ -198,7 +200,43 @@ Parameters
+ +
+ estimated_instance_warmup + +
+ integer +
+
+ +
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
+
+
+ metric_aggregation + +
+ string +
+
+
    Choices: +
  • Minimum
  • +
  • Maximum
  • +
  • Average ←
  • +
+
+
The aggregation type for the CloudWatch metrics.
+
Only used when policy_type is not SimpleScaling.
+
min_adjustment_step @@ -210,10 +248,11 @@ Parameters
Minimum amount of adjustment when policy is triggered.
+
Only used when adjustment_type is PercentChangeInCapacity.
+
name @@ -229,7 +268,26 @@ Parameters
+ +
+ policy_type + +
+ string +
+
+
    Choices: +
  • StepScaling
  • +
  • SimpleScaling ←
  • +
+
+
Auto scaling adjustment policy.
+
profile @@ -247,7 +305,7 @@ Parameters
+
region @@ -263,7 +321,7 @@ Parameters
+
scaling_adjustment @@ -275,10 +333,13 @@ Parameters
The amount by which the autoscaling group is adjusted by the policy.
+
A negative number has the effect of scaling down the ASG.
+
Units are numbers of instances for ExactCapacity or ChangeInCapacity or percent of existing instances for PercentChangeInCapacity.
+
Required when policy_type is SimpleScaling.
+
security_token @@ -296,7 +357,7 @@ Parameters
+
state @@ -315,7 +376,77 @@ Parameters
+
+ step_adjustments + +
+ list + / elements=dictionary +
+
+ +
list of dicts containing lower_bound, upper_bound and scaling_adjustment
+
Intervals must not overlap or have a gap between them.
+
At most, one item can have an undefined lower_bound. If any item has a negative lower_bound, then there must be a step adjustment with an undefined lower_bound.
+
At most, one item can have an undefined upper_bound. If any item has a positive upper_bound, then there must be a step adjustment with an undefined upper_bound.
+
The bounds are the amount over the alarm threshold at which the adjustment will trigger. This means that for an alarm threshold of 50, triggering at 75 requires a lower bound of 25. See http://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_StepAdjustment.html.
+
+
+ lower_bound + +
+ integer +
+
+ +
The lower bound for the difference between the alarm threshold and the CloudWatch metric.
+
+
+ scaling_adjustment + +
+ integer + / required +
+
+ +
The amount by which to scale.
+
+
+ upper_bound + +
+ integer +
+
+ +
The upper bound for the difference between the alarm threshold and the CloudWatch metric.
+
validate_certs @@ -352,17 +483,343 @@ Examples .. code-block:: yaml+jinja - - community.aws.ec2_scaling_policy: + - name: Simple Scale Down policy + community.aws.ec2_scaling_policy: state: present region: US-XXX name: "scaledown-policy" adjustment_type: "ChangeInCapacity" - asg_name: "slave-pool" + asg_name: "application-asg" scaling_adjustment: -1 min_adjustment_step: 1 cooldown: 300 + # For an alarm with a breach threshold of 20, the + # following creates a stepped policy: + # From 20-40 (0-20 above threshold), increase by 50% of existing capacity + # From 41-infinity, increase by 100% of existing capacity + - community.aws.ec2_scaling_policy: + state: present + region: US-XXX + name: "step-scale-up-policy" + policy_type: StepScaling + metric_aggregation: Maximum + step_adjustments: + - upper_bound: 20 + scaling_adjustment: 50 + - lower_bound: 20 + scaling_adjustment: 100 + adjustment_type: "PercentChangeInCapacity" + asg_name: "application-asg" + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ adjustment_type + +
+ string +
+
always +
Scaling policy adjustment type
+
+
Sample:
+
PercentChangeInCapacity
+
+
+ alarms + +
+ complex +
+
always +
Cloudwatch alarms related to the policy
+
+
  +
+ alarm_arn + +
+ string +
+
always +
ARN of the Cloudwatch alarm
+
+
Sample:
+
arn:aws:cloudwatch:us-east-2:1234567890:alarm:cpu-very-high
+
  +
+ alarm_name + +
+ string +
+
always +
name of the Cloudwatch alarm
+
+
Sample:
+
cpu-very-high
+
+
+ arn + +
+ string +
+
always +
ARN of the scaling policy. Provided for backward compatibility, value is the same as policy_arn
+
+
Sample:
+
arn:aws:autoscaling:us-east-2:123456789012:scalingPolicy:59e37526-bd27-42cf-adca-5cd3d90bc3b9:autoScalingGroupName/app-asg:policyName/app-policy
+
+
+ as_name + +
+ string +
+
always +
Auto Scaling Group name. Provided for backward compatibility, value is the same as auto_scaling_group_name
+
+
Sample:
+
app-asg
+
+
+ auto_scaling_group_name + +
+ string +
+
always +
Name of Auto Scaling Group
+
+
Sample:
+
app-asg
+
+
+ metric_aggregation_type + +
+ string +
+
when policy_type is StepScaling +
Method used to aggregate metrics
+
+
Sample:
+
Maximum
+
+
+ name + +
+ string +
+
always +
Name of the scaling policy. Provided for backward compatibility, value is the same as policy_name
+
+
Sample:
+
app-policy
+
+
+ policy_arn + +
+ string +
+
always +
ARN of scaling policy.
+
+
Sample:
+
arn:aws:autoscaling:us-east-2:123456789012:scalingPolicy:59e37526-bd27-42cf-adca-5cd3d90bc3b9:autoScalingGroupName/app-asg:policyName/app-policy
+
+
+ policy_name + +
+ string +
+
always +
Name of scaling policy
+
+
Sample:
+
app-policy
+
+
+ policy_type + +
+ string +
+
always +
Type of auto scaling policy
+
+
Sample:
+
StepScaling
+
+
+ scaling_adjustment + +
+ integer +
+
When policy_type is SimpleScaling +
Adjustment to make when alarm is triggered
+
+
Sample:
+
1
+
+
+ step_adjustments + +
+ complex +
+
always +
List of step adjustments
+
+
  +
+ metric_interval_lower_bound + +
+ float +
+
if step has a lower bound +
Lower bound for metric interval
+
+
Sample:
+
20.0
+
  +
+ metric_interval_upper_bound + +
+ float +
+
if step has an upper bound +
Upper bound for metric interval
+
+
Sample:
+
40.0
+
  +
+ scaling_adjustment + +
+ integer +
+
always +
Adjustment to make if this step is reached
+
+
Sample:
+
50
+
+

Status @@ -372,4 +829,5 @@ Status Authors ~~~~~~~ -- Zacharie Eakin (@Zeekin) +- Zacharie Eakin (@zeekin) +- Will Thames (@willthames) diff --git a/docs/community.aws.rds_subnet_group_module.rst b/docs/community.aws.rds_subnet_group_module.rst index d72d4c4164d..6b681740a27 100644 --- a/docs/community.aws.rds_subnet_group_module.rst +++ b/docs/community.aws.rds_subnet_group_module.rst @@ -351,7 +351,23 @@ Common return values are documented `here  
- description + db_subnet_group_arn + +
+ string +
+
state=present +
The ARN of the DB subnet group
+
+
  +
+ db_subnet_group_description
string @@ -367,7 +383,7 @@ Common return values are documented `here  
- name + db_subnet_group_name
string @@ -379,6 +395,38 @@ Common return values are documented `here
  +
+ description + +
+ string +
+
state=present +
The description of the DB subnet group (maintained for backward compatibility)
+
+
  +
+ name + +
+ string +
+
state=present +
The name of the DB subnet group (maintained for backward compatibility)
+
+
  @@ -390,6 +438,22 @@ Common return values are documented `here state=present +
The status of the DB subnet group (maintained for backward compatibility)
+
+
  +
+ subnet_group_status + +
+ string +
+
state=present
The status of the DB subnet group

@@ -411,6 +475,22 @@ Common return values are documented `here
  +
+ subnets + +
+ list +
+
state=present +
Contains a list of Subnet elements (@see https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/rds.html#RDS.Client.describe_db_subnet_groups)
+
+
  diff --git a/galaxy.yml b/galaxy.yml index 3a2958e0814..991e6c90978 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: community name: aws -version: 1.2.0 +version: 1.2.1 readme: README.md authors: - Ansible (https://github.com/ansible) @@ -8,7 +8,7 @@ description: null license_file: COPYING tags: [community, aws, cloud, amazon] dependencies: - amazon.aws: '>=1.2.0' + amazon.aws: '>=1.2.1' repository: https://github.com/ansible-collections/community.aws documentation: https://github.com/ansible-collections/community.aws/tree/main/docs homepage: https://github.com/ansible-collections/community.aws diff --git a/tests/requirements.yml b/tests/requirements.yml index 359b5600688..481ff1020dd 100644 --- a/tests/requirements.yml +++ b/tests/requirements.yml @@ -1,7 +1,7 @@ integration_tests_dependencies: -- amazon.aws >= 1.2.0 +- amazon.aws >= 1.2.1 - ansible.windows - community.crypto - community.general unit_tests_dependencies: -- amazon.aws >= 1.2.0 +- amazon.aws >= 1.2.1