dazzling-oxygen-84405
02/11/2025, 10:49 AMmodern-zebra-45309
02/11/2025, 12:31 PMfield_a = "name"
field_b = self.field_a.value
or something like this. The only solution to this that I know is to generate a name yourself prior to creating the resource (e.g., using a random string), store it in a variable, and then use that variable to fill in the input values.dazzling-oxygen-84405
02/11/2025, 12:51 PMapiVersion: <http://grafana.integreatly.org/v1beta1|grafana.integreatly.org/v1beta1>
kind: Grafana
metadata:
name: grafana
namespace: monitoring
spec:
deployment:
spec:
template:
spec:
containers:
- image: grafana/grafana:11.5.1
name: grafana
volumes:
- name: grafana-data
persistentVolumeClaim:
claimName: grafana-pvc
persistentVolumeClaim: { ... }
where the claimName
needs to be ${metadata.name}-pvc
. Which currently isn't possible with auto-named resources.
IMO this could be available in transformations
maybe (it currently isn't)? I'll open a feature request on GitHub for this.modern-zebra-45309
02/11/2025, 12:56 PMdazzling-oxygen-84405
02/11/2025, 1:16 PMargs.props.metadata.name
, it comes up as undefined
.dazzling-oxygen-84405
02/11/2025, 1:17 PMname
argument 🤦♂️modern-zebra-45309
02/11/2025, 1:22 PMdazzling-oxygen-84405
02/11/2025, 1:23 PMname
argument
Ah, that just contains the Pulumi-level name, not including the auto-generated suffix 😕modern-zebra-45309
02/11/2025, 1:24 PMtransform
runs on the args that you provide in your program, and then if the resource doesn't get a name as part of these args, a name is autogenerated.modern-zebra-45309
02/11/2025, 1:25 PMmodern-zebra-45309
02/11/2025, 1:26 PMdazzling-oxygen-84405
02/11/2025, 1:48 PM