Skip to content

Commit

Permalink
Add stackConfigDir to Python SDK
Browse files Browse the repository at this point in the history
Mirror the changes to the Go SDK made in pulumi#9145 (2b3fbdb)
  • Loading branch information
rswiernik committed Aug 30, 2022
1 parent 70f7677 commit 74c0243
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sdk/python/lib/pulumi/automation/_project_settings.py
Expand Up @@ -85,6 +85,7 @@ class ProjectSettings:
website: Optional[str] = None
license: Optional[str] = None
config: Optional[str] = None
stackConfigDir: Optional[str] = None
template: Optional[ProjectTemplate] = None
backend: Optional[ProjectBackend] = None

Expand All @@ -98,6 +99,7 @@ def __init__(
website: Optional[str] = None,
license: Optional[str] = None, # pylint: disable=redefined-builtin
config: Optional[str] = None,
stackConfigDir: Optional[str] = None,
template: Optional[ProjectTemplate] = None,
backend: Optional[ProjectBackend] = None,
):
Expand All @@ -111,6 +113,12 @@ def __init__(
f"Invalid value {runtime!r} for runtime. "
f"Must be one of: 'nodejs', 'python', 'go', 'dotnet'."
)

if config and stackConfigDir:
raise ValueError(
"Can not set `config` and `stackConfigDir`, remove the `config` entry"
)

self.name = name
self.runtime = runtime
self.main = main
Expand All @@ -119,5 +127,6 @@ def __init__(
self.website = website
self.license = license
self.config = config
self.stackConfigDir = stackConfigDir
self.template = template
self.backend = backend

0 comments on commit 74c0243

Please sign in to comment.