title: How to export a resource name and use in different Cloudformation Stackset?
body: <p>I created a CloudFormation Stackset that deployed AWS Config Rules to two accounts.  Now I want to create a stackset that deploys the Remediation. the bottom lines of code work when I have it all in one CFT.  but I want to deploy te detection rules in one script first then the remediation rules second. How can I reference the S3BucketEncryptionEnabled Resource from a different scipt?</p>
  <pre><code>---------------------Detection --------------------------------------------------------
   S3BucketEncryptionEnabled:
      Type:  AWS::Config::ConfigRule
      Properties:
        Description: Checks that your Amazon S3 bucket either has S3 default encryption enabled or that the S3 bucket policy explicitly denies put-object requests without server side encryption.
        Source:
          Owner: AWS
          SourceIdentifier: S3_BUCKET_SERVER_SIDE_ENCRYPTION_ENABLED
        Scope:
          ComplianceResourceTypes:
            - AWS::S3::Bucket
      DependsOn: ConfigRecorder
  
  ----------------------Remediation Script-----------------------------------------------
  BasicRemediationConfiguration:
      Type: &quot;AWS::Config::RemediationConfiguration&quot;
      Properties:
          Automatic: True
          MaximumAutomaticAttempts: 5
          RetryAttemptSeconds: 60
          ConfigRuleName: !Ref S3BucketEncryptionEnabled
          Parameters:
              AutomationAssumeRole:
                  StaticValue:
                      Values: [{&quot;Fn::GetAtt&quot; : [&quot;S3Role&quot;,&quot;Arn&quot;]}]       
                      
              BucketName:
                  ResourceValue:
                      Value: RESOURCE_ID
  
  
              SSEAlgorithm:
                  StaticValue:
                      Values: [AES256]
          TargetId: &quot;AWS-EnableS3BucketEncryption&quot;
          TargetType: &quot;SSM_DOCUMENT&quot;
          TargetVersion: &quot;1&quot;
  </code></pre>