diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ea14cd2eaee0..949ffc0c44c56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.32.1](https://github.com/aws/aws-cdk/compare/v1.32.0...v1.32.1) (2020-04-09) + + +### Bug Fixes + +* **iam:** new IAM Condition type is unusable in Java ([#7270](https://github.com/aws/aws-cdk/issues/7270)) ([85f606a](https://github.com/aws/aws-cdk/commit/85f606ad13e4e51b9f66330379a55ef76310a8ca)) + ## [1.32.0](https://github.com/aws/aws-cdk/compare/v1.31.0...v1.32.0) (2020-04-07) diff --git a/allowed-breaking-changes.txt b/allowed-breaking-changes.txt index 1f78ca52d6422..790b59b6edc5f 100644 --- a/allowed-breaking-changes.txt +++ b/allowed-breaking-changes.txt @@ -46,3 +46,6 @@ incompatible-argument:@aws-cdk/aws-iam.PolicyStatement.addCondition incompatible-argument:@aws-cdk/aws-iam.PolicyStatement.addConditions incompatible-argument:@aws-cdk/aws-iam.PolicyStatement.addFederatedPrincipal incompatible-argument:@aws-cdk/aws-iam.PrincipalPolicyFragment. +changed-type:@aws-cdk/aws-iam.FederatedPrincipal.conditions +changed-type:@aws-cdk/aws-iam.PrincipalPolicyFragment.conditions +changed-type:@aws-cdk/aws-iam.PrincipalWithConditions.conditions diff --git a/lerna.json b/lerna.json index fdb47e5b64fcd..117d79cdcb4d1 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "tools/*" ], "rejectCycles": "true", - "version": "1.32.0" + "version": "1.32.1" } diff --git a/packages/@aws-cdk/aws-iam/lib/policy-statement.ts b/packages/@aws-cdk/aws-iam/lib/policy-statement.ts index 5bba3ff6b824c..3a3c10d2488a5 100644 --- a/packages/@aws-cdk/aws-iam/lib/policy-statement.ts +++ b/packages/@aws-cdk/aws-iam/lib/policy-statement.ts @@ -307,7 +307,19 @@ export enum Effect { * Condition for when an IAM policy is in effect. Maps from the keys in a request's context to * a string value or array of string values. See the Conditions interface for more details. */ -export type Condition = Record; +export type Condition = any; + +// NOTE! We'd ideally like to type this as `Record`, because the +// API expects a map which can take either strings or lists of strings. +// +// However, if we were to change this right now, the Java bindings for CDK would +// emit a type of `Map`, but the most common types people would +// instantiate would be an `ImmutableMap` which would not be +// assignable to `Map`. The types don't have a built-in notion +// of co-contravariance, you have to indicate that on the type. So jsii would first +// need to emit the type as `Map`. +// +// Feature request in https://github.com/aws/jsii/issues/1517 /** * Conditions for when an IAM Policy is in effect, specified in the following structure: