Version: v1.2

阿里云 RDS

描述

Terraform configuration for Alibaba Cloud RDS object

示例

  1. apiVersion: core.oam.dev/v1beta1
  2. kind: Application
  3. metadata:
  4. name: rds-cloud-source
  5. spec:
  6. components:
  7. - name: sample-db
  8. type: alibaba-rds
  9. properties:
  10. instance_name: sample-db
  11. account_name: oamtest
  12. password: U34rfwefwefffaked
  13. writeConnectionSecretToRef:
  14. name: db-conn

参数说明

属性

名字描述类型是否必须默认值
security_ipsList of IP addresses allowed to access all databases of an instancelisttrue
database_nameDatabase namestringtrue
privilegeThe privilege of one account access database.stringtrue
instance_nameRDS instance namestringtrue
account_nameRDS instance user account namestringtrue
passwordRDS instance account passwordstringtrue
allocate_public_connectionWhether to allocate public connection for a RDS instance.booltrue
writeConnectionSecretToRefThe secret which the cloud resource connection will be written towriteConnectionSecretToReffalse

writeConnectionSecretToRef

名字描述类型是否必须默认值
nameThe secret name which the cloud resource connection will be written tostringtrue
namespaceThe secret namespace which the cloud resource connection will be written tostringfalse

输出

如果设置了 writeConnectionSecretToRef,一个 Kubernetes Secret 将会被创建,并且,它的数据里有这些键(key):

名字描述
DB_PORTRDS Instance Port
DB_HOSTRDS Instance Host
DB_PASSWORDRDS Instance Password
DB_PUBLIC_HOSTRDS Instance Public Host
DATABASE_NAMERDS Database Name
DB_IDRDS Instance ID
DB_NAMERDS Instance Name
DB_USERRDS Instance User