From e8209bfbf7121ebdeb407f6571c26616f2586b98 Mon Sep 17 00:00:00 2001 From: Mandar Kulkarni Date: Fri, 22 Sep 2023 12:05:59 -0700 Subject: [PATCH] promote iam_managed_policy --- .../fragments/migrate_iam_managed_policy.yml | 4 + meta/runtime.yml | 204 +++++++++--------- plugins/modules/iam_managed_policy.py | 10 +- plugins/modules/iam_policy.py | 2 +- plugins/modules/rds_instance.py | 2 +- 5 files changed, 113 insertions(+), 109 deletions(-) create mode 100644 changelogs/fragments/migrate_iam_managed_policy.yml diff --git a/changelogs/fragments/migrate_iam_managed_policy.yml b/changelogs/fragments/migrate_iam_managed_policy.yml new file mode 100644 index 00000000000..dcfd2914f51 --- /dev/null +++ b/changelogs/fragments/migrate_iam_managed_policy.yml @@ -0,0 +1,4 @@ +major_changes: +- iam_managed_policy - The module has been migrated from the ``community.aws`` collection. + Playbooks using the Fully Qualified Collection Name for this module should be updated + to use ``amazon.aws.iam_managed_policy``. diff --git a/meta/runtime.yml b/meta/runtime.yml index 197e4bde318..3fb6472600d 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -2,108 +2,108 @@ requires_ansible: '>=2.12.0' action_groups: aws: - - autoscaling_group - - autoscaling_group_info - - aws_az_info - - aws_caller_info - - aws_s3 - - backup_plan - - backup_plan_info - - backup_selection - - backup_selection_info - - backup_tag - - backup_tag_info - - backup_vault - - backup_vault_info - - cloudformation - - cloudformation_info - - cloudtrail - - cloudtrail_info - - cloudwatch_metric_alarm - - cloudwatch_metric_alarm_info - - cloudwatchevent_rule - - cloudwatchevent_rule - - cloudwatchlogs_log_group - - cloudwatchlogs_log_group_info - - cloudwatchlogs_log_group_metric_filter - - ec2_ami - - ec2_ami_info - - ec2_eip - - ec2_eip_info - - ec2_elb_lb - - ec2_eni - - ec2_eni_info - - ec2_group - - ec2_group_info - - ec2_instance - - ec2_instance_info - - ec2_key - - ec2_key_info - - ec2_security_group - - ec2_security_group_info - - ec2_snapshot - - ec2_snapshot_info - - ec2_spot_instance - - ec2_spot_instance_info - - ec2_tag - - ec2_tag_info - - ec2_vol - - ec2_vol_info - - ec2_vpc_dhcp_option - - ec2_vpc_dhcp_option_info - - ec2_vpc_endpoint - - ec2_vpc_endpoint_info - - ec2_vpc_endpoint_service_info - - ec2_vpc_igw - - ec2_vpc_igw_info - - ec2_vpc_nat_gateway - - ec2_vpc_nat_gateway_info - - ec2_vpc_net - - ec2_vpc_net_info - - ec2_vpc_route_table - - ec2_vpc_route_table_info - - ec2_vpc_subnet - - ec2_vpc_subnet_info - - elb_application_lb - - elb_application_lb_info - - elb_classic_lb - - execute_lambda - - iam_group - - iam_instance_profile - - iam_instance_profile_info - - iam_policy - - iam_policy_info - - iam_user - - iam_user_info - - kms_key - - kms_key_info - - lambda - - lambda_alias - - lambda_event - - lambda_execute - - lambda_info - - lambda_layer - - lambda_layer_info - - lambda_policy - - rds_cluster - - rds_cluster_info - - rds_cluster_snapshot - - rds_instance - - rds_instance_info - - rds_instance_snapshot - - rds_option_group - - rds_option_group_info - - rds_param_group - - rds_snapshot_info - - rds_subnet_group - - route53 - - route53_health_check - - route53_info - - route53_zone - - s3_bucket - - s3_object - - s3_object_info - - iam_managed_policy + - autoscaling_group + - autoscaling_group_info + - aws_az_info + - aws_caller_info + - aws_s3 + - backup_plan + - backup_plan_info + - backup_selection + - backup_selection_info + - backup_tag + - backup_tag_info + - backup_vault + - backup_vault_info + - cloudformation + - cloudformation_info + - cloudtrail + - cloudtrail_info + - cloudwatch_metric_alarm + - cloudwatch_metric_alarm_info + - cloudwatchevent_rule + - cloudwatchevent_rule + - cloudwatchlogs_log_group + - cloudwatchlogs_log_group_info + - cloudwatchlogs_log_group_metric_filter + - ec2_ami + - ec2_ami_info + - ec2_eip + - ec2_eip_info + - ec2_elb_lb + - ec2_eni + - ec2_eni_info + - ec2_group + - ec2_group_info + - ec2_instance + - ec2_instance_info + - ec2_key + - ec2_key_info + - ec2_security_group + - ec2_security_group_info + - ec2_snapshot + - ec2_snapshot_info + - ec2_spot_instance + - ec2_spot_instance_info + - ec2_tag + - ec2_tag_info + - ec2_vol + - ec2_vol_info + - ec2_vpc_dhcp_option + - ec2_vpc_dhcp_option_info + - ec2_vpc_endpoint + - ec2_vpc_endpoint_info + - ec2_vpc_endpoint_service_info + - ec2_vpc_igw + - ec2_vpc_igw_info + - ec2_vpc_nat_gateway + - ec2_vpc_nat_gateway_info + - ec2_vpc_net + - ec2_vpc_net_info + - ec2_vpc_route_table + - ec2_vpc_route_table_info + - ec2_vpc_subnet + - ec2_vpc_subnet_info + - elb_application_lb + - elb_application_lb_info + - elb_classic_lb + - execute_lambda + - iam_group + - iam_instance_profile + - iam_instance_profile_info + - iam_managed_policy + - iam_policy + - iam_policy_info + - iam_user + - iam_user_info + - kms_key + - kms_key_info + - lambda + - lambda_alias + - lambda_event + - lambda_execute + - lambda_info + - lambda_layer + - lambda_layer_info + - lambda_policy + - rds_cluster + - rds_cluster_info + - rds_cluster_snapshot + - rds_instance + - rds_instance_info + - rds_instance_snapshot + - rds_option_group + - rds_option_group_info + - rds_param_group + - rds_snapshot_info + - rds_subnet_group + - route53 + - route53_health_check + - route53_info + - route53_zone + - s3_bucket + - s3_object + - s3_object_info plugin_routing: action: aws_s3: diff --git a/plugins/modules/iam_managed_policy.py b/plugins/modules/iam_managed_policy.py index cc7fd8450e5..3f8fd2368bd 100644 --- a/plugins/modules/iam_managed_policy.py +++ b/plugins/modules/iam_managed_policy.py @@ -54,7 +54,7 @@ EXAMPLES = r""" # Create a policy - name: Create IAM Managed Policy - community.aws.iam_managed_policy: + amazon.aws.iam_managed_policy: policy_name: "ManagedPolicy" policy_description: "A Helpful managed policy" policy: "{{ lookup('template', 'managed_policy.json.j2') }}" @@ -62,14 +62,14 @@ # Update a policy with a new default version - name: Update an IAM Managed Policy with new default version - community.aws.iam_managed_policy: + amazon.aws.iam_managed_policy: policy_name: "ManagedPolicy" policy: "{{ lookup('file', 'managed_policy_update.json') }}" state: present # Update a policy with a new non default version - name: Update an IAM Managed Policy with a non default version - community.aws.iam_managed_policy: + amazon.aws.iam_managed_policy: policy_name: "ManagedPolicy" policy: Version: "2012-10-17" @@ -82,7 +82,7 @@ # Update a policy and make it the only version and the default version - name: Update an IAM Managed Policy with default version as the only version - community.aws.iam_managed_policy: + amazon.aws.iam_managed_policy: policy_name: "ManagedPolicy" policy: | { @@ -98,7 +98,7 @@ # Remove a policy - name: Remove an existing IAM Managed Policy - community.aws.iam_managed_policy: + amazon.aws.iam_managed_policy: policy_name: "ManagedPolicy" state: absent """ diff --git a/plugins/modules/iam_policy.py b/plugins/modules/iam_policy.py index 16d12f058aa..1cc9c8cd110 100644 --- a/plugins/modules/iam_policy.py +++ b/plugins/modules/iam_policy.py @@ -12,7 +12,7 @@ description: - Allows uploading or removing inline IAM policies for IAM users, groups or roles. - To administer managed policies please see M(community.aws.iam_user), M(community.aws.iam_role), - M(amazon.aws.iam_group) and M(community.aws.iam_managed_policy) + M(amazon.aws.iam_group) and M(amazon.aws.iam_managed_policy) - This module was originally added to C(community.aws) in release 1.0.0. options: iam_type: diff --git a/plugins/modules/rds_instance.py b/plugins/modules/rds_instance.py index b5d7d8bd414..613f5f2d51d 100644 --- a/plugins/modules/rds_instance.py +++ b/plugins/modules/rds_instance.py @@ -500,7 +500,7 @@ # Add IAM role to db instance - name: Create IAM policy - community.aws.iam_managed_policy: + amazon.aws.iam_managed_policy: policy_name: "my-policy" policy: "{{ lookup('file','files/policy.json') }}" state: present