Skip to content

Commit

Permalink
promote iam_managed_policy
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar242 authored and alinabuzachis committed Oct 6, 2023
1 parent 4ece74d commit e8209bf
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 109 deletions.
4 changes: 4 additions & 0 deletions changelogs/fragments/migrate_iam_managed_policy.yml
Original file line number Diff line number Diff line change
@@ -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``.
204 changes: 102 additions & 102 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/iam_managed_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@
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') }}"
state: present
# 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"
Expand All @@ -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: |
{
Expand All @@ -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
"""
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/iam_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/rds_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8209bf

Please sign in to comment.