This is an original planning guide. It is not a vendor manual, an official standard, or legal advice. Example addresses use documentation ranges. Review every command before you paste it.
What this hour is for
How to Create a GCP Cloud Function (Terraform, gcloud) drafts one Cloud Function on a lab GCP account you administer. The generator says to review before apply. Replace account IDs, images, and sample passwords. ami-replace-me and subnet-replace-me stay placeholders until you write the real names.
Do not put a secret in the source. HTTPS stays on. Do not allow unauthenticated access to test the page. The forms on this page are Terraform and gcloud. You pick the one the ticket named. You do not apply any of them during the reading.
The browser tool drafts text. It does not log in. A public-access block in an object-storage draft stays on.
192.0.2.10/24, gateway 192.0.2.1, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32 are documentation. example.com is a documentation name. A sample password is replaced. It is not a password you keep. 10.0.0.0/16 is a sample prefix, not a network you publish unless you already use it.
The change you can finish
Apply nothing while you are writing the note. When the lab window opens, it is one change on the account named in the ticket. Read the draft, then the account, then decide.
Rollback is the previous file, the previous plan, or the lab resource you can delete because it was only a lab.
- Write the account, project, or repository, and confirm you administer it.
- Save the current file or export before any draft is applied.
- Read the draft and delete every line this ticket did not name.
- Replace account IDs, images, example.com, and any sample password.
- Apply nothing during the reading.
- Read the names back and compare them with the ticket.
- Stop. The next change is a different page.
Mistakes that outlive the statement
Cloud Function on GCP goes wrong in a small set of ways. The list is here so the ticket can forbid them before the window.
- Applying a draft you did not read.
- The wrong account.
- A secret, an access key, or a kubeconfig in git.
- Two changes in one window.
- No copy saved before the change.
- A documentation address or example.com left in a file you apply.
- An ingress from 0.0.0.0/0 left in the file.
- Calling the generator output a finished production change.
- Do not put a secret in the source. HTTPS stays on. Do not allow unauthenticated access to test the page.
- Applying during the reading.
Decisions to write down
One decision for Cloud Function on GCP: The account is one you administer. The resource is only Cloud Function. The form is one of Terraform and gcloud. Placeholders and sample passwords were replaced or the file was not applied. And nothing was applied during the reading.
Checks before you call it done
Confirm this before you call the change done: The account is written. The draft was read. 0.0.0.0/0 is absent from any ingress, or a person deleted it. No secret is in the note. Nothing was applied. And a second person can say the resource name. If one of those fails, stop.
# Review before apply. Replace account IDs, images, and sample passwords.
# GCP: Cloud Function.
# Do not apply during the reading.
# Delete an ingress of 0.0.0.0/0.
# Do not put a secret in the source. HTTPS stays on. Do not allow unauthenticated access to test the page.
# 192.0.2.10/24, gateway 192.0.2.1, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32 are documentation. example.com is a documentation name. A sample password is replaced. It is not a password you keep. 10.0.0.0/16 is a sample prefix, not a network you publish unless you already use it.
Before you leave the account
How to Create a GCP Cloud Function (Terraform, gcloud) ends when the account in the note is the account in the ticket. If it is not, stop.
The draft stays a draft until a person has read the names in it. A generator does not log in, does not apply, and does not scan.
192.0.2.10/24, gateway 192.0.2.1, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32 are documentation. example.com is a documentation name. A sample password is replaced. It is not a password you keep. 10.0.0.0/16 is a sample prefix, not a network you publish unless you already use it.
prompt-for-this is a reminder that a secret is missing. It is not an access key, a token, or a password you save. An Azure secret draft may contain a sample password. Replace it. Do not file it.
One change is the window. If two things move and the result is wrong, you will not know which one did it.
If the same step fails twice, stop for the day. Restore the copy you took first.
A second person reads the account and the change aloud. If they cannot find them in the ticket, the note is not done.
This page is a planning guide. It is not a vendor manual, not an official standard, not legal advice, and not an audit opinion. You do not apply it against an account you do not administer.
Tools for this guide
These tools run in the browser on this site. They do not log into your machines.
Related pillar guides
More in this cluster
The pillar for this page, and the next published pages filed with it.