Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Use relative module path syntax for child modules of root - #4

Open
apparentlymart wants to merge 1 commit into
hashicorp:masterfrom
apparentlymart:patch-1
Open

Use relative module path syntax for child modules of root#4
apparentlymart wants to merge 1 commit into
hashicorp:masterfrom
apparentlymart:patch-1

Conversation

@apparentlymart

Copy link
Copy Markdown

As of Terraform 0.11, an address like "modules/nomad-cluster" is interpreted as a registry module.

Local paths are indicated by explicitly prefixing with "./" or "../".

As of Terraform 0.11, an address like "modules/nomad-cluster" is interpreted as a registry module.
Local paths are indicated by explicitly prefixing with "./" or "../".
@brikis98
brikis98 requested a review from josh-padnick March 3, 2018 17:30
@josh-padnick

Copy link
Copy Markdown
Contributor

@apparentlymart Thanks for pointing this out! The change looks valid, however the lack of automated tests here are definitely hurting us. :( It looks like this code also needs it outputs updated for compatibility with Terraform 11:

Warning: output "firewall_rule_allow_inbound_http_url": must use splat syntax to access google_compute_firewall.allow_inbound_http attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_http.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_http_id": must use splat syntax to access google_compute_firewall.allow_inbound_http attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_http.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_rpc_url": must use splat syntax to access google_compute_firewall.allow_inbound_rpc attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_rpc.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_rpc_id": must use splat syntax to access google_compute_firewall.allow_inbound_rpc attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_rpc.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_serf_url": must use splat syntax to access google_compute_firewall.allow_inbound_serf attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_serf.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_serf_id": must use splat syntax to access google_compute_firewall.allow_inbound_serf attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_serf.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_http_url": must use splat syntax to access google_compute_firewall.allow_inbound_http attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_http.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_http_id": must use splat syntax to access google_compute_firewall.allow_inbound_http attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_http.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_rpc_url": must use splat syntax to access google_compute_firewall.allow_inbound_rpc attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_rpc.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_rpc_id": must use splat syntax to access google_compute_firewall.allow_inbound_rpc attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_rpc.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_serf_url": must use splat syntax to access google_compute_firewall.allow_inbound_serf attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_serf.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_serf_id": must use splat syntax to access google_compute_firewall.allow_inbound_serf attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_serf.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_inbound_http_url": must use splat syntax to access google_compute_firewall.allow_inboud_http_api attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inboud_http_api.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_inbound_http_name": must use splat syntax to access google_compute_firewall.allow_inboud_http_api attribute "name", because it has "count" set; use google_compute_firewall.allow_inboud_http_api.*.name to obtain a list of the attributes across all instances



Warning: output "firewall_rule_inbound_dns_url": must use splat syntax to access google_compute_firewall.allow_inbound_dns attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_dns.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_inbound_dns_name": must use splat syntax to access google_compute_firewall.allow_inbound_dns attribute "name", because it has "count" set; use google_compute_firewall.allow_inbound_dns.*.name to obtain a list of the attributes across all instances



data.template_file.startup_script_nomad_client: Refreshing state...
data.template_file.startup_script_nomad_consul_server: Refreshing state...

Warning: output "firewall_rule_allow_inbound_http_url": must use splat syntax to access google_compute_firewall.allow_inbound_http attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_http.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_http_id": must use splat syntax to access google_compute_firewall.allow_inbound_http attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_http.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_rpc_url": must use splat syntax to access google_compute_firewall.allow_inbound_rpc attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_rpc.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_rpc_id": must use splat syntax to access google_compute_firewall.allow_inbound_rpc attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_rpc.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_serf_url": must use splat syntax to access google_compute_firewall.allow_inbound_serf attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_serf.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_serf_id": must use splat syntax to access google_compute_firewall.allow_inbound_serf attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_serf.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_http_url": must use splat syntax to access google_compute_firewall.allow_inbound_http attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_http.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_http_id": must use splat syntax to access google_compute_firewall.allow_inbound_http attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_http.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_rpc_url": must use splat syntax to access google_compute_firewall.allow_inbound_rpc attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_rpc.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_rpc_id": must use splat syntax to access google_compute_firewall.allow_inbound_rpc attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_rpc.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_serf_url": must use splat syntax to access google_compute_firewall.allow_inbound_serf attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_serf.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_allow_inbound_serf_id": must use splat syntax to access google_compute_firewall.allow_inbound_serf attribute "id", because it has "count" set; use google_compute_firewall.allow_inbound_serf.*.id to obtain a list of the attributes across all instances



Warning: output "firewall_rule_inbound_http_url": must use splat syntax to access google_compute_firewall.allow_inboud_http_api attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inboud_http_api.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_inbound_http_name": must use splat syntax to access google_compute_firewall.allow_inboud_http_api attribute "name", because it has "count" set; use google_compute_firewall.allow_inboud_http_api.*.name to obtain a list of the attributes across all instances



Warning: output "firewall_rule_inbound_dns_url": must use splat syntax to access google_compute_firewall.allow_inbound_dns attribute "self_link", because it has "count" set; use google_compute_firewall.allow_inbound_dns.*.self_link to obtain a list of the attributes across all instances



Warning: output "firewall_rule_inbound_dns_name": must use splat syntax to access google_compute_firewall.allow_inbound_dns attribute "name", because it has "count" set; use google_compute_firewall.allow_inbound_dns.*.name to obtain a list of the attributes across all instances



Error: Error running plan: 10 error(s) occurred:

* module.nomad_firewall_rules.output.firewall_rule_allow_inbound_serf_url: Resource 'google_compute_firewall.allow_inbound_serf' not found for variable 'google_compute_firewall.allow_inbound_serf.self_link'
* module.nomad_firewall_rules.output.firewall_rule_allow_inbound_rpc_id: Resource 'google_compute_firewall.allow_inbound_rpc' not found for variable 'google_compute_firewall.allow_inbound_rpc.id'
* module.nomad_clients.module.firewall_rules.output.firewall_rule_allow_inbound_rpc_id: Resource 'google_compute_firewall.allow_inbound_rpc' not found for variable 'google_compute_firewall.allow_inbound_rpc.id'
* module.nomad_clients.module.firewall_rules.output.firewall_rule_allow_inbound_http_url: Resource 'google_compute_firewall.allow_inbound_http' not found for variable 'google_compute_firewall.allow_inbound_http.self_link'
* module.nomad_clients.module.firewall_rules.output.firewall_rule_allow_inbound_rpc_url: Resource 'google_compute_firewall.allow_inbound_rpc' not found for variable 'google_compute_firewall.allow_inbound_rpc.self_link'
* module.nomad_clients.module.firewall_rules.output.firewall_rule_allow_inbound_serf_url: Resource 'google_compute_firewall.allow_inbound_serf' not found for variable 'google_compute_firewall.allow_inbound_serf.self_link'
* module.nomad_firewall_rules.output.firewall_rule_allow_inbound_rpc_url: Resource 'google_compute_firewall.allow_inbound_rpc' not found for variable 'google_compute_firewall.allow_inbound_rpc.self_link'
* module.nomad_clients.module.firewall_rules.output.firewall_rule_allow_inbound_http_id: Resource 'google_compute_firewall.allow_inbound_http' not found for variable 'google_compute_firewall.allow_inbound_http.id'
* module.nomad_firewall_rules.output.firewall_rule_allow_inbound_serf_id: Resource 'google_compute_firewall.allow_inbound_serf' not found for variable 'google_compute_firewall.allow_inbound_serf.id'
* module.nomad_clients.module.firewall_rules.output.firewall_rule_allow_inbound_serf_id: Resource 'google_compute_firewall.allow_inbound_serf' not found for variable 'google_compute_firewall.allow_inbound_serf.id'

In the interest of not merging a PR we know to lead to failing code, I'm going to leave this open until that issue is resolved. PRs welcome on this, otherwise, we will tackle this soon.

@josh-padnick josh-padnick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine, but it appears the repo needs to be generally updated for support with Terraform11.

@hashicorp-cla

hashicorp-cla commented Mar 12, 2022

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants