Changing the name of a repository creates a new repository and delete the old one
When changing the name of a repository, a new repository is created and the old one is deleted.
The expectation would be that only the name changes, while keeping its content.
Note that the "id" of the ressource remain the same.
Code:
new CfnRepository(this, `GithubRepositoryTestFromCdk`, {
name: 'test-from-cdk-rename, // Changing this value
organization: orgName,
});
The CDK diff output also suggest that only the name of the repository would change and there's no indication of replacement.
[~] GitHub::Repositories::Repository GithubRepositorytest-with-cdk GithubRepositorytestwithcdk
└─ [~] Name
├─ [-] test-from-cdk
└─ [+] test-from-cdk-rename
@GrumpyDevOps thanks for bringing this to our attention. Will look into this with the team.
Thanks @LucasQChen. Let me know if you need further details.
No further details needed at this time. I'll let you know if things change. On early inspection, changing the name should not be replacing the resource and we're looking into fixing this.
@LucasQChen I see a PR was contributed to allow renaming of the repository (Thanks @zan-mateusz)
https://github.com/aws-ia/cloudformation-github-resource-providers/pull/52
Any chance to get this merged ? Thanks!
@GrumpyDevOps yes! Planning to publish this with a batch of other 3rd party resource updates in the coming weeks.