Skip to content

Commit d74d37c

Browse files
committed
updated example
1 parent 9147136 commit d74d37c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/main.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ provider "curl2" {}
1212
data "curl2" "getPosts" {
1313
http_method = "GET"
1414
uri = "https://jsonplaceholder.typicode.com/posts"
15+
# auth_type = "Basic"
16+
# basic_auth_username = "<UserName>"
17+
# basic_auth_password = "<Password>"
1518
}
1619

1720
output "all_posts_response" {
@@ -25,7 +28,9 @@ output "all_posts_status" {
2528
data "curl2" "postPosts" {
2629
http_method = "POST"
2730
uri = "https://jsonplaceholder.typicode.com/posts"
28-
json = "{\"title\":\"foo\",\"body\":\"bar\",\"userId\":\"1\"}"
31+
json = "{\"title\":\"foo\",\"body\":\"bar\",\"userId\":\"1\"}" //need the json in string format
32+
# auth_type = "Bearer"
33+
# bearer_token = "<Any Bearer Token>"
2934
}
3035

3136
output "post_posts_output" {

0 commit comments

Comments
 (0)