How to get mock outputs in the case of Map scenario #677
Unanswered
s-u-b-h-a-k-a-r
asked this question in
Help
Replies: 2 comments 4 replies
-
@s-u-b-h-a-k-a-r is this question in reference to one of our open source projects or is this a general Terraform question? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi,
or referenced through
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please help how to get the mock outputs to refer as dependency in the below case
Subnets response
subnets = {
"us-west1/te-admin-subnet" = {
"creation_timestamp" = "2023-03-07T23:43:13.435-08:00"
"description" = ""
"external_ipv6_prefix" = ""
"fingerprint" = tostring(null)
"gateway_address" = "10.0.0.1"
"id" = "projects/systems/regions/us-west1/subnetworks/te-admin-subnet"
"ip_cidr_range" = "10.0.0.0/16"
"ipv6_access_type" = ""
"ipv6_cidr_range" = ""
"log_config" = tolist([])
"name" = "te-admin-subnet"
"network" = "https://www.googleapis.com/compute/v1/projects/systems/global/networks/te-admin-vpc"
"private_ip_google_access" = true
"private_ipv6_google_access" = "DISABLE_GOOGLE_ACCESS"
"project" = "systems"
"purpose" = "PRIVATE"
"region" = "us-west1"
"role" = ""
"secondary_ip_range" = tolist([
{
"ip_cidr_range" = "10.10.0.0/16"
"range_name" = "te-admin-ip-range-pods"
},
{
"ip_cidr_range" = "10.100.0.0/16"
"range_name" = "te-admin-ip-range-services"
},
])
"self_link" = "https://www.googleapis.com/compute/v1/projects/systems/regions/us-west1/subnetworks/te-admin-subnet"
"stack_type" = "IPV4_ONLY"
"timeouts" = null /* object */
}
}
terraform {
source = "tfr:///terraform-google-modules/network/google//modules/subnets?version=6.0.1"
}
dependency "subnets" {
config_path = "../subnets"
mock_outputs = {subnets = {dummy = {}}}
}
inputs = {
network = dependency.vpc.outputs.network_name
subnetwork = dependency.subnets.outputs.subnets["dummy"].name
ip_range_pods = "${local.name}-${local.env}-ip-range-pods"
ip_range_services = "${local.name}-${local.env}-ip-range-services"
master_ipv4_cidr_block = "10.100.100.0/28"
}
Tracked in ticket #109960
Beta Was this translation helpful? Give feedback.
All reactions