Hello, I'm trying to set an aws secret in my custo...
# general
n
Hello, I'm trying to set an aws secret in my custom elk component using the following function from the
pulumi_aws
library
Copy code
apm_secret = secretsmanager.Secret(
            resource_name="APM_SECRET",
        )
The issue that I'm having is that the resource is added to secretsmanager with a UID, but I would only like the name (without the appended UID). I've tried passing the name with the property
name="APM_SECRET"
but I receive the following TypeError:
Copy code
FAILED tests/test_elk.py::TestELK::test_infra_aws - TypeError: Secret.__init__() missing 1 required positional argument: 'resource_name'
Does anyone know how to achieve the desired result of the secret stored with the name
APM_SECRET
without a UID added to the end?
d
You need both the resource name (usually passed as a positional arg) and
name=...
. The resource name is for state tracking in pulumi
n
thank you!