Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add required provider block to the terrafom local exercise #10548

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Learn how to use and run Terraform basic commands
2. Inside the directory create a file called "main.tf" with the following content

```terraform
terraform {
required_providers {
local = {
source = "hashicorp/local"
version = "~> 2.0"
}
}
}

resource "local_file" "mario_local_file" {
content = "It's a me, Mario!"
filename = "/tmp/who_is_it.txt"
Expand Down
18 changes: 18 additions & 0 deletions topics/terraform/exercises/terraform_local_provider/solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Learn how to use and run Terraform basic commands
2. Inside the directory create a file called "main.tf" with the following content

```terraform
terraform {
required_providers {
local = {
source = "hashicorp/local"
version = "~> 2.0"
}
}
}

resource "local_file" "mario_local_file" {
content = "It's a me, Mario!"
filename = "/tmp/who_is_it.txt"
Expand All @@ -25,6 +34,15 @@ mkdir my_first_run && cd my_first_run

# Create the file 'main.tf'
cat << EOT >> main.tf
terraform {
required_providers {
local = {
source = "hashicorp/local"
version = "~> 2.0"
}
}
}

resource "local_file" "mario_local_file" {
content = "It's a me, Mario!"
filename = "/tmp/who_is_it.txt"
Expand Down