terrajet
terrajet copied to clipboard
Complete tutorial for cross referencing with examples concerning imbricated field.
What problem are you facing?
I would like to add a reference about a field that is imbricated in another field.
resource "scaleway_instance_server" "base" {
image = "ubuntu_focal"
type = "DEV1-S"
private_network {
pn_id = scaleway_vpc_private_network.pn01.id
}
}
In this example I would like to target the pn_id
that is inside the private_network
field. What should be the value that goes in this snippet of code:
r.References["private_network.*.pn_id"] = config.Reference{
Type: "github.com/crossplane-contrib/provider-jet-scaleway/apis/vpc/v1alpha1.PrivateNetwork",
}
Because I can have several private_network
blocks defined I'm not sure about the syntax I should use here.
How could Terrajet help solve your problem?
Completing the documentation present at this page: https://github.com/crossplane/terrajet/blob/main/docs/configuring-a-resource.md#cross-resource-referencing
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.