template: templateName: MyStackTemplate templateVersion: 1.0.2 templateDescription: Create an Oracle database parameters: dbPassword: label: Database Password description: The password for the DB system administrator type: Password mandatory: true minLength: 8 maxLength: 30 publicKey: label: SSH Public Key description: 'Generate a new key pair, enter a key value, or upload a key file' type: Ssh mandatory: true parameterGroups: [] attributes: {} conditions: {} mappings: {} resources: dbactions: type: SoftwareComponent parameters: configs: - actions: [CREATE] name: createSchema config: 'Fn::Base64': 'Fn::Join': - "\n" - - scriptFile=~/createSchema.sh - scriptLog=~/createSchema.log - rm -f ${scriptFile} - touch ${scriptFile} - touch ${scriptLog} - echo "sqlplus / as sysdba << EOF" >> ${scriptFile} - echo "drop user c##myappuser cascade;" >> ${scriptFile} - echo "create user c##myappuser identified by ${schemaPassword};" >> ${scriptFile} - echo "grant create session, create table, unlimited tablespace to c##myappuser;" >> ${scriptFile} - echo "quit" >> ${scriptFile} - echo "EOF" >> ${scriptFile} - sh ${scriptFile} >> ${scriptLog} runAsUser: oracle timeout: 1 continueOnFailure: false inputs: - name: schemaPassword oracledb1: type: DBaaS parameters: serviceName: 'Fn::Join': - '' - - 'Fn::GetParam': serviceName - DB shape: oc3 vmPublicKeyText: 'Fn::GetParam': publicKey subscriptionType: HOURLY level: PAAS version: 12.2.0.1 edition: SE parameters: - type: db usableStorage: 15 adminPassword: 'Fn::GetParam': dbPassword sid: ORCL backupDestination: NONE configs: - name: oracledb1-dbactions config: 'Fn::GetResource': dbactions params: schemaPassword: 'Fn::GetParam': dbPassword depends_on: [] viewMetadata: zoom: translate: - 0 - 0 scale: 1 coordinates: oracledb1: x: 245 y: 99.015625