AWSTemplateFormatVersion: "2010-09-09" Description: Custom Resource to get FSx for Windows DNS name and Preferred IP address. Parameters: PythonLayerArn: Type: String FSxFileSystemId: Type: String ResourceTags: Type: String Transform: AWS::Serverless-2016-10-31 Resources: FSxFunction: Type: AWS::Serverless::Function Metadata: cfn_nag: rules_to_suppress: - id: W11 reason: fsx:DescribeFileSystems supports all resources. Properties: Handler: fsx.handler Runtime: python3.8 CodeUri: ../src/fsx/ Layers: - !Ref PythonLayerArn Policies: - Version: "2012-10-17" Statement: - Effect: Allow Action: - fsx:DescribeFileSystems Resource: '*' Tags: Name: !Join [/, [!Ref ResourceTags, FSxDnsNameFunction]] FSxCustom: Type: Custom::FSxDnsName Properties: ServiceToken: !GetAtt FSxFunction.Arn FSxFileSystemId: !Ref FSxFileSystemId Version: "1.0" Outputs: FSxDNSName: Value: !GetAtt FSxCustom.FSxDNSName FSxPrivateIP: Value: !GetAtt FSxCustom.FSxPrivateIP