def GenerateConfig(context):
    'Generate configuration.'
    base_name = context.env['name']
    instance = {'zone': context.properties['zone'], 'machineType': ZonalComputeUrl(context.env['project'], context.properties['zone'], 'machineTypes', 'f1-micro'), 'metadata': {'items': [{'key': 'gce-container-declaration', 'value': GenerateManifest(context)}]}, 'disks': [{'deviceName': 'boot', 'type': 'PERSISTENT', 'autoDelete': True, 'boot': True, 'initializeParams': {'diskName': (base_name + '-disk'), 'sourceImage': GlobalComputeUrl('cos-cloud', 'images', context.properties['containerImage'])}}], 'networkInterfaces': [{'accessConfigs': [{'name': 'external-nat', 'type': 'ONE_TO_ONE_NAT'}], 'network': GlobalComputeUrl(context.env['project'], 'networks', 'default')}], 'serviceAccounts': [{'email': 'default', 'scopes': ['https://www.googleapis.com/auth/logging.write']}]}
    resources = {'resources': [{'name': base_name, 'type': 'compute.v1.instance', 'properties': instance}]}
    return resources
Generate configuration.
def GenerateConfig(context):
    
    base_name = context.env['name']
    instance = {'zone': context.properties['zone'], 'machineType': ZonalComputeUrl(context.env['project'], context.properties['zone'], 'machineTypes', 'f1-micro'), 'metadata': {'items': [{'key': 'gce-container-declaration', 'value': GenerateManifest(context)}]}, 'disks': [{'deviceName': 'boot', 'type': 'PERSISTENT', 'autoDelete': True, 'boot': True, 'initializeParams': {'diskName': (base_name + '-disk'), 'sourceImage': GlobalComputeUrl('cos-cloud', 'images', context.properties['containerImage'])}}], 'networkInterfaces': [{'accessConfigs': [{'name': 'external-nat', 'type': 'ONE_TO_ONE_NAT'}], 'network': GlobalComputeUrl(context.env['project'], 'networks', 'default')}], 'serviceAccounts': [{'email': 'default', 'scopes': ['https://www.googleapis.com/auth/logging.write']}]}
    resources = {'resources': [{'name': base_name, 'type': 'compute.v1.instance', 'properties': instance}]}
    return resources