Open bweigel opened 4 days ago
@bweigel I have this as L2 already as well. We can pair on it, if you want.
@moltar that sounds good! Do you want to share some feedback on my proposal above? Maybe you have some completely different design decisions or thoughts on the interface.
My repo is not public, but I do not mind sharing this part. I'm including the works in a ZIP. But your PR seems to be more comprehensive. Altho I think my zip has some cool bits too.
Is your feature request related to a problem? Please describe.
Managing CodeArtifact repositories and domains through AWS CDK currently requires the use of L1 constructs. This makes it harder to manage these resources with a more streamlined, high-level abstraction, resulting in more code and complexity for users who wish to leverage AWS CodeArtifact for package management.
Would you be willing to help with a PR?
Describe the solution you'd like
I propose the creation of L2 construct to manage Repository and Domain resources.
Features could include:
Describe alternatives you've considered
N/A
Additional context
:information_source: This is basically created with AI, from the API.md of the constructs we use internally.
This proposal introduces two core constructs:
Domain
Construct:IDomain
,ITaggableV2
domainName
(string, required): The name of the domain.encryptionKeyArn
(string, optional): The key used to encrypt the domain.domainOwner
(string): The AWS account owner.domainArn
(string): The ARN of the domain.grant(grantee: IGrantable, actions: ...string[])
: Grants permissions to interact with the domain.addToResourcePolicy(statement: PolicyStatement, allowNoOp?: boolean)
: Adds statements to the domain resource policy.Repository
Construct:IRepository
,ITaggableV2
repositoryName
(string, required): The name of the repository.domain
(IDomain, required): The domain containing the repository.description
(string, optional): A description of the repository.repositoryArn
(string): The ARN of the repository.externalConnection
(RepositoryConnection, optional): Connection to external repositories like PyPI or npm.grantRead(grantee: IGrantable)
: Grants read access to the repository.grantReadAndPublish(grantee: IGrantable)
: Grants read and publish access.Usage
Developers will be able to instantiate these constructs in their CDK applications as follows: