make sure resources are set up in isolated namespaces (#1)
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -3,13 +3,11 @@ from typing import Any
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
from src.infra.provisioning import STACK_NAME
|
||||
|
||||
|
||||
def stack_status(region: str, profile: str) -> dict[str, Any] | None:
|
||||
def stack_status(region: str, profile: str, stack_name: str) -> dict[str, Any] | None:
|
||||
client = boto3.Session(profile_name=profile, region_name=region).client("cloudformation")
|
||||
try:
|
||||
stack = client.describe_stacks(StackName=STACK_NAME)["Stacks"][0]
|
||||
stack = client.describe_stacks(StackName=stack_name)["Stacks"][0]
|
||||
except ClientError as e:
|
||||
message = e.response.get("Error", {}).get("Message", "")
|
||||
if "does not exist" in message:
|
||||
|
||||
Reference in New Issue
Block a user