cloudformation-github-resource-providers icon indicating copy to clipboard operation
cloudformation-github-resource-providers copied to clipboard

Changing the name of a repository creates a new repository and delete the old one

Open GrumpyDevOps opened this issue 2 years ago • 5 comments

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 avatar Oct 21 '23 23:10 GrumpyDevOps

@GrumpyDevOps thanks for bringing this to our attention. Will look into this with the team.

LucasQChen avatar Oct 23 '23 16:10 LucasQChen

Thanks @LucasQChen. Let me know if you need further details.

GrumpyDevOps avatar Oct 26 '23 23:10 GrumpyDevOps

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 avatar Oct 27 '23 01:10 LucasQChen

@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 avatar Nov 21 '23 16:11 GrumpyDevOps

@GrumpyDevOps yes! Planning to publish this with a batch of other 3rd party resource updates in the coming weeks.

LucasQChen avatar Nov 21 '23 16:11 LucasQChen