# stacks/static-sites/radio.radiotopia.fm.yml
AWSTemplateFormatVersion: "2010-09-09"
Description: Radiotopia Radio static site
Parameters:
  CodeS3Bucket:
    Type: String
  StaticSiteArchiveS3ObjectVersion:
    Type: String
  StaticSiteS3StagingDeployBucket:
    Type: AWS::SSM::Parameter::Value<String>
  StaticSiteS3ProductionDeployBucket:
    Type: AWS::SSM::Parameter::Value<String>
  EnvironmentType:
    Type: String
  S3StaticSiteDeployFunctionArn:
    Type: String
Conditions:
  IsProduction: !Equals [!Ref EnvironmentType, Production]
Resources:
  S3StaticDeploy:
    Type: "Custom::S3StaticDeploy"
    Properties:
      ServiceToken: !Ref S3StaticSiteDeployFunctionArn
      Region: !Ref AWS::Region
      StaticSiteArchiveS3Bucket: !Ref CodeS3Bucket
      StaticSiteArchiveS3Object: 's3-static/PRX-radio.radiotopia.fm.zip'
      StaticSiteArchiveS3ObjectVersion: !Ref StaticSiteArchiveS3ObjectVersion
      StaticSiteS3DeployBucket: !If [IsProduction, !Ref StaticSiteS3ProductionDeployBucket, !Ref StaticSiteS3StagingDeployBucket]

# stacks/static-sites/radio.radiotopia.fm.yml
AWSTemplateFormatVersion: "2010-09-09"
Description: Radiotopia Radio static site
Parameters:
  CodeS3Bucket:
    Type: String
  StaticSiteArchiveS3ObjectVersion:
    Type: String
  StaticSiteS3StagingDeployBucket:
    Type: AWS::SSM::Parameter::Value<String>
  StaticSiteS3ProductionDeployBucket:
    Type: AWS::SSM::Parameter::Value<String>
  EnvironmentType:
    Type: String
  S3StaticSiteDeployFunctionArn:
    Type: String
Conditions:
  IsProduction: !Equals [!Ref EnvironmentType, Production]
Resources:
  S3StaticDeploy:
    Type: "Custom::S3StaticDeploy"
    Properties:
      ServiceToken: !Ref S3StaticSiteDeployFunctionArn
      Region: !Ref AWS::Region
      StaticSiteArchiveS3Bucket: !Ref CodeS3Bucket
      StaticSiteArchiveS3Object: "s3-static/PRX-radio.radiotopia.fm.zip"
      StaticSiteArchiveS3ObjectVersion: !Ref StaticSiteArchiveS3ObjectVersion
      StaticSiteS3DeployBucket: !If [IsProduction, !Ref StaticSiteS3ProductionDeployBucket, !Ref StaticSiteS3StagingDeployBucket]

Fix quoting in Radiotopia Radio template
Fix quoting in Radiotopia Radio template
