Skip to content

Commit

Permalink
Add examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-henderson committed Feb 7, 2020
1 parent 85dface commit 191194a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
10 changes: 9 additions & 1 deletion products/datastore/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,12 @@ overrides: !ruby/object:Overrides::ResourceOverrides
import_format: ["projects/{{project}}/indexes/{{index_id}}"]
autogen_async: true
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 15
insert_minutes: 10
delete_minutes: 10
examples:
- !ruby/object:Provider::Terraform::Examples
name: "datastore_index"
primary_resource_id: "default"
vars:
property_name_1: "property_a"
property_name_2: "property_b"
11 changes: 11 additions & 0 deletions templates/terraform/examples/datastore_index.tf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "google_datastore_index" "<%= ctx[:primary_resource_id] %>" {
kind = "foo"
properties {
name = "<%= ctx[:vars]['property_name_1'] %>"
direction = "ASCENDING"
}
properties {
name = "<%= ctx[:vars]['property_name_2'] %>"
direction = "ASCENDING"
}
}

0 comments on commit 191194a

Please sign in to comment.