Skip to content

Commit

Permalink
rename cf to cf2
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaraphael committed Nov 21, 2024
1 parent df8e060 commit 96ef20b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions stack/cloud_function_ais_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
stack = pulumi.get_stack()
# We will store the source code to the Cloud Function in a Google Cloud Storage bucket.
bucket = storage.Bucket(
construct_name("bucket-cf-ais"),
construct_name("bucket-cf2-ais"),
location="EU",
labels={"pulumi": "true", "environment": pulumi.get_stack()},
)
Expand All @@ -43,7 +43,7 @@
)


function_name = construct_name("cf-ais")
function_name = construct_name("cf2-ais")
config_values = {
"DB_URL": database.sql_instance_url_with_asyncpg,
}
Expand All @@ -60,21 +60,21 @@
# Create the single Cloud Storage object, which contains all of the function's
# source code. ("main.py" and "requirements.txt".)
source_archive_object = storage.BucketObject(
construct_name("source-cf-ais"),
construct_name("source-cf2-ais"),
name=f"handler.py-{time.time():f}",
bucket=bucket.name,
source=archive,
)

# Assign access to cloud SQL
cloud_function_service_account = serviceaccount.Account(
construct_name("cf-ais"),
account_id=f"{stack}-cf-ais",
construct_name("cf2-ais"),
account_id=f"{stack}-cf2-ais",
display_name="Service Account for cloud function.",
)

cloud_function_service_account_iam = projects.IAMMember(
construct_name("cf-ais-iam"),
construct_name("cf2-ais-iam"),
project=pulumi.Config("gcp").require("project"),
role="projects/cerulean-338116/roles/cloudfunctionaisanalysisrole",
member=cloud_function_service_account.email.apply(
Expand Down Expand Up @@ -126,7 +126,7 @@
)

invoker = cloudrun.IamMember(
construct_name("cf-ais-invoker"),
construct_name("cf2-ais-invoker"),
service=fxn.name,
location=fxn.location,
role="roles/run.invoker",
Expand Down

0 comments on commit 96ef20b

Please sign in to comment.