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

cdk.Arn.format: adds region automatically for services not requiring one #13104

Closed
mpuhacz opened this issue Feb 17, 2021 · 2 comments
Closed
Assignees
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@mpuhacz
Copy link

mpuhacz commented Feb 17, 2021

Reproduction Steps

cdk.Arn.format({ service: "iam", resource: "role", resourceName: "*" }, this.props.serviceStack),

What did you expect to happen?

I expect Arn format method to skip region for services like IAM

What actually happened?

 0/3 | 10:47:56 AM | UPDATE_FAILED        | AWS::IAM::Policy                             | Pipeline/Pipeline/Integration/IntegrationCloudTest/Project/Role/DefaultPolicy (PipelineIntegrationIntegrationCloudTestProjectRoleDefaultPolicyCA2B5C47) IAM resource arn:aws:iam:us-east-1:1111111111111:role/* cannot contain region information. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; 

Environment

  • CDK CLI Version : 1.89.0
  • Framework Version: 1.89.0
  • Node.js Version: v14.14.0
  • OS : OS X
  • Language (Version): ts-node v9.1.1

Other


This is 🐛 Bug Report

@mpuhacz mpuhacz added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 17, 2021
@peterwoodworth peterwoodworth added the @aws-cdk/core Related to core CDK functionality label Feb 17, 2021
@rix0rrr
Copy link
Contributor

rix0rrr commented Feb 24, 2021

Yeah. It doesn't have that knowledge though, and it's not a great place to encode that.

If you know you need to have no region, pass in region: ''.

@rix0rrr rix0rrr closed this as completed Feb 24, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants