Skip to content

Commit

Permalink
try remove the time stamp from ids
Browse files Browse the repository at this point in the history
  • Loading branch information
emileten committed Feb 22, 2024
1 parent fe51b74 commit e6becdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions integration_tests/cdk/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
)
import datetime

# to get (almost) unique stack ids
timestamp = datetime.datetime.utcnow().strftime("%Y%m%d%H%M%S")
# to get (almost) unique stack ids but encoded in letters because cfn doesn't like numbers sometimes
timestamp_in_letters = ''.join(['abcdefghij'[int(i)] for i in datetime.datetime.utcnow().strftime("%Y%m%d%H%M%S")])


class VpcStack(Stack):
Expand Down Expand Up @@ -140,13 +140,13 @@ def __init__(

app_config = build_app_config()

vpc_stack = VpcStack(scope=app, app_config=app_config, id=f"{app_config.build_service_name('vpc')}-{timestamp}")
vpc_stack = VpcStack(scope=app, app_config=app_config, id=f"{app_config.build_service_name('vpc')}-{timestamp_in_letters}")

pgstac_infra_stack = pgStacInfraStack(
scope=app,
vpc=vpc_stack.vpc,
app_config=app_config,
id=f"{app_config.build_service_name('pgstac')}-{timestamp}"
id=f"{app_config.build_service_name('pgstac')}-{timestamp_in_letters}"
)

app.synth()
2 changes: 1 addition & 1 deletion integration_tests/cdk/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppConfig(BaseSettings):
description="AWS account ID"
)
project_id: str = pydantic.Field(
description="Project ID", default="eoapi-cdk"
description="Project ID", default="eoapicdk"
)
stage: str = pydantic.Field(description="Stage of deployment", default="test")
# because of its validator, `tags` should always come after `project_id` and `stage`
Expand Down

0 comments on commit e6becdc

Please sign in to comment.