Skip to content

Commit

Permalink
Add override test for Terraform 0.11.x sample set.
Browse files Browse the repository at this point in the history
  • Loading branch information
nbering committed May 26, 2019
1 parent 6d77304 commit ba71f79
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sample_data/0.11.x/individual-vars/expect.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"www.example.com": {
"bar": "bbb",
"db_host": "db.example.com",
"foo": "aaa"
"foo": "eee"
}
}
},
Expand Down
6 changes: 6 additions & 0 deletions sample_data/0.11.x/individual-vars/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ resource "ansible_host_var" "extra" {
value = "${ansible_host.db.inventory_hostname}"
}

resource "ansible_host_var" "override" {
inventory_hostname = "www.example.com"
key = "foo"
value = "eee"
}

resource "ansible_group_var" "extra" {
inventory_group_name = "db"
key = "ansible_user"
Expand Down
19 changes: 18 additions & 1 deletion sample_data/0.11.x/individual-vars/terraform.tfstate
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 3,
"terraform_version": "0.11.14",
"serial": 1,
"serial": 2,
"lineage": "fd5627d8-41cc-2c58-f463-66453b5f2978",
"modules": [
{
Expand Down Expand Up @@ -87,6 +87,23 @@
},
"deposed": [],
"provider": "provider.ansible"
},
"ansible_host_var.override": {
"type": "ansible_host_var",
"depends_on": [],
"primary": {
"id": "www.example.com/foo",
"attributes": {
"id": "www.example.com/foo",
"inventory_hostname": "www.example.com",
"key": "foo",
"value": "eee"
},
"meta": {},
"tainted": false
},
"deposed": [],
"provider": "provider.ansible"
}
},
"depends_on": []
Expand Down

0 comments on commit ba71f79

Please sign in to comment.