WaitDepend on resources in parent from module












1















I create the resource group and the vNet in the main.tf and I reference module in the same file. The problem is, module cannot access these resources from the module. related code (most of the code removed, only relevant parts left):



main.tf:



module "worker" {
source = "./vmLoop"

vmName = "worker"
prefix = "${var.reference["name"]}"
loop = "${var.reference["workerCount"]}"
}

resource "azurerm_resource_group" "rg" {
name = "${var.reference["name"]}"
location = "${var.reference["location"]}"
}


How do I reference this resource group in the module? inside main.tf I can do this: "${azurerm_resource_group.rg.name}". Not only that, if I want to use data inside the module, that would fail because the resource is not yet created (most of the code removed, only relevant parts left):



Module.tf:



data "azurerm_resource_group" "rg" {
name = "${var.prefix}"
}


Everything works fine if I precreate resource groupvnet.



In arm template, I would add a dependsOn property. However, modules in terraform do not support depends_on.










share|improve this question





























    1















    I create the resource group and the vNet in the main.tf and I reference module in the same file. The problem is, module cannot access these resources from the module. related code (most of the code removed, only relevant parts left):



    main.tf:



    module "worker" {
    source = "./vmLoop"

    vmName = "worker"
    prefix = "${var.reference["name"]}"
    loop = "${var.reference["workerCount"]}"
    }

    resource "azurerm_resource_group" "rg" {
    name = "${var.reference["name"]}"
    location = "${var.reference["location"]}"
    }


    How do I reference this resource group in the module? inside main.tf I can do this: "${azurerm_resource_group.rg.name}". Not only that, if I want to use data inside the module, that would fail because the resource is not yet created (most of the code removed, only relevant parts left):



    Module.tf:



    data "azurerm_resource_group" "rg" {
    name = "${var.prefix}"
    }


    Everything works fine if I precreate resource groupvnet.



    In arm template, I would add a dependsOn property. However, modules in terraform do not support depends_on.










    share|improve this question



























      1












      1








      1








      I create the resource group and the vNet in the main.tf and I reference module in the same file. The problem is, module cannot access these resources from the module. related code (most of the code removed, only relevant parts left):



      main.tf:



      module "worker" {
      source = "./vmLoop"

      vmName = "worker"
      prefix = "${var.reference["name"]}"
      loop = "${var.reference["workerCount"]}"
      }

      resource "azurerm_resource_group" "rg" {
      name = "${var.reference["name"]}"
      location = "${var.reference["location"]}"
      }


      How do I reference this resource group in the module? inside main.tf I can do this: "${azurerm_resource_group.rg.name}". Not only that, if I want to use data inside the module, that would fail because the resource is not yet created (most of the code removed, only relevant parts left):



      Module.tf:



      data "azurerm_resource_group" "rg" {
      name = "${var.prefix}"
      }


      Everything works fine if I precreate resource groupvnet.



      In arm template, I would add a dependsOn property. However, modules in terraform do not support depends_on.










      share|improve this question
















      I create the resource group and the vNet in the main.tf and I reference module in the same file. The problem is, module cannot access these resources from the module. related code (most of the code removed, only relevant parts left):



      main.tf:



      module "worker" {
      source = "./vmLoop"

      vmName = "worker"
      prefix = "${var.reference["name"]}"
      loop = "${var.reference["workerCount"]}"
      }

      resource "azurerm_resource_group" "rg" {
      name = "${var.reference["name"]}"
      location = "${var.reference["location"]}"
      }


      How do I reference this resource group in the module? inside main.tf I can do this: "${azurerm_resource_group.rg.name}". Not only that, if I want to use data inside the module, that would fail because the resource is not yet created (most of the code removed, only relevant parts left):



      Module.tf:



      data "azurerm_resource_group" "rg" {
      name = "${var.prefix}"
      }


      Everything works fine if I precreate resource groupvnet.



      In arm template, I would add a dependsOn property. However, modules in terraform do not support depends_on.







      azure reference virtual-machine terraform






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 8:19









      Vít Kotačka

      525522




      525522










      asked Nov 20 '18 at 12:45









      4c74356b414c74356b41

      29.6k42154




      29.6k42154
























          3 Answers
          3






          active

          oldest

          votes


















          1














          There's a fairly hackish workaround to this.



          You can use depends_on on output variables of upstream module in the downstream, BUT you must make sure you use the variable in the downstream module, not just use it in the depends_on clause.



          Unfortunately, that's not an ideal solution and it might not be applicable in some situations.






          share|improve this answer
























          • hey, can you provide some example code, i dont really understand this explanation, sorry

            – 4c74356b41
            Nov 21 '18 at 8:47













          • A code snippet will be WAY TOO LONG, so I will explain here. The idea is that, when you are calling a module you are most probably going to have output variables. You can use those values in other modules. So, what you can do is, use the depends_on = output_var clause when calling the second moudle. But you must make sure, that somewhere inside that second module, you use the output variable you have passed to your depends_on clause. I am not profficient in Azure, but in AWS, e.g. Create VPC > Pass ID as depends_on value > Use VPC_ID in the second module.

            – AlexK
            Nov 21 '18 at 8:54













          • in my case i dont have output value and I dont have a module thats preceding this module, only main.tf that calls the module. as you clearly know what you are talking about - you got a link to aws example?

            – 4c74356b41
            Nov 21 '18 at 8:58











          • Unfortunately, I don't , I used this approach on a project I worked for, but we can start a chat so we don't spam here and discuss better.

            – AlexK
            Nov 21 '18 at 8:59











          • Bah, an option here in the comments should show, where you start it ...., thought it was already there

            – AlexK
            Nov 21 '18 at 9:01



















          1














          In the module you should be passing the subnetID or resource group, or whatever you are creating as a variable. For instance in your main config you might call the following:



          module "vnet" {
          source = "Azure/network/azurerm"
          resource_group_name = "${var.resource_group}"
          vnet_name = "${terraform.workspace}-vnet"
          location = "${var.arm_region}"
          address_space = "${var.arm_network_address_space}"
          subnet_prefixes = ["${var.arm_subnet1_address_space}", "${var.arm_subnet2_address_space}"]
          subnet_names = ["subnet1", "subnet2"]

          tags = {
          environment = "${terraform.workspace}"
          }
          }


          Then invoke your vmdeploy module that using the subnetID as follows:



          module "vmdeploy" {
          source = "./vmdeploy"
          subnetID = "${module.vnet.vnet_subnets[0]}"
          }


          By referencing the other module as a value for the vmdeploy module you are creating an implicit dependency that Terraform will recognize and include in the resource graph.



          Within the module itself you would define a variable called subnetID like this:



          var "subnetID" {}


          Does that help?






          share|improve this answer
























          • hey Ned, thanks (and thanks for your course on tf)! this is more or less what I'm doing right now as a wordaround. I was hoping for a less hackish way

            – 4c74356b41
            Nov 21 '18 at 16:12



















          0














          You need to pass the name of the Resource Group to the module.
          i.e.:



          module "worker" {
          source = "./vmLoop"

          rg = "${azurerm_resource_group.rg.name}"
          vmName = "worker"
          prefix = "${var.reference["name"]}"
          loop = "${var.reference["workerCount"]}"
          }


          Then in the worker module code itself, you would use the rg var for the worker's Resource Group.






          share|improve this answer
























          • yeah, but like I said, the problem is the subnet resource, rg resource is just to showcase.

            – 4c74356b41
            Nov 20 '18 at 15:51











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53393299%2fwait-depend-on-resources-in-parent-from-module%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          There's a fairly hackish workaround to this.



          You can use depends_on on output variables of upstream module in the downstream, BUT you must make sure you use the variable in the downstream module, not just use it in the depends_on clause.



          Unfortunately, that's not an ideal solution and it might not be applicable in some situations.






          share|improve this answer
























          • hey, can you provide some example code, i dont really understand this explanation, sorry

            – 4c74356b41
            Nov 21 '18 at 8:47













          • A code snippet will be WAY TOO LONG, so I will explain here. The idea is that, when you are calling a module you are most probably going to have output variables. You can use those values in other modules. So, what you can do is, use the depends_on = output_var clause when calling the second moudle. But you must make sure, that somewhere inside that second module, you use the output variable you have passed to your depends_on clause. I am not profficient in Azure, but in AWS, e.g. Create VPC > Pass ID as depends_on value > Use VPC_ID in the second module.

            – AlexK
            Nov 21 '18 at 8:54













          • in my case i dont have output value and I dont have a module thats preceding this module, only main.tf that calls the module. as you clearly know what you are talking about - you got a link to aws example?

            – 4c74356b41
            Nov 21 '18 at 8:58











          • Unfortunately, I don't , I used this approach on a project I worked for, but we can start a chat so we don't spam here and discuss better.

            – AlexK
            Nov 21 '18 at 8:59











          • Bah, an option here in the comments should show, where you start it ...., thought it was already there

            – AlexK
            Nov 21 '18 at 9:01
















          1














          There's a fairly hackish workaround to this.



          You can use depends_on on output variables of upstream module in the downstream, BUT you must make sure you use the variable in the downstream module, not just use it in the depends_on clause.



          Unfortunately, that's not an ideal solution and it might not be applicable in some situations.






          share|improve this answer
























          • hey, can you provide some example code, i dont really understand this explanation, sorry

            – 4c74356b41
            Nov 21 '18 at 8:47













          • A code snippet will be WAY TOO LONG, so I will explain here. The idea is that, when you are calling a module you are most probably going to have output variables. You can use those values in other modules. So, what you can do is, use the depends_on = output_var clause when calling the second moudle. But you must make sure, that somewhere inside that second module, you use the output variable you have passed to your depends_on clause. I am not profficient in Azure, but in AWS, e.g. Create VPC > Pass ID as depends_on value > Use VPC_ID in the second module.

            – AlexK
            Nov 21 '18 at 8:54













          • in my case i dont have output value and I dont have a module thats preceding this module, only main.tf that calls the module. as you clearly know what you are talking about - you got a link to aws example?

            – 4c74356b41
            Nov 21 '18 at 8:58











          • Unfortunately, I don't , I used this approach on a project I worked for, but we can start a chat so we don't spam here and discuss better.

            – AlexK
            Nov 21 '18 at 8:59











          • Bah, an option here in the comments should show, where you start it ...., thought it was already there

            – AlexK
            Nov 21 '18 at 9:01














          1












          1








          1







          There's a fairly hackish workaround to this.



          You can use depends_on on output variables of upstream module in the downstream, BUT you must make sure you use the variable in the downstream module, not just use it in the depends_on clause.



          Unfortunately, that's not an ideal solution and it might not be applicable in some situations.






          share|improve this answer













          There's a fairly hackish workaround to this.



          You can use depends_on on output variables of upstream module in the downstream, BUT you must make sure you use the variable in the downstream module, not just use it in the depends_on clause.



          Unfortunately, that's not an ideal solution and it might not be applicable in some situations.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 '18 at 16:17









          AlexKAlexK

          869513




          869513













          • hey, can you provide some example code, i dont really understand this explanation, sorry

            – 4c74356b41
            Nov 21 '18 at 8:47













          • A code snippet will be WAY TOO LONG, so I will explain here. The idea is that, when you are calling a module you are most probably going to have output variables. You can use those values in other modules. So, what you can do is, use the depends_on = output_var clause when calling the second moudle. But you must make sure, that somewhere inside that second module, you use the output variable you have passed to your depends_on clause. I am not profficient in Azure, but in AWS, e.g. Create VPC > Pass ID as depends_on value > Use VPC_ID in the second module.

            – AlexK
            Nov 21 '18 at 8:54













          • in my case i dont have output value and I dont have a module thats preceding this module, only main.tf that calls the module. as you clearly know what you are talking about - you got a link to aws example?

            – 4c74356b41
            Nov 21 '18 at 8:58











          • Unfortunately, I don't , I used this approach on a project I worked for, but we can start a chat so we don't spam here and discuss better.

            – AlexK
            Nov 21 '18 at 8:59











          • Bah, an option here in the comments should show, where you start it ...., thought it was already there

            – AlexK
            Nov 21 '18 at 9:01



















          • hey, can you provide some example code, i dont really understand this explanation, sorry

            – 4c74356b41
            Nov 21 '18 at 8:47













          • A code snippet will be WAY TOO LONG, so I will explain here. The idea is that, when you are calling a module you are most probably going to have output variables. You can use those values in other modules. So, what you can do is, use the depends_on = output_var clause when calling the second moudle. But you must make sure, that somewhere inside that second module, you use the output variable you have passed to your depends_on clause. I am not profficient in Azure, but in AWS, e.g. Create VPC > Pass ID as depends_on value > Use VPC_ID in the second module.

            – AlexK
            Nov 21 '18 at 8:54













          • in my case i dont have output value and I dont have a module thats preceding this module, only main.tf that calls the module. as you clearly know what you are talking about - you got a link to aws example?

            – 4c74356b41
            Nov 21 '18 at 8:58











          • Unfortunately, I don't , I used this approach on a project I worked for, but we can start a chat so we don't spam here and discuss better.

            – AlexK
            Nov 21 '18 at 8:59











          • Bah, an option here in the comments should show, where you start it ...., thought it was already there

            – AlexK
            Nov 21 '18 at 9:01

















          hey, can you provide some example code, i dont really understand this explanation, sorry

          – 4c74356b41
          Nov 21 '18 at 8:47







          hey, can you provide some example code, i dont really understand this explanation, sorry

          – 4c74356b41
          Nov 21 '18 at 8:47















          A code snippet will be WAY TOO LONG, so I will explain here. The idea is that, when you are calling a module you are most probably going to have output variables. You can use those values in other modules. So, what you can do is, use the depends_on = output_var clause when calling the second moudle. But you must make sure, that somewhere inside that second module, you use the output variable you have passed to your depends_on clause. I am not profficient in Azure, but in AWS, e.g. Create VPC > Pass ID as depends_on value > Use VPC_ID in the second module.

          – AlexK
          Nov 21 '18 at 8:54







          A code snippet will be WAY TOO LONG, so I will explain here. The idea is that, when you are calling a module you are most probably going to have output variables. You can use those values in other modules. So, what you can do is, use the depends_on = output_var clause when calling the second moudle. But you must make sure, that somewhere inside that second module, you use the output variable you have passed to your depends_on clause. I am not profficient in Azure, but in AWS, e.g. Create VPC > Pass ID as depends_on value > Use VPC_ID in the second module.

          – AlexK
          Nov 21 '18 at 8:54















          in my case i dont have output value and I dont have a module thats preceding this module, only main.tf that calls the module. as you clearly know what you are talking about - you got a link to aws example?

          – 4c74356b41
          Nov 21 '18 at 8:58





          in my case i dont have output value and I dont have a module thats preceding this module, only main.tf that calls the module. as you clearly know what you are talking about - you got a link to aws example?

          – 4c74356b41
          Nov 21 '18 at 8:58













          Unfortunately, I don't , I used this approach on a project I worked for, but we can start a chat so we don't spam here and discuss better.

          – AlexK
          Nov 21 '18 at 8:59





          Unfortunately, I don't , I used this approach on a project I worked for, but we can start a chat so we don't spam here and discuss better.

          – AlexK
          Nov 21 '18 at 8:59













          Bah, an option here in the comments should show, where you start it ...., thought it was already there

          – AlexK
          Nov 21 '18 at 9:01





          Bah, an option here in the comments should show, where you start it ...., thought it was already there

          – AlexK
          Nov 21 '18 at 9:01













          1














          In the module you should be passing the subnetID or resource group, or whatever you are creating as a variable. For instance in your main config you might call the following:



          module "vnet" {
          source = "Azure/network/azurerm"
          resource_group_name = "${var.resource_group}"
          vnet_name = "${terraform.workspace}-vnet"
          location = "${var.arm_region}"
          address_space = "${var.arm_network_address_space}"
          subnet_prefixes = ["${var.arm_subnet1_address_space}", "${var.arm_subnet2_address_space}"]
          subnet_names = ["subnet1", "subnet2"]

          tags = {
          environment = "${terraform.workspace}"
          }
          }


          Then invoke your vmdeploy module that using the subnetID as follows:



          module "vmdeploy" {
          source = "./vmdeploy"
          subnetID = "${module.vnet.vnet_subnets[0]}"
          }


          By referencing the other module as a value for the vmdeploy module you are creating an implicit dependency that Terraform will recognize and include in the resource graph.



          Within the module itself you would define a variable called subnetID like this:



          var "subnetID" {}


          Does that help?






          share|improve this answer
























          • hey Ned, thanks (and thanks for your course on tf)! this is more or less what I'm doing right now as a wordaround. I was hoping for a less hackish way

            – 4c74356b41
            Nov 21 '18 at 16:12
















          1














          In the module you should be passing the subnetID or resource group, or whatever you are creating as a variable. For instance in your main config you might call the following:



          module "vnet" {
          source = "Azure/network/azurerm"
          resource_group_name = "${var.resource_group}"
          vnet_name = "${terraform.workspace}-vnet"
          location = "${var.arm_region}"
          address_space = "${var.arm_network_address_space}"
          subnet_prefixes = ["${var.arm_subnet1_address_space}", "${var.arm_subnet2_address_space}"]
          subnet_names = ["subnet1", "subnet2"]

          tags = {
          environment = "${terraform.workspace}"
          }
          }


          Then invoke your vmdeploy module that using the subnetID as follows:



          module "vmdeploy" {
          source = "./vmdeploy"
          subnetID = "${module.vnet.vnet_subnets[0]}"
          }


          By referencing the other module as a value for the vmdeploy module you are creating an implicit dependency that Terraform will recognize and include in the resource graph.



          Within the module itself you would define a variable called subnetID like this:



          var "subnetID" {}


          Does that help?






          share|improve this answer
























          • hey Ned, thanks (and thanks for your course on tf)! this is more or less what I'm doing right now as a wordaround. I was hoping for a less hackish way

            – 4c74356b41
            Nov 21 '18 at 16:12














          1












          1








          1







          In the module you should be passing the subnetID or resource group, or whatever you are creating as a variable. For instance in your main config you might call the following:



          module "vnet" {
          source = "Azure/network/azurerm"
          resource_group_name = "${var.resource_group}"
          vnet_name = "${terraform.workspace}-vnet"
          location = "${var.arm_region}"
          address_space = "${var.arm_network_address_space}"
          subnet_prefixes = ["${var.arm_subnet1_address_space}", "${var.arm_subnet2_address_space}"]
          subnet_names = ["subnet1", "subnet2"]

          tags = {
          environment = "${terraform.workspace}"
          }
          }


          Then invoke your vmdeploy module that using the subnetID as follows:



          module "vmdeploy" {
          source = "./vmdeploy"
          subnetID = "${module.vnet.vnet_subnets[0]}"
          }


          By referencing the other module as a value for the vmdeploy module you are creating an implicit dependency that Terraform will recognize and include in the resource graph.



          Within the module itself you would define a variable called subnetID like this:



          var "subnetID" {}


          Does that help?






          share|improve this answer













          In the module you should be passing the subnetID or resource group, or whatever you are creating as a variable. For instance in your main config you might call the following:



          module "vnet" {
          source = "Azure/network/azurerm"
          resource_group_name = "${var.resource_group}"
          vnet_name = "${terraform.workspace}-vnet"
          location = "${var.arm_region}"
          address_space = "${var.arm_network_address_space}"
          subnet_prefixes = ["${var.arm_subnet1_address_space}", "${var.arm_subnet2_address_space}"]
          subnet_names = ["subnet1", "subnet2"]

          tags = {
          environment = "${terraform.workspace}"
          }
          }


          Then invoke your vmdeploy module that using the subnetID as follows:



          module "vmdeploy" {
          source = "./vmdeploy"
          subnetID = "${module.vnet.vnet_subnets[0]}"
          }


          By referencing the other module as a value for the vmdeploy module you are creating an implicit dependency that Terraform will recognize and include in the resource graph.



          Within the module itself you would define a variable called subnetID like this:



          var "subnetID" {}


          Does that help?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 21 '18 at 16:06









          Ned BellavanceNed Bellavance

          111




          111













          • hey Ned, thanks (and thanks for your course on tf)! this is more or less what I'm doing right now as a wordaround. I was hoping for a less hackish way

            – 4c74356b41
            Nov 21 '18 at 16:12



















          • hey Ned, thanks (and thanks for your course on tf)! this is more or less what I'm doing right now as a wordaround. I was hoping for a less hackish way

            – 4c74356b41
            Nov 21 '18 at 16:12

















          hey Ned, thanks (and thanks for your course on tf)! this is more or less what I'm doing right now as a wordaround. I was hoping for a less hackish way

          – 4c74356b41
          Nov 21 '18 at 16:12





          hey Ned, thanks (and thanks for your course on tf)! this is more or less what I'm doing right now as a wordaround. I was hoping for a less hackish way

          – 4c74356b41
          Nov 21 '18 at 16:12











          0














          You need to pass the name of the Resource Group to the module.
          i.e.:



          module "worker" {
          source = "./vmLoop"

          rg = "${azurerm_resource_group.rg.name}"
          vmName = "worker"
          prefix = "${var.reference["name"]}"
          loop = "${var.reference["workerCount"]}"
          }


          Then in the worker module code itself, you would use the rg var for the worker's Resource Group.






          share|improve this answer
























          • yeah, but like I said, the problem is the subnet resource, rg resource is just to showcase.

            – 4c74356b41
            Nov 20 '18 at 15:51
















          0














          You need to pass the name of the Resource Group to the module.
          i.e.:



          module "worker" {
          source = "./vmLoop"

          rg = "${azurerm_resource_group.rg.name}"
          vmName = "worker"
          prefix = "${var.reference["name"]}"
          loop = "${var.reference["workerCount"]}"
          }


          Then in the worker module code itself, you would use the rg var for the worker's Resource Group.






          share|improve this answer
























          • yeah, but like I said, the problem is the subnet resource, rg resource is just to showcase.

            – 4c74356b41
            Nov 20 '18 at 15:51














          0












          0








          0







          You need to pass the name of the Resource Group to the module.
          i.e.:



          module "worker" {
          source = "./vmLoop"

          rg = "${azurerm_resource_group.rg.name}"
          vmName = "worker"
          prefix = "${var.reference["name"]}"
          loop = "${var.reference["workerCount"]}"
          }


          Then in the worker module code itself, you would use the rg var for the worker's Resource Group.






          share|improve this answer













          You need to pass the name of the Resource Group to the module.
          i.e.:



          module "worker" {
          source = "./vmLoop"

          rg = "${azurerm_resource_group.rg.name}"
          vmName = "worker"
          prefix = "${var.reference["name"]}"
          loop = "${var.reference["workerCount"]}"
          }


          Then in the worker module code itself, you would use the rg var for the worker's Resource Group.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 '18 at 15:39









          KJHKJH

          1,187616




          1,187616













          • yeah, but like I said, the problem is the subnet resource, rg resource is just to showcase.

            – 4c74356b41
            Nov 20 '18 at 15:51



















          • yeah, but like I said, the problem is the subnet resource, rg resource is just to showcase.

            – 4c74356b41
            Nov 20 '18 at 15:51

















          yeah, but like I said, the problem is the subnet resource, rg resource is just to showcase.

          – 4c74356b41
          Nov 20 '18 at 15:51





          yeah, but like I said, the problem is the subnet resource, rg resource is just to showcase.

          – 4c74356b41
          Nov 20 '18 at 15:51


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53393299%2fwait-depend-on-resources-in-parent-from-module%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Academy of Television Arts & Sciences

          L'Équipe

          1995 France bombings