1
1
mirror of https://github.com/adammck/terraform-inventory synced 2024-11-23 00:12:13 +01:00

Update fixtures

This commit is contained in:
Adam Mckaig 2015-06-05 00:03:42 -04:00
parent 5e11666d41
commit f290d6dfb6
3 changed files with 19 additions and 14 deletions

@ -23,7 +23,7 @@ Ansible doesn't (seem to) support calling the inventory script with parameters,
so you can specify the path to the state file using the `TI_TFSTATE` environment
variable, like so:
TI_TFSTATE=deploy/terraform.tfstate ansible-playbook --inventory-file=terraform-inventory
TI_TFSTATE=deploy/terraform.tfstate ansible-playbook --inventory-file=terraform-inventory deploy/playbook.yml
Alternately, you can create a little shell script and call that. Something like:

@ -14,12 +14,14 @@ provider "digitalocean" {
}
resource "aws_instance" "web-aws" {
ami = "ami-96a818fe"
instance_type = "t2.micro"
subnet_id = "${var.aws_subnet_id}"
root_block_device = {
delete_on_termination = true
}
ami = "ami-96a818fe"
instance_type = "t2.micro"
subnet_id = "${var.aws_subnet_id}"
associate_public_ip_address = true
key_name = "terraform-inventory"
root_block_device = {
delete_on_termination = true
}
}
resource "digitalocean_droplet" "web-do" {
@ -27,5 +29,5 @@ resource "digitalocean_droplet" "web-do" {
name = "terraform-inventory-1"
region = "nyc1"
size = "512mb"
ssh_keys = [55015]
ssh_keys = [862272]
}

@ -1,6 +1,6 @@
{
"version": 1,
"serial": 11,
"serial": 13,
"modules": [
{
"path": [
@ -11,18 +11,21 @@
"aws_instance.web-aws": {
"type": "aws_instance",
"primary": {
"id": "i-366736e6",
"id": "i-e8f3a238",
"attributes": {
"ami": "ami-96a818fe",
"associate_public_ip_address": "true",
"availability_zone": "us-east-1d",
"ebs_block_device.#": "0",
"ebs_optimized": "false",
"ephemeral_block_device.#": "0",
"id": "i-366736e6",
"id": "i-e8f3a238",
"instance_type": "t2.micro",
"private_dns": "ip-10-0-0-4.ec2.internal",
"private_ip": "10.0.0.4",
"key_name": "terraform-inventory",
"private_dns": "ip-10-0-0-12.ec2.internal",
"private_ip": "10.0.0.12",
"public_dns": "",
"public_ip": "52.7.58.202",
"root_block_device.#": "1",
"root_block_device.0.delete_on_termination": "true",
"root_block_device.0.iops": "0",
@ -53,7 +56,7 @@
"region": "nyc1",
"size": "512mb",
"ssh_keys.#": "1",
"ssh_keys.0": "55015",
"ssh_keys.0": "862272",
"status": "active"
}
}