govcloud/commercial-side-setup/CommercialAccountSetup.yaml [83:141]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Info:
          LoadTemplateFromURL : !Ref SourceTemplate

  AVMAssociation:
    Type: "AWS::ServiceCatalog::PortfolioProductAssociation"
    Properties:
      ProductId: !Ref AccountVendingMachineProduct
      PortfolioId: !Ref AccountVendingPortfolio

  PortfolioPrincipalAssociation:
    Type: "AWS::ServiceCatalog::PortfolioPrincipalAssociation"
    Properties:
      PrincipalARN: !Ref AccountAdministrator
      PortfolioId: !Ref AccountVendingPortfolio
      PrincipalType: IAM

  ServiceCatalogLaunchRole:
    Type: "AWS::IAM::Role"
    Properties:
      AssumeRolePolicyDocument:
        Version: "2012-10-17"
        Statement:
            Effect: "Allow"
            Principal:
              Service:
                - "servicecatalog.amazonaws.com"
            Action:
              - "sts:AssumeRole"
      ManagedPolicyArns:
        - "arn:aws:iam::aws:policy/AdministratorAccess"
      Path: "/"

  ServiceCatalogLaunchConstraint:
    Type: "AWS::ServiceCatalog::LaunchRoleConstraint"
    DependsOn: ServiceCatalogLaunchRole
    Properties:
      Description: This is a launch constraint created for the account vending portfolio
      AcceptLanguage: en
      PortfolioId: !Ref AccountVendingPortfolio
      ProductId: !Ref AccountVendingMachineProduct
      RoleArn: !GetAtt ServiceCatalogLaunchRole.Arn

  ServiceCatalogTagOption:
    Type: "AWS::ServiceCatalog::TagOption"
    Properties:
      Active: true
      Value: "avm-reference-architecture"
      Key: "Name"

  ServiceCatalogTagOptionAssociation:
    Type: "AWS::ServiceCatalog::TagOptionAssociation"
    Properties:
      TagOptionId: !Ref ServiceCatalogTagOption
      ResourceId: !Ref AccountVendingPortfolio

Outputs:
  AccountLambda:
    Description: ARN of the account creation lambda function
    Value: !GetAtt AccountBuilderLambda.Arn
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



resources/AccountCreationLambdaSetup-cfn.yaml [80:138]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Info:
          LoadTemplateFromURL : !Ref SourceTemplate

  AVMAssociation:
    Type: "AWS::ServiceCatalog::PortfolioProductAssociation"
    Properties:
      ProductId: !Ref AccountVendingMachineProduct
      PortfolioId: !Ref AccountVendingPortfolio

  PortfolioPrincipalAssociation:
    Type: "AWS::ServiceCatalog::PortfolioPrincipalAssociation"
    Properties:
      PrincipalARN: !Ref AccountAdministrator
      PortfolioId: !Ref AccountVendingPortfolio
      PrincipalType: IAM

  ServiceCatalogLaunchRole:
    Type: "AWS::IAM::Role"
    Properties:
      AssumeRolePolicyDocument:
        Version: "2012-10-17"
        Statement:
            Effect: "Allow"
            Principal:
              Service:
                - "servicecatalog.amazonaws.com"
            Action:
              - "sts:AssumeRole"
      ManagedPolicyArns:
        - "arn:aws:iam::aws:policy/AdministratorAccess"
      Path: "/"

  ServiceCatalogLaunchConstraint:
    Type: "AWS::ServiceCatalog::LaunchRoleConstraint"
    DependsOn: ServiceCatalogLaunchRole
    Properties:
      Description: This is a launch constraint created for the account vending portfolio
      AcceptLanguage: en
      PortfolioId: !Ref AccountVendingPortfolio
      ProductId: !Ref AccountVendingMachineProduct
      RoleArn: !GetAtt ServiceCatalogLaunchRole.Arn

  ServiceCatalogTagOption:
    Type: "AWS::ServiceCatalog::TagOption"
    Properties:
      Active: true
      Value: "avm-reference-architecture"
      Key: "Name"

  ServiceCatalogTagOptionAssociation:
    Type: "AWS::ServiceCatalog::TagOptionAssociation"
    Properties:
      TagOptionId: !Ref ServiceCatalogTagOption
      ResourceId: !Ref AccountVendingPortfolio

Outputs:
  AccountLambda:
    Description: ARN of the account creation lambda function
    Value: !GetAtt AccountBuilderLambda.Arn
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



