Skip to content

feat(aws): add DeployedBy and CloudyPadInstance tags to all resources#365

Open
alexjurkiewicz wants to merge 4 commits into
PierreBeucher:masterfrom
alexjurkiewicz:feat/aws-resource-tags
Open

feat(aws): add DeployedBy and CloudyPadInstance tags to all resources#365
alexjurkiewicz wants to merge 4 commits into
PierreBeucher:masterfrom
alexjurkiewicz:feat/aws-resource-tags

Conversation

@alexjurkiewicz
Copy link
Copy Markdown
Contributor

Summary

  • Adds DeployedBy=cloudypad and CloudyPadInstance=<name> tags to all AWS resources in all three Pulumi stacks (main, base image snapshot, data disk snapshot)
  • Renames the existing instance=<name> tag on snapshot resources to CloudyPadInstance=<name> for consistency

Details

The main stack's CloudyPadEC2Instance component already accepted an args.tags map that was spread into every resource's tags — it just wasn't being populated. This change passes cloudypadTags into the component at creation time.

The snapshot stacks used an additionalTags string-array mechanism with instance:<name> format. These are updated to use CloudyPadInstance:<name> and add DeployedBy:cloudypad.

Test plan

  • Create an instance and confirm all EC2/EBS/SG/EIP/KeyPair resources have DeployedBy=cloudypad and CloudyPadInstance=<name> tags in the AWS console
  • Create an instance with base image snapshot enabled and confirm the EBS snapshot and AMI have the same tags
  • Create an instance with data disk snapshot enabled and confirm the snapshot has the same tags

🤖 Generated with Claude Code

alexjurkiewicz and others added 2 commits April 3, 2026 17:07
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
super("crafteo:cloudypad:aws:base-image", name, args, opts)

const globalTags = pulumi.all([args.additionalTags]).apply(([tags]) => [
name,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was creating tags like myinstance=myinstance 🫠


const stack = await this.getStack()
await stack.setConfig("aws:region", { value: config.region})
await stack.setConfig("additionalTags", { value: JSON.stringify([`instance:${config.instanceName}`])})
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you run a SaaS for CloudyPad. You might have stuff which assumes instance tags exist. If so, we can always keep this tag as-is.

alexjurkiewicz and others added 2 commits April 3, 2026 17:27
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant