Bug 1411369 - [RFE] CAPABILITY_IAM error after IAM role assignment with amazon cloudFormation template
Summary: [RFE] CAPABILITY_IAM error after IAM role assignment with amazon cloudFormati...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.7.1
Assignee: Bill Wei
QA Contact: Shveta
URL:
Whiteboard: ec2:stack
Depends On: 1385712
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-09 15:00 UTC by Satoe Imaishi
Modified: 2022-07-09 08:08 UTC (History)
9 users (show)

Fixed In Version: 5.7.1.0
Doc Type: Enhancement
Doc Text:
Clone Of: 1385712
Environment:
Last Closed: 2017-02-27 19:18:26 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0320 0 normal SHIPPED_LIVE Moderate: CFME 5.7.1 bug fixes and enhancement update 2017-02-28 00:13:26 UTC

Comment 2 Bill Wei 2017-01-18 13:59:55 UTC
Euwe backport details:

$ git log -1
commit f8754e69b0a1e26a683fd5c7cdb078925a6f2568
Author: Marcel Hild <hild>
Date:   Mon Dec 12 10:50:35 2016 +0100

    Merge pull request #88 from bzwei/orchestration_more_options
    
    Support all options to create orchestration stacks
    (cherry picked from commit 07feb3e1d847163da49491c276731f51c045bfc8)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1411369

Comment 3 Shveta 2017-01-31 16:52:07 UTC
Hi Bill , 

Needed some info to verify this bug. 
Correct me If I am wrong : 
1) Create a new role called "IAM" role 
2) Create a new group and under "Vm and templates" select orchestration template and assign to this group and check for errors? 

Please let me know.
Thanks, 
Shveta

Comment 4 Bill Wei 2017-01-31 18:32:15 UTC
For more information about IAM role and Cloudformation template, please see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities

To verify the fix, you first need to enhance the service dialog. This requires a manual editing of the dialog that you would normally first create through the CFME UI. Below is the paste of the naming of components that I posted earlier:

stack_notifications - a text area box, each line is an ARN
stack_capabilities - a drop down list for capabilities
stack_resource_types - a text area box, each line is an allowed resource type filter
stack_role - a text box for the role ARN
stack_policy - a text area box for the JSON formatted policy, or just the policy URL
stack_tags - a text area box, each line is one tag key and value pair, in the format key => value

If you only want to test IAM capability, you only need to add a dropdown and name it stack_capabilities. CAPABILITY_IAM and CAPABILITY_NAMED_IAM are the two available selections.

You will need to follow the description of this BZ to prepare a Cloudformation template that requires IAM role. You should do this through AWS console window.

Comment 5 Shveta 2017-02-01 19:57:02 UTC
With "CAPABILITY_IAM" selected stack was created successfully.

Verified in 5.7.1.0.20170124142149_8a5f4d5 

===================================
Additional info for bug verification
======================Template used==========
{
   "AWSTemplateFormatVersion": "2010-09-09",
   "Resources": {
      "RootRole": {
         "Type": "AWS::IAM::Role",
         "Properties": {
            "AssumeRolePolicyDocument": {
               "Version" : "2012-10-17",
               "Statement": [ {
                  "Effect": "Allow",
                  "Principal": {
                     "Service": [ "ec2.amazonaws.com" ]
                  },
                  "Action": [ "sts:AssumeRole" ]
               } ]
            },
            "Path": "/",
            "Policies": [ {
               "PolicyName": "root",
               "PolicyDocument": {
                  "Version" : "2012-10-17",
                  "Statement": [ {
                     "Effect": "Allow",
                     "Action": "*",
                     "Resource": "*"
                  } ]
               }
               } ]
            }
      },
      "RootInstanceProfile": {
         "Type": "AWS::IAM::InstanceProfile",
         "Properties": {
            "Path": "/",
            "Roles": [ {
               "Ref": "RootRole"
            } ]
         }
      }
   }
}

Comment 7 errata-xmlrpc 2017-02-27 19:18:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0320.html


Note You need to log in before you can comment on or make changes to this bug.