-
Notifications
You must be signed in to change notification settings - Fork 458
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
Problem expanding variables #294
Comments
I don't think this is a bug or bad configuration, it looks like "terraform-provider-libvirt" does not yet support assigning variables, either via terraform.tfvars or variable.tf or even main.tf Closing issue, will open function request. |
Terraform does not replace variables on the "key" part of HCL (what is before the brackets), but on the values part. After fixing that (and other minor issues, like variable "tfname" {
default = "puppetmaster"
}
provider "libvirt" {
uri = "qemu:///system"
}
// blank 32GB image for net install.
resource "libvirt_volume" "foo-qcow2" {
name = "${var.tfname}-qcow2"
pool = "default"
format = "qcow2"
size = 34359738368
}
// set boot order hd, network
resource "libvirt_domain" "foo-domain" {
name = "${var.tfname}"
memory = "2048"
vcpu = 2
network_interface {
network_name = "dc00-10"
}
boot_device {
dev = [ "hd", "network"]
}
disk {
volume_id = "libvirt_volume.foo-qcow2.${var.tfname}-qcow2.id"
}
graphics {
type = "spice"
autoport = true
listen_type = "address"
}
} $ TF_VAR_tfname=lolo terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
+ libvirt_domain.foo-domain
id: <computed>
arch: <computed>
boot_device.#: "1"
boot_device.0.dev.#: "2"
boot_device.0.dev.0: "hd"
boot_device.0.dev.1: "network"
disk.#: "1"
disk.0.scsi: "false"
disk.0.volume_id: "libvirt_volume.foo-qcow2.lolo-qcow2.id"
emulator: <computed>
graphics.#: "1"
graphics.0.autoport: "true"
graphics.0.listen_type: "address"
graphics.0.type: "spice"
machine: <computed>
memory: "2048"
name: "lolo"
network_interface.#: "1"
network_interface.0.addresses.#: <computed>
network_interface.0.hostname: <computed>
network_interface.0.mac: <computed>
network_interface.0.network_id: <computed>
network_interface.0.network_name: "dc00-10"
running: "true"
vcpu: "2"
+ libvirt_volume.foo-qcow2
id: <computed>
format: "qcow2"
name: "lolo-qcow2"
pool: "default"
size: "34359738368"
Plan: 2 to add, 0 to change, 0 to destroy. |
ahh fantastic, thank you!! Last question ... the "Display Spice" section in virt manager has Type: Are we able to specify the "Address" via the provider ? In virt manager, the options available under address are: Hypervisor Default I seem to remember I couldn't set Address to "All interfaces" via the provider. Great work Duncan, thanks again!! I hope others find it as useful as I do. |
See https://raw.githubusercontent.com/hashicorp/terraform-plugin-sdk/v1-maint/CHANGELOG.md BUG FIXES: * Remove deprecation for `d.Partial` ([dmacvicar#463](hashicorp/terraform-plugin-sdk#463)) * Fix bug when serializing bool in TypeMap ([dmacvicar#465](hashicorp/terraform-plugin-sdk#465)) DEPRECATIONS: * Deprecate `DisableBinaryDriver` ([dmacvicar#450](hashicorp/terraform-plugin-sdk#450)) * Deprecate the `helper/mutexkv`, `helper/pathorcontents`, `httpclient`, and `helper/hashcode` packages ([dmacvicar#453](hashicorp/terraform-plugin-sdk#453)) FEATURES: * Allow disabling binary testing via `TF_DISABLE_BINARY_TESTING` environment variable. ([dmacvicar#441](hashicorp/terraform-plugin-sdk#441)) BUG FIXES: * More accurate results for `schema.ResourceData.HasChange` when dealing with a Set inside another Set. ([dmacvicar#362](hashicorp/terraform-plugin-sdk#362)) DEPRECATED: * helper/encryption: In line with sensitive state best practices, the `helper/encryption` package is deprecated. ([dmacvicar#437](hashicorp/terraform-plugin-sdk#437)) ENHANCEMENTS: * Better error messaging when indexing into TypeSet for test checks, while the binary driver is enabled (currently not supported) ([dmacvicar#417](hashicorp/terraform-plugin-sdk#417)) * Prevent ConflictsWith from self referencing and prevent referencing multi item Lists or Sets ([dmacvicar#416](hashicorp/terraform-plugin-sdk#416)] [[dmacvicar#423](hashicorp/terraform-plugin-sdk#423)] [[dmacvicar#426](hashicorp/terraform-plugin-sdk#426)) FEATURES: * Added validation helper `RequiredWith` ([dmacvicar#342](hashicorp/terraform-plugin-sdk#342)) BUG FIXES: * Binary acceptance test driver: omit test cleanup when state is empty ([dmacvicar#356](hashicorp/terraform-plugin-sdk#356)) * Make mockT.Fatal halt execution ([dmacvicar#396](hashicorp/terraform-plugin-sdk#396)) DEPENDENCIES: * `github.com/hashicorp/terraform-plugin-test@v1.2.0` -> `v1.3.0` [[dmacvicar#400](hashicorp/terraform-plugin-sdk#400)] BUG FIXES: * Binary acceptance test driver: fix cleanup of temporary directories ([dmacvicar#378](hashicorp/terraform-plugin-sdk#378)) DEPRECATED: * helper/schema: `ResourceData.GetOkExists` will not be removed in the next major version unless a suitable replacement or alternative can be prescribed ([dmacvicar#350](hashicorp/terraform-plugin-sdk#350)) FEATURES: * Added support for additional protocol 5.2 fields (`Description`, `DescriptionKind`, `Deprecated`) ([dmacvicar#353](hashicorp/terraform-plugin-sdk#353)) BUG FIXES: * Binary acceptance test driver: auto-configure providers ([dmacvicar#355](hashicorp/terraform-plugin-sdk#355)) FEATURES: * helper/validation: `StringNotInSlice` ([dmacvicar#341](hashicorp/terraform-plugin-sdk#341)) FEATURES: * Binary acceptance test driver ([dmacvicar#262](hashicorp/terraform-plugin-sdk#262)) DEPRECATED: * helper/schema: `ResourceData.Partial` ([dmacvicar#317](hashicorp/terraform-plugin-sdk#317)) * helper/schema: `ResourceData.SetPartial` ([dmacvicar#317](hashicorp/terraform-plugin-sdk#317)) DEPRECATED: * helper/validation: `ValidateListUniqueStrings` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `SingleIP` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `IPRange` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `CIDRNetwork` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `ValidateJsonString` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `ValidateRegexp` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `ValidateRFC3339TimeString` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) FEATURES: * helper/validation: `IntDivisibleBy` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IntNotInSlice` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsIPv6Address` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsIPv4Address` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsCIDR` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsMACAddress` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsPortNumber` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsPortNumberOrZero` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsDayOfTheWeek` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsMonth` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsRFC3339Time` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsURLWithHTTPS` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsURLWithHTTPorHTTPS` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsURLWithScheme` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `ListOfUniqueStrings` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `IsIPAddress` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `IsIPv4Range` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `IsCIDRNetwork` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `StringIsJSON` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `StringIsValidRegExp` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) FEATURES: * helper/validation: `StringIsEmpty` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) * helper/validation: `StringIsNotEmpty` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) * helper/validation: `StringIsWhiteSpace` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) * helper/validation: `StringIsNotWhiteSpace` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) * helper/validation: `IsUUID` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) ([dmacvicar#297](hashicorp/terraform-plugin-sdk#297)) BUG FIXES: * schema/ExactlyOneOf: Fix handling of unknowns in complex types ([dmacvicar#287](hashicorp/terraform-plugin-sdk#287)) BUG FIXES: * helper/resource: Don't crash when dependent test sweeper is missing ([dmacvicar#279](hashicorp/terraform-plugin-sdk#279))
See https://raw.githubusercontent.com/hashicorp/terraform-plugin-sdk/v1-maint/CHANGELOG.md BUG FIXES: * Remove deprecation for `d.Partial` ([dmacvicar#463](hashicorp/terraform-plugin-sdk#463)) * Fix bug when serializing bool in TypeMap ([dmacvicar#465](hashicorp/terraform-plugin-sdk#465)) DEPRECATIONS: * Deprecate `DisableBinaryDriver` ([dmacvicar#450](hashicorp/terraform-plugin-sdk#450)) * Deprecate the `helper/mutexkv`, `helper/pathorcontents`, `httpclient`, and `helper/hashcode` packages ([dmacvicar#453](hashicorp/terraform-plugin-sdk#453)) FEATURES: * Allow disabling binary testing via `TF_DISABLE_BINARY_TESTING` environment variable. ([dmacvicar#441](hashicorp/terraform-plugin-sdk#441)) BUG FIXES: * More accurate results for `schema.ResourceData.HasChange` when dealing with a Set inside another Set. ([dmacvicar#362](hashicorp/terraform-plugin-sdk#362)) DEPRECATED: * helper/encryption: In line with sensitive state best practices, the `helper/encryption` package is deprecated. ([dmacvicar#437](hashicorp/terraform-plugin-sdk#437)) ENHANCEMENTS: * Better error messaging when indexing into TypeSet for test checks, while the binary driver is enabled (currently not supported) ([dmacvicar#417](hashicorp/terraform-plugin-sdk#417)) * Prevent ConflictsWith from self referencing and prevent referencing multi item Lists or Sets ([dmacvicar#416](hashicorp/terraform-plugin-sdk#416)] [[dmacvicar#423](hashicorp/terraform-plugin-sdk#423)] [[dmacvicar#426](hashicorp/terraform-plugin-sdk#426)) FEATURES: * Added validation helper `RequiredWith` ([dmacvicar#342](hashicorp/terraform-plugin-sdk#342)) BUG FIXES: * Binary acceptance test driver: omit test cleanup when state is empty ([dmacvicar#356](hashicorp/terraform-plugin-sdk#356)) * Make mockT.Fatal halt execution ([dmacvicar#396](hashicorp/terraform-plugin-sdk#396)) DEPENDENCIES: * `github.com/hashicorp/terraform-plugin-test@v1.2.0` -> `v1.3.0` [[dmacvicar#400](hashicorp/terraform-plugin-sdk#400)] BUG FIXES: * Binary acceptance test driver: fix cleanup of temporary directories ([dmacvicar#378](hashicorp/terraform-plugin-sdk#378)) DEPRECATED: * helper/schema: `ResourceData.GetOkExists` will not be removed in the next major version unless a suitable replacement or alternative can be prescribed ([dmacvicar#350](hashicorp/terraform-plugin-sdk#350)) FEATURES: * Added support for additional protocol 5.2 fields (`Description`, `DescriptionKind`, `Deprecated`) ([dmacvicar#353](hashicorp/terraform-plugin-sdk#353)) BUG FIXES: * Binary acceptance test driver: auto-configure providers ([dmacvicar#355](hashicorp/terraform-plugin-sdk#355)) FEATURES: * helper/validation: `StringNotInSlice` ([dmacvicar#341](hashicorp/terraform-plugin-sdk#341)) FEATURES: * Binary acceptance test driver ([dmacvicar#262](hashicorp/terraform-plugin-sdk#262)) DEPRECATED: * helper/schema: `ResourceData.Partial` ([dmacvicar#317](hashicorp/terraform-plugin-sdk#317)) * helper/schema: `ResourceData.SetPartial` ([dmacvicar#317](hashicorp/terraform-plugin-sdk#317)) DEPRECATED: * helper/validation: `ValidateListUniqueStrings` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `SingleIP` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `IPRange` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `CIDRNetwork` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `ValidateJsonString` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `ValidateRegexp` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `ValidateRFC3339TimeString` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) FEATURES: * helper/validation: `IntDivisibleBy` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IntNotInSlice` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsIPv6Address` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsIPv4Address` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsCIDR` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsMACAddress` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsPortNumber` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsPortNumberOrZero` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsDayOfTheWeek` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsMonth` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsRFC3339Time` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsURLWithHTTPS` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsURLWithHTTPorHTTPS` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `IsURLWithScheme` ([dmacvicar#296](hashicorp/terraform-plugin-sdk#296)) * helper/validation: `ListOfUniqueStrings` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `IsIPAddress` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `IsIPv4Range` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `IsCIDRNetwork` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `StringIsJSON` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `StringIsValidRegExp` ([dmacvicar#301](hashicorp/terraform-plugin-sdk#301)) * helper/validation: `StringIsEmpty` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) * helper/validation: `StringIsNotEmpty` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) * helper/validation: `StringIsWhiteSpace` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) * helper/validation: `StringIsNotWhiteSpace` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) * helper/validation: `IsUUID` ([dmacvicar#294](hashicorp/terraform-plugin-sdk#294)) ([dmacvicar#297](hashicorp/terraform-plugin-sdk#297)) BUG FIXES: * schema/ExactlyOneOf: Fix handling of unknowns in complex types ([dmacvicar#287](hashicorp/terraform-plugin-sdk#287)) * helper/resource: Don't crash when dependent test sweeper is missing ([dmacvicar#279](hashicorp/terraform-plugin-sdk#279))
Version Reports:
Distro version of host:
cat /etc/redhat-release
Fedora release 27 (Twenty Seven)
Terraform Version Report
terraform --version
Terraform v0.11.2-dev
Libvirt version
virsh --version
3.7.0
terraform-provider-libvirt plugin version (git-hash)
git log | head -50
commit 7b2adfc
Author: Eamonn O'Toole eamonn.otoole@hpe.com
Date: Fri Mar 3 14:30:50 2017 +0000
commit 8aa37bc
Merge: 79ad36e 9be42d2
Author: Thomas Hipp thomashipp@gmail.com
Date: Fri Dec 8 13:28:08 2017 +0100
Description of Issue/Question
Unable to expand/use variables
Setup
cat virtual.tf
variable "tfname" {
default = "puppetmaster"
}
provider "libvirt" {
uri = "qemu:///system"
}
// blank 32GB image for net install.
resource "libvirt_volume" "${var.tfname}-qcow2" {
name = "${var.tfname}-qcow2"
pool = "default"
format = "qcow2"
size = 34359738368
}
// set boot order hd, network
resource "libvirt_domain" "${var.tfname}-qcow2" {
}
terraform init
2018/04/19 07:34:39 [INFO] Terraform version: 0.11.2 dev
2018/04/19 07:34:39 [INFO] Go runtime version: go1.9.2
2018/04/19 07:34:39 [INFO] CLI args: []string{"/root/go/src/bin/terraform-0.11.2", "init"}
2018/04/19 07:34:39 [DEBUG] Attempting to open CLI config file: /root/.terraformrc
2018/04/19 07:34:39 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/04/19 07:34:39 [INFO] CLI command args: []string{"init"}
2018/04/19 07:34:39 [DEBUG] command: loading backend config file: /root/terra/ascode/virtual
2018/04/19 07:34:39 [INFO] command: empty terraform config, returning nil
2018/04/19 07:34:39 [DEBUG] command: no data state file found for backend config
2018/04/19 07:34:39 [DEBUG] New state was assigned lineage "253419cb-54ce-49a2-81f5-eb21dbda2c13"
2018/04/19 07:34:39 [INFO] command: backend initialized:
2018/04/19 07:34:39 [DEBUG] checking for provider in "."
2018/04/19 07:34:39 [DEBUG] checking for provider in "/root/go/src/bin"
2018/04/19 07:34:39 [WARNING] found legacy provider "terraform-provider-libvirt"
2018/04/19 07:34:39 [DEBUG] found valid plugin: "libvirt"
2018/04/19 07:34:39 [DEBUG] checking for provisioner in "."
2018/04/19 07:34:39 [DEBUG] checking for provisioner in "/root/go/src/bin"
2018/04/19 07:34:39 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory
2018/04/19 07:34:39 [INFO] command: backend is not enhanced, wrapping in local
2018/04/19 07:34:39 [DEBUG] checking for provider in "."
2018/04/19 07:34:39 [DEBUG] checking for provider in "/root/go/src/bin"
2018/04/19 07:34:39 [WARNING] found legacy provider "terraform-provider-libvirt"
2018/04/19 07:34:39 [DEBUG] found valid plugin: "libvirt"
2018/04/19 07:34:39 [DEBUG] plugin requirements: "libvirt"=""
2018/04/19 07:34:39 [DEBUG] checking for provider in "."
2018/04/19 07:34:39 [DEBUG] checking for provider in "/root/go/src/bin"
2018/04/19 07:34:39 [WARNING] found legacy provider "terraform-provider-libvirt"
Initializing provider plugins...
2018/04/19 07:34:39 [DEBUG] found valid plugin: "libvirt"
2018/04/19 07:34:39 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2018/04/19 07:34:39 [DEBUG] plugin: waiting for all plugin processes to complete...
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
ok 07:34 root@dc00 ~/terra/ascode/virtual
terraform plan
2018/04/19 07:30:57 [INFO] Terraform version: 0.11.2 dev
2018/04/19 07:30:57 [INFO] Go runtime version: go1.9.2
2018/04/19 07:30:57 [INFO] CLI args: []string{"/root/go/src/bin/terraform-0.11.2", "plan"}
2018/04/19 07:30:57 [DEBUG] Attempting to open CLI config file: /root/.terraformrc
2018/04/19 07:30:57 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/04/19 07:30:57 [INFO] CLI command args: []string{"plan"}
2018/04/19 07:30:57 [INFO] command: empty terraform config, returning nil
2018/04/19 07:30:57 [DEBUG] command: no data state file found for backend config
2018/04/19 07:30:57 [DEBUG] New state was assigned lineage "929ed81c-363e-4443-a5bc-c2d744c58b1b"
2018/04/19 07:30:57 [INFO] command: backend initialized:
2018/04/19 07:30:57 [DEBUG] checking for provider in "."
2018/04/19 07:30:57 [DEBUG] checking for provider in "/root/go/src/bin"
2018/04/19 07:30:57 [WARNING] found legacy provider "terraform-provider-libvirt"
2018/04/19 07:30:57 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2018/04/19 07:30:57 [DEBUG] found valid plugin: "libvirt"
2018/04/19 07:30:57 [DEBUG] checking for provisioner in "."
2018/04/19 07:30:57 [DEBUG] checking for provisioner in "/root/go/src/bin"
2018/04/19 07:30:57 [DEBUG] checking for provisioner in ".terraform/plugins/linux_amd64"
2018/04/19 07:30:57 [INFO] command: backend is not enhanced, wrapping in local
2018/04/19 07:30:57 [INFO] backend/local: starting Plan operation
2018/04/19 07:30:57 [DEBUG] New state was assigned lineage "6ea60b56-0632-4edf-a056-8cf611236d68"
2018/04/19 07:30:57 [INFO] terraform: building graph: GraphTypeInput
2018/04/19 07:30:57 [TRACE] ConfigTransformer: Starting for path: []
2018/04/19 07:30:57 [TRACE] Graph after step *terraform.ConfigTransformer:
libvirt_domain.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
libvirt_volume.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
2018/04/19 07:30:57 [TRACE] Graph after step *terraform.LocalTransformer:
libvirt_domain.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
libvirt_volume.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
2018/04/19 07:30:57 [TRACE] Graph after step *terraform.OutputTransformer:
libvirt_domain.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
libvirt_volume.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
2018/04/19 07:30:57 [TRACE] Graph after step *terraform.OrphanResourceTransformer:
libvirt_domain.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
libvirt_volume.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
2018/04/19 07:30:57 [TRACE] Graph after step *terraform.OrphanOutputTransformer:
libvirt_domain.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
libvirt_volume.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
2018/04/19 07:30:57 [TRACE] AttachResourceConfigTransformer: Beginning...
2018/04/19 07:30:57 [TRACE] AttachResourceConfigTransformer: Attach resource config request: libvirt_volume.${var.tfname}-qcow2
2018/04/19 07:30:57 [TRACE] Attaching resource config: &config.Resource{Mode:0, Name:"${var.tfname}-qcow2", Type:"libvirt_volume", RawCount:(*config.RawConfig)(0xc42035eee0), RawConfig:(*config.RawConfig)(0xc42035ee00), Provisioners:[]*config.Provisioner(nil), Provider:"", DependsOn:[]string(nil), Lifecycle:config.ResourceLifecycle{CreateBeforeDestroy:false, PreventDestroy:false, IgnoreChanges:[]string(nil)}}
2018/04/19 07:30:57 [TRACE] AttachResourceConfigTransformer: Attach resource config request: libvirt_domain.${var.tfname}-qcow2
2018/04/19 07:30:57 [TRACE] Attaching resource config: &config.Resource{Mode:0, Name:"${var.tfname}-qcow2", Type:"libvirt_domain", RawCount:(*config.RawConfig)(0xc42035f0a0), RawConfig:(*config.RawConfig)(0xc42035ef50), Provisioners:[]*config.Provisioner(nil), Provider:"", DependsOn:[]string(nil), Lifecycle:config.ResourceLifecycle{CreateBeforeDestroy:false, PreventDestroy:false, IgnoreChanges:[]string(nil)}}
2018/04/19 07:30:57 [TRACE] Graph after step *terraform.AttachResourceConfigTransformer:
libvirt_domain.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
libvirt_volume.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
2018/04/19 07:30:57 [TRACE] Graph after step *terraform.AttachStateTransformer:
libvirt_domain.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
libvirt_volume.${var.tfname}-qcow2 - *terraform.NodeAbstractResource
2018/04/19 07:30:57 [DEBUG] plugin: waiting for all plugin processes to complete...
Error: Error asking for user input: Error parsing address 'libvirt_volume.${var.tfname}-qcow2': invalid resource address "libvirt_volume.${var.tfname}-qcow2"
fail 07:30 root@dc00 ~/terra/ascode/virtual
Steps to Reproduce Issue
Run the above tf file with "plan"
Additional Infos:
Do you have SELinux or Apparmor/Firewall enabled? Some special configuration?
Have you tried to reproduce the issue without them enabled?
None of the above
Provider works and I can provision, however I can't pass variables. I have also tried ( exporting TF_VAR_tfname="puppetmaster" ) from the parent shell etc etc .
The text was updated successfully, but these errors were encountered: