diff --git a/docs/content/guides/recipes/howto-author-recipes/index.md b/docs/content/guides/recipes/howto-author-recipes/index.md index 06bffb77d..f9c048aae 100644 --- a/docs/content/guides/recipes/howto-author-recipes/index.md +++ b/docs/content/guides/recipes/howto-author-recipes/index.md @@ -39,9 +39,12 @@ Add the `context` parameter to your `variable.tf` file: {{< rad file="snippets/redis-kubernetes-variables.tf" embed=true marker="//CONTEXT" lang="terraform" >}} -Update `main.tf` to use `context` for naming and namespace configuration: +Ensure that your `main.tf` has: -{{< rad file="snippets/redis-kubernetes-main.tf" embed=true marker="//RESOURCE" lang="terraform" >}} +- Defined `required_providers` for any providers you leverage in your module. This allows Radius to inject configuration and credentials. +- Utilizes the `context` parameter for naming and namespace configuration. This ensures your resources don't unintentionally collide with other uses of the Recipe. + +{{< rad file="snippets/redis-kubernetes-main.tf" embed=true lang="terraform" >}} {{% /codetab %}} diff --git a/docs/content/guides/recipes/howto-author-recipes/snippets/redis-kubernetes-main.tf b/docs/content/guides/recipes/howto-author-recipes/snippets/redis-kubernetes-main.tf index 68308f203..77d038985 100644 --- a/docs/content/guides/recipes/howto-author-recipes/snippets/redis-kubernetes-main.tf +++ b/docs/content/guides/recipes/howto-author-recipes/snippets/redis-kubernetes-main.tf @@ -1,4 +1,3 @@ -//PROVIDER terraform { required_providers { kubernetes = { @@ -7,9 +6,7 @@ terraform { } } } -//PROVIDER -//RESOURCE resource "kubernetes_deployment" "redis" { metadata { name = "redis-${sha512(var.context.resource.id)}" @@ -62,4 +59,3 @@ resource "kubernetes_service" "redis" { } } } -//RESOURCE \ No newline at end of file