Skip to content

Commit

Permalink
Merge branch 'v0.30' into v0.30
Browse files Browse the repository at this point in the history
  • Loading branch information
Reshrahim authored Feb 9, 2024
2 parents f5e1bb1 + 991041a commit f51a8c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 5 additions & 2 deletions docs/content/guides/recipes/howto-author-recipes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//PROVIDER
terraform {
required_providers {
kubernetes = {
Expand All @@ -7,9 +6,7 @@ terraform {
}
}
}
//PROVIDER

//RESOURCE
resource "kubernetes_deployment" "redis" {
metadata {
name = "redis-${sha512(var.context.resource.id)}"
Expand Down Expand Up @@ -62,4 +59,3 @@ resource "kubernetes_service" "redis" {
}
}
}
//RESOURCE

0 comments on commit f51a8c6

Please sign in to comment.