Adding current date as InstanceCreateTime parameter (RDS)
This commit is contained in:
parent
cae86a8eeb
commit
2c744f2a59
@ -1,6 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import copy
|
||||
import datetime
|
||||
|
||||
import boto.rds
|
||||
from jinja2 import Template
|
||||
@ -49,6 +50,7 @@ class Database(object):
|
||||
self.availability_zone = kwargs.get("availability_zone")
|
||||
self.multi_az = kwargs.get("multi_az")
|
||||
self.db_subnet_group_name = kwargs.get("db_subnet_group_name")
|
||||
self.instance_create_time = str(datetime.datetime.now())
|
||||
if self.db_subnet_group_name:
|
||||
self.db_subnet_group = rds_backends[self.region].describe_subnet_groups(self.db_subnet_group_name)[0]
|
||||
else:
|
||||
@ -206,6 +208,7 @@ class Database(object):
|
||||
<StorageType>{{ database.storage_type }}</StorageType>
|
||||
{% endif %}
|
||||
<DBInstanceClass>{{ database.db_instance_class }}</DBInstanceClass>
|
||||
<InstanceCreateTime>{{ database.instance_create_time }}</InstanceCreateTime>
|
||||
<MasterUsername>{{ database.master_username }}</MasterUsername>
|
||||
<Endpoint>
|
||||
<Address>{{ database.address }}</Address>
|
||||
|
Loading…
Reference in New Issue
Block a user