全部产品
Search
文档中心

资源编排:ALIYUN::GPDB::SupabaseProject

更新时间:Jul 15, 2026

ALIYUN::GPDB::SupabaseProject类型用于创建Supabase项目。

语法

{
  "Type": "ALIYUN::GPDB::SupabaseProject",
  "Properties": {
    "AccountPassword": String,
    "ProjectSpec": String,
    "ProjectName": String,
    "SecurityIPList": String,
    "VpcId": String,
    "VSwitchId": String,
    "ZoneId": String,
    "Period": String,
    "UsedTime": Integer,
    "PayType": String,
    "DiskPerformanceLevel": String,
    "StorageSize": Integer,
    "DatabaseIPList": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

AccountPassword

String

初始账户的密码。

约束:

  • 由大写字母、小写字母、数字、特殊字符其中三种及以上组成。

  • 支持的特殊字符:!@#$%^&*()_+-=

  • 长度为 8~32 个字符。

ProjectName

String

项目名称。

命名规则如下:

  • 长度为 1~128 字符。

  • 只能包含英文字母,数字,短划线(-)和下划线(_)。

  • 必须以英文字母或下划线(_)开头。

ProjectSpec

String

Supabase 实例规格。

默认为 1C1G。

SecurityIPList

String

IP 白名单。

127.0.0.1 表示禁止任何外部 IP 访问。

VpcId

String

VPC ID。

VSwitchId

String

交换机ID。

ZoneId

String

可用区 ID。

DatabaseIPList

String

数据库白名单。

DiskPerformanceLevel

String

云盘 PL 等级。

默认 PL0。取值可选:

  • PL0

  • PL1

PayType

String

计费类型。

取值说明:

  • Postpaid:按量付费。

  • Prepaid:包年包月。

  • Free: 免费。

Period

String

购买资源的时长。

StorageSize

Integer

存储空间大小。

单位 GB,默认 1GB。

UsedTime

Integer

实例使用时间。

返回值

Fn::GetAtt

  • ProjectId:Supabase 实例 ID

  • ApiKeys:Supabase 实例 API Keys。

  • Eni:弹性网卡 ID。

  • PublicConnectUrl:Supabase Dashboard 公网连接串。

  • PrivateConnectUrl:Supabase Dashboard 内网连接串。

示例

场景 1 :创建免费版Supabase项目

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: 创建免费版Supabase项目,快速体验Supabase开发能力。
  en: Create a free Supabase project for quick development experience.
Parameters:
  ZoneId:
    Type: String
    Label:
      zh-cn: 可用区
      en: Availability Zone
    Description:
      zh-cn: 创建Supabase项目的可用区。
      en: The availability zone for the Supabase project.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
  VpcId:
    Type: String
    Label:
      zh-cn: VPC ID
      en: VPC ID
    Description:
      zh-cn: Supabase项目所在的专有网络ID。
      en: The VPC ID for the Supabase project.
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    Label:
      zh-cn: 交换机ID
      en: VSwitch ID
    Description:
      zh-cn: Supabase项目所在的交换机ID,需与可用区一致。
      en: The VSwitch ID, must be in the same availability zone.
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
  ProjectName:
    Type: String
    Label:
      zh-cn: 项目名称
      en: Project Name
    Description:
      zh-cn: >-
        Supabase项目名称,1~128个字符,
        以英文字母或下划线开头,
        只能包含英文字母、数字、短横线和下划线。
      en: >-
        Supabase project name, 1-128 characters,
        starting with a letter or underscore.
    AllowedPattern: '^[a-zA-Z_][a-zA-Z0-9_-]{0,127}$'
  AccountPassword:
    Type: String
    Label:
      zh-cn: 初始账号密码
      en: Account Password
    Description:
      zh-cn: >-
        初始账号密码,8~32个字符,
        至少包含大写字母、小写字母、数字和特殊字符中的三种。
      en: >-
        Initial account password, 8-32 characters,
        must contain at least three of: uppercase, lowercase, digits, special characters.
    NoEcho: true
    MinLength: 8
    MaxLength: 32
Resources:
  SupabaseProject:
    Type: ALIYUN::GPDB::SupabaseProject
    Properties:
      ProjectName:
        Ref: ProjectName
      ProjectSpec: 1C1G
      AccountPassword:
        Ref: AccountPassword
      SecurityIPList: 127.0.0.1
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      ZoneId:
        Ref: ZoneId
      PayType: Free
Outputs:
  ProjectId:
    Label:
      zh-cn: 项目ID
      en: Project ID
    Description:
      zh-cn: 创建成功的Supabase项目ID。
      en: The ID of the created Supabase project.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - ProjectId
  PrivateConnectUrl:
    Label:
      zh-cn: 内网连接地址
      en: Private Connect URL
    Description:
      zh-cn: Supabase Dashboard内网连接串。
      en: The private connection URL for Supabase Dashboard.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - PrivateConnectUrl
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "创建免费版Supabase项目,快速体验Supabase开发能力。",
    "en": "Create a free Supabase project for quick development experience."
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Label": {
        "zh-cn": "可用区",
        "en": "Availability Zone"
      },
      "Description": {
        "zh-cn": "创建Supabase项目的可用区。",
        "en": "The availability zone for the Supabase project."
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
    },
    "VpcId": {
      "Type": "String",
      "Label": {
        "zh-cn": "VPC ID",
        "en": "VPC ID"
      },
      "Description": {
        "zh-cn": "Supabase项目所在的专有网络ID。",
        "en": "The VPC ID for the Supabase project."
      },
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "Label": {
        "zh-cn": "交换机ID",
        "en": "VSwitch ID"
      },
      "Description": {
        "zh-cn": "Supabase项目所在的交换机ID,需与可用区一致。",
        "en": "The VSwitch ID, must be in the same availability zone."
      },
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      }
    },
    "ProjectName": {
      "Type": "String",
      "Label": {
        "zh-cn": "项目名称",
        "en": "Project Name"
      },
      "Description": {
        "zh-cn": "Supabase项目名称,1~128个字符,以英文字母或下划线开头,只能包含英文字母、数字、短横线和下划线。",
        "en": "Supabase project name, 1-128 characters, starting with a letter or underscore."
      },
      "AllowedPattern": "^[a-zA-Z_][a-zA-Z0-9_-]{0,127}$"
    },
    "AccountPassword": {
      "Type": "String",
      "Label": {
        "zh-cn": "初始账号密码",
        "en": "Account Password"
      },
      "Description": {
        "zh-cn": "初始账号密码,8~32个字符,至少包含大写字母、小写字母、数字和特殊字符中的三种。",
        "en": "Initial account password, 8-32 characters, must contain at least three of: uppercase, lowercase, digits, special characters."
      },
      "NoEcho": true,
      "MinLength": 8,
      "MaxLength": 32
    }
  },
  "Resources": {
    "SupabaseProject": {
      "Type": "ALIYUN::GPDB::SupabaseProject",
      "Properties": {
        "ProjectName": {
          "Ref": "ProjectName"
        },
        "ProjectSpec": "1C1G",
        "AccountPassword": {
          "Ref": "AccountPassword"
        },
        "SecurityIPList": "127.0.0.1",
        "VpcId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "PayType": "Free"
      }
    }
  },
  "Outputs": {
    "ProjectId": {
      "Label": {
        "zh-cn": "项目ID",
        "en": "Project ID"
      },
      "Description": {
        "zh-cn": "创建成功的Supabase项目ID。",
        "en": "The ID of the created Supabase project."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "ProjectId"
        ]
      }
    },
    "PrivateConnectUrl": {
      "Label": {
        "zh-cn": "内网连接地址",
        "en": "Private Connect URL"
      },
      "Description": {
        "zh-cn": "Supabase Dashboard内网连接串。",
        "en": "The private connection URL for Supabase Dashboard."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "PrivateConnectUrl"
        ]
      }
    }
  }
}

场景 2 :创建按量付费Supabase项目,配置自定义存储和磁盘性能等级。

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: 创建按量付费Supabase项目,配置自定义存储和磁盘性能等级。
  en: Create a postpaid Supabase project with custom storage and disk performance.
Parameters:
  ZoneId:
    Type: String
    Label:
      zh-cn: 可用区
      en: Availability Zone
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
  VpcId:
    Type: String
    Label:
      zh-cn: VPC ID
      en: VPC ID
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    Label:
      zh-cn: 交换机ID
      en: VSwitch ID
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
  ProjectName:
    Type: String
    Label:
      zh-cn: 项目名称
      en: Project Name
    Description:
      zh-cn: >-
        Supabase项目名称,1~128个字符,
        以英文字母或下划线开头。
      en: >-
        Supabase project name, 1-128 characters,
        starting with a letter or underscore.
    AllowedPattern: '^[a-zA-Z_][a-zA-Z0-9_-]{0,127}$'
  ProjectSpec:
    Type: String
    Label:
      zh-cn: 实例规格
      en: Instance Spec
    Description:
      zh-cn: Supabase实例规格。
      en: The Supabase instance specification.
    Default: 1C1G
  AccountPassword:
    Type: String
    Label:
      zh-cn: 初始账号密码
      en: Account Password
    Description:
      zh-cn: 初始账号密码,8~32个字符。
      en: Initial account password, 8-32 characters.
    NoEcho: true
    MinLength: 8
    MaxLength: 32
  SecurityIPList:
    Type: String
    Label:
      zh-cn: 安全访问白名单
      en: Security IP Whitelist
    Description:
      zh-cn: >-
        允许访问的IP白名单,多个IP用英文逗号分隔。
        设置为127.0.0.1表示禁止所有外部IP访问。
      en: >-
        IP whitelist for access control, multiple IPs separated by commas.
        Set to 127.0.0.1 to deny all external access.
    Default: 127.0.0.1
  DatabaseIPList:
    Type: String
    Label:
      zh-cn: 数据库白名单
      en: Database IP Whitelist
    Description:
      zh-cn: 数据库访问的IP白名单,多个IP用英文逗号分隔。
      en: Database access IP whitelist, multiple IPs separated by commas.
    Default: ''
  StorageSize:
    Type: Number
    Label:
      zh-cn: 存储空间大小
      en: Storage Size
    Description:
      zh-cn: 存储空间大小,单位GB。
      en: Storage size in GB.
    Default: 50
    MinValue: 1
  DiskPerformanceLevel:
    Type: String
    Label:
      zh-cn: 磁盘性能等级
      en: Disk Performance Level
    Description:
      zh-cn: >-
        云盘PL等级。
        PL0:适用于一般性能需求的场景。
        PL1:适用于高性能需求的场景。
      en: >-
        Disk performance level.
        PL0: for general performance needs.
        PL1: for high performance needs.
    Default: PL1
    AllowedValues:
      - PL0
      - PL1
Resources:
  SupabaseProject:
    Type: ALIYUN::GPDB::SupabaseProject
    Properties:
      ProjectName:
        Ref: ProjectName
      ProjectSpec:
        Ref: ProjectSpec
      AccountPassword:
        Ref: AccountPassword
      SecurityIPList:
        Ref: SecurityIPList
      DatabaseIPList:
        Ref: DatabaseIPList
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      ZoneId:
        Ref: ZoneId
      PayType: Postpaid
      StorageSize:
        Ref: StorageSize
      DiskPerformanceLevel:
        Ref: DiskPerformanceLevel
Outputs:
  ProjectId:
    Label:
      zh-cn: 项目ID
      en: Project ID
    Description:
      zh-cn: 创建成功的Supabase项目ID。
      en: The ID of the created Supabase project.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - ProjectId
  ApiKeys:
    Label:
      zh-cn: API密钥
      en: API Keys
    Description:
      zh-cn: Supabase项目的API Keys。
      en: The API Keys of the Supabase project.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - ApiKeys
  PublicConnectUrl:
    Label:
      zh-cn: 公网连接地址
      en: Public Connect URL
    Description:
      zh-cn: Supabase Dashboard公网连接串。
      en: The public connection URL for Supabase Dashboard.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - PublicConnectUrl
  PrivateConnectUrl:
    Label:
      zh-cn: 内网连接地址
      en: Private Connect URL
    Description:
      zh-cn: Supabase Dashboard内网连接串。
      en: The private connection URL for Supabase Dashboard.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - PrivateConnectUrl
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "创建按量付费Supabase项目,配置自定义存储和磁盘性能等级。",
    "en": "Create a postpaid Supabase project with custom storage and disk performance."
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Label": {
        "zh-cn": "可用区",
        "en": "Availability Zone"
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
    },
    "VpcId": {
      "Type": "String",
      "Label": {
        "zh-cn": "VPC ID",
        "en": "VPC ID"
      },
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "Label": {
        "zh-cn": "交换机ID",
        "en": "VSwitch ID"
      },
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      }
    },
    "ProjectName": {
      "Type": "String",
      "Label": {
        "zh-cn": "项目名称",
        "en": "Project Name"
      },
      "Description": {
        "zh-cn": "Supabase项目名称,1~128个字符,以英文字母或下划线开头。",
        "en": "Supabase project name, 1-128 characters, starting with a letter or underscore."
      },
      "AllowedPattern": "^[a-zA-Z_][a-zA-Z0-9_-]{0,127}$"
    },
    "ProjectSpec": {
      "Type": "String",
      "Label": {
        "zh-cn": "实例规格",
        "en": "Instance Spec"
      },
      "Description": {
        "zh-cn": "Supabase实例规格。",
        "en": "The Supabase instance specification."
      },
      "Default": "1C1G"
    },
    "AccountPassword": {
      "Type": "String",
      "Label": {
        "zh-cn": "初始账号密码",
        "en": "Account Password"
      },
      "Description": {
        "zh-cn": "初始账号密码,8~32个字符。",
        "en": "Initial account password, 8-32 characters."
      },
      "NoEcho": true,
      "MinLength": 8,
      "MaxLength": 32
    },
    "SecurityIPList": {
      "Type": "String",
      "Label": {
        "zh-cn": "安全访问白名单",
        "en": "Security IP Whitelist"
      },
      "Description": {
        "zh-cn": "允许访问的IP白名单,多个IP用英文逗号分隔。设置为127.0.0.1表示禁止所有外部IP访问。",
        "en": "IP whitelist for access control, multiple IPs separated by commas. Set to 127.0.0.1 to deny all external access."
      },
      "Default": "127.0.0.1"
    },
    "DatabaseIPList": {
      "Type": "String",
      "Label": {
        "zh-cn": "数据库白名单",
        "en": "Database IP Whitelist"
      },
      "Description": {
        "zh-cn": "数据库访问的IP白名单,多个IP用英文逗号分隔。",
        "en": "Database access IP whitelist, multiple IPs separated by commas."
      },
      "Default": ""
    },
    "StorageSize": {
      "Type": "Number",
      "Label": {
        "zh-cn": "存储空间大小",
        "en": "Storage Size"
      },
      "Description": {
        "zh-cn": "存储空间大小,单位GB。",
        "en": "Storage size in GB."
      },
      "Default": 50,
      "MinValue": 1
    },
    "DiskPerformanceLevel": {
      "Type": "String",
      "Label": {
        "zh-cn": "磁盘性能等级",
        "en": "Disk Performance Level"
      },
      "Description": {
        "zh-cn": "云盘PL等级。PL0:适用于一般性能需求的场景。PL1:适用于高性能需求的场景。",
        "en": "Disk performance level. PL0: for general performance needs. PL1: for high performance needs."
      },
      "Default": "PL1",
      "AllowedValues": [
        "PL0",
        "PL1"
      ]
    }
  },
  "Resources": {
    "SupabaseProject": {
      "Type": "ALIYUN::GPDB::SupabaseProject",
      "Properties": {
        "ProjectName": {
          "Ref": "ProjectName"
        },
        "ProjectSpec": {
          "Ref": "ProjectSpec"
        },
        "AccountPassword": {
          "Ref": "AccountPassword"
        },
        "SecurityIPList": {
          "Ref": "SecurityIPList"
        },
        "DatabaseIPList": {
          "Ref": "DatabaseIPList"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "PayType": "Postpaid",
        "StorageSize": {
          "Ref": "StorageSize"
        },
        "DiskPerformanceLevel": {
          "Ref": "DiskPerformanceLevel"
        }
      }
    }
  },
  "Outputs": {
    "ProjectId": {
      "Label": {
        "zh-cn": "项目ID",
        "en": "Project ID"
      },
      "Description": {
        "zh-cn": "创建成功的Supabase项目ID。",
        "en": "The ID of the created Supabase project."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "ProjectId"
        ]
      }
    },
    "ApiKeys": {
      "Label": {
        "zh-cn": "API密钥",
        "en": "API Keys"
      },
      "Description": {
        "zh-cn": "Supabase项目的API Keys。",
        "en": "The API Keys of the Supabase project."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "ApiKeys"
        ]
      }
    },
    "PublicConnectUrl": {
      "Label": {
        "zh-cn": "公网连接地址",
        "en": "Public Connect URL"
      },
      "Description": {
        "zh-cn": "Supabase Dashboard公网连接串。",
        "en": "The public connection URL for Supabase Dashboard."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "PublicConnectUrl"
        ]
      }
    },
    "PrivateConnectUrl": {
      "Label": {
        "zh-cn": "内网连接地址",
        "en": "Private Connect URL"
      },
      "Description": {
        "zh-cn": "Supabase Dashboard内网连接串。",
        "en": "The private connection URL for Supabase Dashboard."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "PrivateConnectUrl"
        ]
      }
    }
  }
}

场景 3 :创建包年包月Supabase项目,配置完整的网络和存储参数。

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: 创建包年包月Supabase生产项目,配置完整的网络和存储参数。
  en: Create a prepaid Supabase production project with full network and storage config.
Parameters:
  ZoneId:
    Type: String
    Label:
      zh-cn: 可用区
      en: Availability Zone
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
  VpcId:
    Type: String
    Label:
      zh-cn: VPC ID
      en: VPC ID
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    Label:
      zh-cn: 交换机ID
      en: VSwitch ID
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
  ProjectName:
    Type: String
    Label:
      zh-cn: 项目名称
      en: Project Name
    Description:
      zh-cn: >-
        Supabase项目名称,1~128个字符,
        以英文字母或下划线开头。
      en: >-
        Supabase project name, 1-128 characters,
        starting with a letter or underscore.
    AllowedPattern: '^[a-zA-Z_][a-zA-Z0-9_-]{0,127}$'
  ProjectSpec:
    Type: String
    Label:
      zh-cn: 实例规格
      en: Instance Spec
    Description:
      zh-cn: Supabase实例规格,根据业务负载选择合适的规格。
      en: Supabase instance spec, choose based on workload.
    Default: 2C4G
  AccountPassword:
    Type: String
    Label:
      zh-cn: 初始账号密码
      en: Account Password
    Description:
      zh-cn: >-
        初始账号密码,8~32个字符,
        至少包含大写字母、小写字母、数字和特殊字符中的三种。
      en: >-
        Initial account password, 8-32 characters,
        must contain at least three character types.
    NoEcho: true
    MinLength: 8
    MaxLength: 32
  SecurityIPList:
    Type: String
    Label:
      zh-cn: 安全访问白名单
      en: Security IP Whitelist
    Description:
      zh-cn: >-
        允许访问的IP白名单,多个IP用英文逗号分隔。
        生产环境建议配置为具体的应用服务器IP。
      en: >-
        IP whitelist for access, multiple IPs separated by commas.
        For production, set to specific application server IPs.
  DatabaseIPList:
    Type: String
    Label:
      zh-cn: 数据库白名单
      en: Database IP Whitelist
    Description:
      zh-cn: 数据库访问的IP白名单,多个IP用英文逗号分隔。
      en: Database access IP whitelist, multiple IPs separated by commas.
    Default: ''
  StorageSize:
    Type: Number
    Label:
      zh-cn: 存储空间大小
      en: Storage Size (GB)
    Description:
      zh-cn: 存储空间大小,单位GB,根据数据量规划选择。
      en: Storage size in GB, choose based on data volume planning.
    Default: 200
    MinValue: 1
  Period:
    Type: String
    Label:
      zh-cn: 购买时长单位
      en: Period Unit
    Description:
      zh-cn: 购买资源的时长单位。
      en: The period unit of the purchase.
    Default: Month
    AllowedValues:
      - Month
      - Year
  UsedTime:
    Type: Number
    Label:
      zh-cn: 购买时长
      en: Used Time
    Description:
      zh-cn: >-
        购买时长。
        当Period为Month时,取值范围1~9。
        当Period为Year时,取值范围1~3。
      en: >-
        Purchase duration.
        When Period is Month, valid values: 1-9.
        When Period is Year, valid values: 1-3.
    Default: 3
    MinValue: 1
    MaxValue: 9
Resources:
  SupabaseProject:
    Type: ALIYUN::GPDB::SupabaseProject
    Properties:
      ProjectName:
        Ref: ProjectName
      ProjectSpec:
        Ref: ProjectSpec
      AccountPassword:
        Ref: AccountPassword
      SecurityIPList:
        Ref: SecurityIPList
      DatabaseIPList:
        Ref: DatabaseIPList
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      ZoneId:
        Ref: ZoneId
      PayType: Prepaid
      DiskPerformanceLevel: PL1
      StorageSize:
        Ref: StorageSize
      Period:
        Ref: Period
      UsedTime:
        Ref: UsedTime
Outputs:
  ProjectId:
    Label:
      zh-cn: 项目ID
      en: Project ID
    Description:
      zh-cn: 创建成功的Supabase项目ID。
      en: The ID of the created Supabase project.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - ProjectId
  ApiKeys:
    Label:
      zh-cn: API密钥
      en: API Keys
    Description:
      zh-cn: Supabase项目的API Keys。
      en: The API Keys of the Supabase project.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - ApiKeys
  Eni:
    Label:
      zh-cn: 弹性网卡ID
      en: ENI ID
    Description:
      zh-cn: Supabase项目的弹性网卡ID。
      en: The ENI ID of the Supabase project.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - Eni
  PublicConnectUrl:
    Label:
      zh-cn: 公网连接地址
      en: Public Connect URL
    Description:
      zh-cn: Supabase Dashboard公网连接串。
      en: The public connection URL for Supabase Dashboard.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - PublicConnectUrl
  PrivateConnectUrl:
    Label:
      zh-cn: 内网连接地址
      en: Private Connect URL
    Description:
      zh-cn: Supabase Dashboard内网连接串。
      en: The private connection URL for Supabase Dashboard.
    Value:
      Fn::GetAtt:
        - SupabaseProject
        - PrivateConnectUrl
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "创建包年包月Supabase生产项目,配置完整的网络和存储参数。",
    "en": "Create a prepaid Supabase production project with full network and storage config."
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Label": {
        "zh-cn": "可用区",
        "en": "Availability Zone"
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
    },
    "VpcId": {
      "Type": "String",
      "Label": {
        "zh-cn": "VPC ID",
        "en": "VPC ID"
      },
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "Label": {
        "zh-cn": "交换机ID",
        "en": "VSwitch ID"
      },
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      }
    },
    "ProjectName": {
      "Type": "String",
      "Label": {
        "zh-cn": "项目名称",
        "en": "Project Name"
      },
      "Description": {
        "zh-cn": "Supabase项目名称,1~128个字符,以英文字母或下划线开头。",
        "en": "Supabase project name, 1-128 characters, starting with a letter or underscore."
      },
      "AllowedPattern": "^[a-zA-Z_][a-zA-Z0-9_-]{0,127}$"
    },
    "ProjectSpec": {
      "Type": "String",
      "Label": {
        "zh-cn": "实例规格",
        "en": "Instance Spec"
      },
      "Description": {
        "zh-cn": "Supabase实例规格,根据业务负载选择合适的规格。",
        "en": "Supabase instance spec, choose based on workload."
      },
      "Default": "2C4G"
    },
    "AccountPassword": {
      "Type": "String",
      "Label": {
        "zh-cn": "初始账号密码",
        "en": "Account Password"
      },
      "Description": {
        "zh-cn": "初始账号密码,8~32个字符,至少包含大写字母、小写字母、数字和特殊字符中的三种。",
        "en": "Initial account password, 8-32 characters, must contain at least three character types."
      },
      "NoEcho": true,
      "MinLength": 8,
      "MaxLength": 32
    },
    "SecurityIPList": {
      "Type": "String",
      "Label": {
        "zh-cn": "安全访问白名单",
        "en": "Security IP Whitelist"
      },
      "Description": {
        "zh-cn": "允许访问的IP白名单,多个IP用英文逗号分隔。生产环境建议配置为具体的应用服务器IP。",
        "en": "IP whitelist for access, multiple IPs separated by commas. For production, set to specific application server IPs."
      }
    },
    "DatabaseIPList": {
      "Type": "String",
      "Label": {
        "zh-cn": "数据库白名单",
        "en": "Database IP Whitelist"
      },
      "Description": {
        "zh-cn": "数据库访问的IP白名单,多个IP用英文逗号分隔。",
        "en": "Database access IP whitelist, multiple IPs separated by commas."
      },
      "Default": ""
    },
    "StorageSize": {
      "Type": "Number",
      "Label": {
        "zh-cn": "存储空间大小",
        "en": "Storage Size (GB)"
      },
      "Description": {
        "zh-cn": "存储空间大小,单位GB,根据数据量规划选择。",
        "en": "Storage size in GB, choose based on data volume planning."
      },
      "Default": 200,
      "MinValue": 1
    },
    "Period": {
      "Type": "String",
      "Label": {
        "zh-cn": "购买时长单位",
        "en": "Period Unit"
      },
      "Description": {
        "zh-cn": "购买资源的时长单位。",
        "en": "The period unit of the purchase."
      },
      "Default": "Month",
      "AllowedValues": [
        "Month",
        "Year"
      ]
    },
    "UsedTime": {
      "Type": "Number",
      "Label": {
        "zh-cn": "购买时长",
        "en": "Used Time"
      },
      "Description": {
        "zh-cn": "购买时长。当Period为Month时,取值范围1~9。当Period为Year时,取值范围1~3。",
        "en": "Purchase duration. When Period is Month, valid values: 1-9. When Period is Year, valid values: 1-3."
      },
      "Default": 3,
      "MinValue": 1,
      "MaxValue": 9
    }
  },
  "Resources": {
    "SupabaseProject": {
      "Type": "ALIYUN::GPDB::SupabaseProject",
      "Properties": {
        "ProjectName": {
          "Ref": "ProjectName"
        },
        "ProjectSpec": {
          "Ref": "ProjectSpec"
        },
        "AccountPassword": {
          "Ref": "AccountPassword"
        },
        "SecurityIPList": {
          "Ref": "SecurityIPList"
        },
        "DatabaseIPList": {
          "Ref": "DatabaseIPList"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "PayType": "Prepaid",
        "DiskPerformanceLevel": "PL1",
        "StorageSize": {
          "Ref": "StorageSize"
        },
        "Period": {
          "Ref": "Period"
        },
        "UsedTime": {
          "Ref": "UsedTime"
        }
      }
    }
  },
  "Outputs": {
    "ProjectId": {
      "Label": {
        "zh-cn": "项目ID",
        "en": "Project ID"
      },
      "Description": {
        "zh-cn": "创建成功的Supabase项目ID。",
        "en": "The ID of the created Supabase project."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "ProjectId"
        ]
      }
    },
    "ApiKeys": {
      "Label": {
        "zh-cn": "API密钥",
        "en": "API Keys"
      },
      "Description": {
        "zh-cn": "Supabase项目的API Keys。",
        "en": "The API Keys of the Supabase project."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "ApiKeys"
        ]
      }
    },
    "Eni": {
      "Label": {
        "zh-cn": "弹性网卡ID",
        "en": "ENI ID"
      },
      "Description": {
        "zh-cn": "Supabase项目的弹性网卡ID。",
        "en": "The ENI ID of the Supabase project."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "Eni"
        ]
      }
    },
    "PublicConnectUrl": {
      "Label": {
        "zh-cn": "公网连接地址",
        "en": "Public Connect URL"
      },
      "Description": {
        "zh-cn": "Supabase Dashboard公网连接串。",
        "en": "The public connection URL for Supabase Dashboard."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "PublicConnectUrl"
        ]
      }
    },
    "PrivateConnectUrl": {
      "Label": {
        "zh-cn": "内网连接地址",
        "en": "Private Connect URL"
      },
      "Description": {
        "zh-cn": "Supabase Dashboard内网连接串。",
        "en": "The private connection URL for Supabase Dashboard."
      },
      "Value": {
        "Fn::GetAtt": [
          "SupabaseProject",
          "PrivateConnectUrl"
        ]
      }
    }
  }
}