Skip to content

Commit a4a6501

Browse files
edmundmillerclaude
andcommitted
feat: Import existing nf-core-awsmegatests S3 bucket and update requirements
- Replace generic bucket creation with import of existing nf-core-awsmegatests bucket - Add resource protection to prevent accidental deletion - Update requirements.txt to match pyproject.toml dependencies - Add comprehensive resource management notes for seqerakit integration - Address concerns from previous infrastructure import attempts (PR #58) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 899739d commit a4a6501

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

pulumi/AWSMegatests/__main__.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@
66
import pulumi_onepassword as onepassword
77
from pulumi_aws import s3
88

9-
# Create an AWS resource (S3 Bucket)
10-
bucket = s3.Bucket("my-bucket")
9+
# Import existing AWS resources used by nf-core megatests
10+
# S3 bucket for Nextflow work directory (already exists)
11+
nf_core_awsmegatests_bucket = s3.Bucket(
12+
"nf-core-awsmegatests",
13+
bucket="nf-core-awsmegatests",
14+
opts=pulumi.ResourceOptions(
15+
import_="nf-core-awsmegatests", # Import existing bucket
16+
protect=True, # Protect from accidental deletion
17+
),
18+
)
1119

12-
# Export the name of the bucket
13-
pulumi.export("bucket_name", bucket.id) # type: ignore[attr-defined]
20+
# Export the bucket information
21+
pulumi.export(
22+
"megatests_bucket",
23+
{
24+
"name": nf_core_awsmegatests_bucket.bucket,
25+
"arn": nf_core_awsmegatests_bucket.arn,
26+
"region": "eu-west-1",
27+
},
28+
)
1429

1530
# Configure the 1Password provider explicitly
1631
onepassword_config = pulumi.Config("pulumi-onepassword")
@@ -38,6 +53,12 @@
3853
# NOTE: We could check for tw-cli availability here, but we'll let seqerakit
3954
# throw the appropriate error if it's missing. Seqerakit requires tw-cli to be
4055
# installed and available in PATH.
56+
#
57+
# NOTE: Seqerakit will create and manage:
58+
# - AWS Batch compute environments and job queues
59+
# - IAM roles (ExecutionRole, FargateRole) with TowerForge prefix
60+
# - Security groups and networking resources
61+
# These are managed by Seqera Platform and should not be imported into Pulumi
4162
seqerakit_environment = {
4263
"TOWER_ACCESS_TOKEN": tower_access_token,
4364
"ORGANIZATION_NAME": "nf-core",
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
pulumi>=3.0.0,<4.0.0
2-
pulumi-aws>=6.0.2,<7.0.0
1+
pulumi>=3.173.0,<4.0.0
2+
pulumi-aws>=6.81.0,<7.0.0
3+
pulumi-github>=6.4.0,<7.0.0
4+
pulumi-command>=1.0.1,<2.0.0
5+
pulumi-onepassword>=1.1.0,<2.0.0
6+
seqerakit>=0.4.9

0 commit comments

Comments
 (0)