mirror of https://github.com/hashicorp/terraform
parent
f847360a40
commit
aeb5b47723
@ -1,37 +0,0 @@
|
||||
required_providers {
|
||||
testing = {
|
||||
source = "hashicorp/testing"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
provider "testing" "default" {}
|
||||
|
||||
|
||||
component "parent" {
|
||||
source = "./parent"
|
||||
|
||||
providers = {
|
||||
testing = provider.testing.default
|
||||
}
|
||||
|
||||
inputs = {
|
||||
input = "parent"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
component "self" {
|
||||
source = "./self"
|
||||
|
||||
providers = {
|
||||
testing = provider.testing.default
|
||||
}
|
||||
|
||||
inputs = {
|
||||
input = each.value
|
||||
}
|
||||
|
||||
for_each = component.parent.letters_in_id
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
testing = {
|
||||
source = "hashicorp/testing"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "id" {
|
||||
type = string
|
||||
default = null
|
||||
nullable = true # We'll generate an ID if none provided.
|
||||
}
|
||||
|
||||
variable "input" {
|
||||
type = string
|
||||
}
|
||||
|
||||
resource "testing_resource" "data" {
|
||||
id = var.id
|
||||
value = var.input
|
||||
}
|
||||
|
||||
output "letters_in_id" {
|
||||
value = toset(split("", testing_resource.data.id))
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
testing = {
|
||||
source = "hashicorp/testing"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "id" {
|
||||
type = string
|
||||
default = null
|
||||
nullable = true # We'll generate an ID if none provided.
|
||||
}
|
||||
|
||||
variable "input" {
|
||||
type = string
|
||||
}
|
||||
|
||||
resource "testing_resource" "data" {
|
||||
id = var.id
|
||||
value = var.input
|
||||
}
|
||||
Loading…
Reference in new issue