I myself have recommended that homeowners go ask the town inspectors, but for yrs now they have been avoiding non pros like a plague. In NJ and offices have secretaries who will hand you a diagram. You must do the homework and be at min familiar with parts names and basic rules. Some towns have some codes in their site, but it is really to remind the pros, not to teach. You will have to do what you can to find the info. If you feel dumb, join the club - just speaking for myself, btw.
What it is said about being prepared is universally true. But that means having diy interest, not reacting to a problem that suddenly comes up. Your deck does look ok. From 3-4 photos (not enough and never enough vs actually being there with full sun light) I would say you have the time, and to gain time, do some bandaid jobs like caulking - as you already did.
Sorry but another flag may be the 2x6 header you have over the opening. I would not use 2x6 header over that much span, esp since the wall looks like it shoots over 2nd floor with roof. May be you have truss roof and that is gable wall, but that is another point you should confirm.