Discrepancy between template and tutorial snippet
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Bug Description
The [`_pebble_layer()` member](https://github.com/canonical/charmcraft/blob/main/charmcraft/templates/init-simple/src/charm.py.j2#L82-L99) in the `init-simple` template seems to be missing code that wraps the Python dictionary into a Pebble `Layer` object. That code, on the other hand, is included in the [Juju Tutorial for Kubernetes](https://juju.is/docs/sdk/create-a-minimal-kubernetes-charm#heading--define-the-charm-initialisation-and-application-services).
It looks like wrapping the dictionary in a `Layer` object has been forgotten (to update?) in the template code.
**EDIT:** Note that I'm a newbie and that the [Juju SDK docs](https://juju.is/docs/sdk/interact-with-pebble#heading--add-a-configuration-layer) mention that it's possible to add a layer both with a plain YAML string or Python dict, and with a Layer object. Hence, the question is, is there [a preferred way](https://pep20.org/#obvious) to do it.
### To Reproduce
1. Go to [GitHub > canonical/charmcraft > charmcraft/templates/init-simple/src/charm.py.j2](https://github.com/canonical/charmcraft/blob/main/charmcraft/templates/init-simple/src/charm.py.j2#L82-L99).
2. Compare with code snippet suggested in [Juju SDK docs > Tutorials > Kubernetes > Create minimal charm](https://juju.is/docs/sdk/create-a-minimal-kubernetes-charm#heading--define-the-charm-initialisation-and-application-services).
### Related
- [Juju SDK docs > How-to Guides > Interact with Pebble](https://juju.is/docs/sdk/interact-with-pebble#heading--add-a-configuration-layer) > Add a configuration layer
Evaluation history
No evaluation history available.