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

Fn.conditionIf is not usable in s3 module. #20551

Closed
Arsen-Uulu opened this issue May 31, 2022 · 3 comments
Closed

Fn.conditionIf is not usable in s3 module. #20551

Arsen-Uulu opened this issue May 31, 2022 · 3 comments
Assignees
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. effort/small Small work item – less than a day of effort needs-reproduction This issue needs reproduction. p2

Comments

@Arsen-Uulu
Copy link

Arsen-Uulu commented May 31, 2022

Describe the bug

I am using software.amazon.awscdk.services.s3.CfnBucket, to create my S3 bucket and configure my replication Configuration, but when I use software.amazon.awscdk.core.Fn Fn.conditionIf in
.replicationConfiguration() object returned from Fn.conditionif re-writers the properties of ReplicationConfigurationProperty. The first letter of the property names is lower case instead of capital, then CFN return this error

Bucket: UPDATE_FAILED - Encountered unsupported property "rules"

supposed to be "Rules"

Code block:
.replicationConfiguration(
    Fn.conditionIf(
         "ReplicationEnabled",
         replicationCofigurationPropetry
         Fn.ref("AWS:NoValue")
        )
    )

If I remove Fn.conditionIf everything works just fine.

Expected Behavior

Expected Fn.conditionIf returned Object to be not modified

Current Behavior

Fn.conditionif re-writers the properties of ReplicationConfigurationProperty. The first letter of the property names is lower case instead of capital, then CFN return this error

Reproduction Steps

Code block:
.replicationConfiguration(
    Fn.conditionIf(
         "ReplicationEnabled",
         replicationCofigurationPropetry
         Fn.ref("AWS:NoValue")
        )
    )

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

software.amazon.awssdk:s3:2.17.41,software.amazon.awscdk:core:1.110.1'

Framework Version

No response

Node.js Version

v18.0.0

OS

Mac OS

Language

Java

Language Version

No response

Other information

No response

@Arsen-Uulu Arsen-Uulu added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 31, 2022
@github-actions github-actions bot added the @aws-cdk/aws-s3 Related to Amazon S3 label May 31, 2022
@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 10, 2022
@peterwoodworth
Copy link
Contributor

Thanks for the report, I or someone else on the team will try to reproduce this and get back to you at some point, but maybe not soon unfortunately. We appreciate the patience 🙂

@peterwoodworth peterwoodworth added the needs-reproduction This issue needs reproduction. label Jun 10, 2022
@comcalvi
Copy link
Contributor

Duplicate of #8396.

@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/aws-s3 Related to Amazon S3 bug This issue is a bug. effort/small Small work item – less than a day of effort needs-reproduction This issue needs reproduction. p2
Projects
None yet
Development

No branches or pull requests

4 participants