# stacks/shared-resource-share.yml
AWSTemplateFormatVersion: "2010-09-09"

Description: >-
  tktktk

Parameters:
  EnvironmentType: { Type: String }
  RootStackName: { Type: String }

# Conditions:
#   IsProduction: !Equals [!Ref EnvironmentType, Production]

Resources:
  ResourceShare:
    Type: AWS::RAM::ResourceShare
    Properties:
      AllowExternalPrincipals: false
      Name: !Sub ${RootStackName}_shared
      # Principals:
      #   - String
      # ResourceArns:
      #   - String
      Tags:
        - { Key: prx:meta:tagging-version, Value: "2021-04-07" }
        - { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
        - { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
        - { Key: prx:ops:environment, Value: !Ref EnvironmentType }
        - { Key: prx:dev:application, Value: Common }

# stacks/shared-resource-share.yml
AWSTemplateFormatVersion: "2010-09-09"

Description: >-
  tktktk

Parameters:
  EnvironmentType: { Type: String }
  RootStackName: { Type: String }
  VPCPrivateSubnet1: { Type: "AWS::EC2::Subnet::Id" }
  VPCPrivateSubnet2: { Type: "AWS::EC2::Subnet::Id" }
  VPCPrivateSubnet3: { Type: "AWS::EC2::Subnet::Id" }

# Conditions:
#   IsProduction: !Equals [!Ref EnvironmentType, Production]

Resources:
  ResourceShare:
    Type: AWS::RAM::ResourceShare
    Properties:
      AllowExternalPrincipals: false
      Name: !Sub ${RootStackName}_shared
      # Principals:
      #   - String
      ResourceArns:
        - !Sub arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:subnet/${VPCPrivateSubnet1}
        - !Sub arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:subnet/${VPCPrivateSubnet2}
        - !Sub arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:subnet/${VPCPrivateSubnet3}
      Tags:
        - { Key: prx:meta:tagging-version, Value: "2021-04-07" }
        - { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
        - { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
        - { Key: prx:ops:environment, Value: !Ref EnvironmentType }
        - { Key: prx:dev:application, Value: Common }

Add private subnets to resource share
Add private subnets to resource share
