From b090dbd17a9943773493d5d2371579007c69acf1 Mon Sep 17 00:00:00 2001 From: Keith Stevens Date: Mon, 8 Jul 2024 12:59:23 -0700 Subject: [PATCH] Adding a sample soc2 config and fixing a long line --- examples/aws_soc2.yaml | 25 +++++++++++++++++++++++++ sky/resources.py | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 examples/aws_soc2.yaml diff --git a/examples/aws_soc2.yaml b/examples/aws_soc2.yaml new file mode 100644 index 00000000000..1e992bd7c4d --- /dev/null +++ b/examples/aws_soc2.yaml @@ -0,0 +1,25 @@ +# A minimal soc2 example. +# +# Runs a task that simply lists the default conda environments. +# +# Usage: +# sky launch -c min-soc2 aws_soc2.yaml +# sky down min + +name: minimal + +resources: + cloud: aws + # Disk volumes typically need to be encrypted for SOC2 compliance. + disk_encrypted: true + # Various SOC2 compliance tools check prod versus non-prod status. + # Use labels (which become tags) for this. + labels: + "env": "prod" + +setup: | + echo "running setup" + +run: | + conda env list + diff --git a/sky/resources.py b/sky/resources.py index fce4053604e..c7b2227b85f 100644 --- a/sky/resources.py +++ b/sky/resources.py @@ -1388,7 +1388,8 @@ def _from_yaml_config_single(cls, config: Dict[str, str]) -> 'Resources': if resources_fields['disk_size'] is not None: resources_fields['disk_size'] = int(resources_fields['disk_size']) if resources_fields['disk_encrypted'] is not None: - resources_fields['disk_encrypted'] = resources_fields['disk_encrypted'] + resources_fields['disk_encrypted'] = ( + resources_fields['disk_encrypted']) assert not config, f'Invalid resource args: {config.keys()}' return Resources(**resources_fields)