Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrary pulumi commands #1888

Merged
merged 11 commits into from
May 16, 2024
Merged

Arbitrary pulumi commands #1888

merged 11 commits into from
May 16, 2024

Conversation

JimMadge
Copy link
Member

@JimMadge JimMadge commented May 14, 2024

✅ Checklist

  • You have given your pull request a meaningful title (e.g. Enable foobar integration rather than 515 foobar).
  • You are targeting the appropriate branch. If you're not certain which one this is, it should be develop.
  • Your branch is up-to-date with the target branch (it probably was when you started, but it may have changed since then).
  • You have marked this pull request as a draft and added '[WIP]' to the title if needed (if you're not yet ready to merge).

⤴️ Summary

Add command for running Pulumi CLI commands using a DSH project+stack

🌂 Related issues

🔬 Tests

Tests included, but also locally

dsh pulumi run shm 'stack ls'
dsh pulumi run shm 'stack output'
dsh pulumi run shm 'import ...'

Copy link

github-actions bot commented May 14, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/commands
  cli.py
  pulumi.py 56-68
  data_safe_haven/infrastructure
  project_manager.py
  tests
  conftest.py
  tests/commands
  conftest.py 95
  test_pulumi.py
  tests/infrastructure
  test_project_manager.py
Project Total  

This report was generated by python-coverage-comment-action

@JimMadge JimMadge force-pushed the arbitrary_pulumi_commands branch from deb98a4 to 98113ad Compare May 15, 2024 13:13
@JimMadge JimMadge marked this pull request as ready for review May 15, 2024 13:16
@JimMadge JimMadge requested a review from a team as a code owner May 15, 2024 13:16
@JimMadge JimMadge changed the title WIP: arbitrary pulumi commands Arbitrary pulumi commands May 15, 2024
Copy link
Contributor

@craddm craddm left a comment

Choose a reason for hiding this comment

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

LGTM, tested it too

data_safe_haven/commands/cli.py Outdated Show resolved Hide resolved
data_safe_haven/commands/pulumi.py Outdated Show resolved Hide resolved
Co-authored-by: James Robinson <james.em.robinson@gmail.com>
@JimMadge JimMadge requested a review from jemrobinson May 16, 2024 10:36
Copy link
Member

@jemrobinson jemrobinson left a comment

Choose a reason for hiding this comment

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

One minor comment but overall I'm happy with this.

The indirection of hatch run dsh pulumi run shm "refresh" is really something though!

tests/conftest.py Outdated Show resolved Hide resolved
@JimMadge JimMadge merged commit bfbde01 into develop May 16, 2024
11 checks passed
@JimMadge JimMadge deleted the arbitrary_pulumi_commands branch May 16, 2024 11:14
@JimMadge JimMadge mentioned this pull request May 30, 2024
5 tasks
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.

3 participants