Closed joehillen closed 1 year ago
What's the output when you run cdk diff
? Is it empty?
It's a fresh stack so there is nothing. The template posted above is entire stack.
$ cdk diff -c import_table=true
Stack restore-phoenix-api-storage
Parameters
[+] Parameter BootstrapVersion BootstrapVersion: {"Type":"AWS::SSM::Parameter::Value<String>","Default":"/cdk-bootstrap/hnb659fds/version","Description":"Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"}
Resources
[+] AWS::DynamoDB::Table Table TableCD117FA1
Other Changes
[+] Unknown Rules: {"CheckBootstrapVersion":{"Assertions":[{"Assert":{"Fn::Not":[{"Fn::Contains":[["1","2","3","4","5"],{"Ref":"BootstrapVersion"}]}]},"AssertDescription":"CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."}]}}
I reproduced the issue and fixed it, sorry for the delay in response
Run a cdk diff to make sure there are no pending changes to the CDK stack you want to import resources into. The only changes allowed in an "import" operation are the addition of new resources which you want to import.
If you're creating a brand new stack and are only populating it with a single table, you need to deploy the brand new stack first with the table commented out. Then, run cdk import
and it will work. Running import with these additional Parameter and Other changes will cause the RoleArn error
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.
Describe the bug
This is my first time trying to import a DynamoDB Table using
cdk import
Expected Behavior
It should be able to create a stack with the imported table.
Current Behavior
The import fails with the following message:
It complains about a
RoleArn
but as you can see there is noRoleArn
defined in the generated CloudFormation:cdk synth -c import_table=true restore-phoenix-api-storage
:Reproduction Steps
The stack is relatively simple:
Possible Solution
The only reason I can think of the source of the
RoleArn
is we're using a Permissions Boundary with this (yet undocumented) feature https://github.com/aws/aws-cdk/issues/24882Additional Information/Context
I don't have another account where I can test
cdk bootstrap
without a Permission Boundary, as it is enforced by our security team.CDK CLI Version
2.72.1 (build ddbfac7)
Framework Version
No response
Node.js Version
v18.15.0
OS
Linux
Language
Typescript
Language Version
5.0.3
Other information
No response