aws-cloudformation / aws-cloudformation-resource-providers-codeartifact

The CloudFormation Resource Provider Package for the AWS CodeArtifact service
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_CodeArtifact.html
Apache License 2.0
27 stars 7 forks source link

Updating GetAtt values. #43

Closed jonjara closed 3 years ago

jonjara commented 3 years ago

Issue #, if available: #41

Description of changes:

These are the values for GetAtt

Domain

!GetAtt MyDomain.Name
!GetAtt MyDomain.Owner
!GetAtt MyDomain.EncryptionKey

Repo:

!GetAtt MyRepo.Name
!GetAtt MyRepo.DomainName
!GetAtt MyRepo.DomainOwner

Testing

Gave this template a whirl

Parameters:
  Name:
    Type: String
  DomainName:
    Type: String    

Resources:
  TestCodeArtifactDomain:
    Type: 'AWS::CodeArtifact::Domain'
    Properties:
      DomainName: !Ref DomainName

  TestCodeArtifacRepository:
    Type: 'AWS::CodeArtifact::Repository'
    Properties:
      RepositoryName: !Ref Name
      DomainName: !GetAtt TestCodeArtifactDomain.Name  

Outputs:
  RepoArn:
    Value: !Ref TestCodeArtifacRepository

  DomainArn:
    Value: !Ref TestCodeArtifactDomain    

  RepoArnWithGetAtt:
    Value: !GetAtt TestCodeArtifacRepository.Arn   

  RepoDomainWithGetAtt:
    Value: !GetAtt TestCodeArtifactDomain.Arn        

  RepoNameFromRepo:
    Value: !GetAtt TestCodeArtifacRepository.Name    

  DomainNameFromDomain:
    Value: !GetAtt TestCodeArtifactDomain.Name   

  DomainOwnerFromDomain:
    Value: !GetAtt TestCodeArtifactDomain.Owner            

  DomainNameFromRepo:
    Value: !GetAtt TestCodeArtifacRepository.DomainName  

  DomainOwnerFromRepo:
    Value: !GetAtt TestCodeArtifacRepository.DomainOwner          

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.