https://pulumi.com logo
#aws
Title
# aws
g

glamorous-spring-30202

07/04/2022, 7:14 AM
Hi all, I am trying to create a Transfer server with pulumi and I want to register a custom domain for it. As per this guide, I need to add two tags to the pulumi component,
aws:transfer:customHostname
and
aws:transfer:route53HostedZoneId
. The problem is that those tags start with
aws:
which is a reserved prefix. It works if I add those tags through the command line, and the guide mentions it should work with CDK. So, I am wondering if there is a way I can create those tags with pulumi as well, or if anyone encountered this and has a workaround. Thank you
b

big-agent-83308

07/04/2022, 7:49 AM
Unfortunately the properties are not exposed on the underlying terraform resource: https://github.com/hashicorp/terraform-provider-aws/issues/18077
I've partially worked around this - unfortunately not in a satisfying way, by calling the
aws
cli via a Pulumi Command resource:
Copy code
aws transfer tag-resource --arn {ftpServer.Arn} --tags Key=aws:transfer:customHostname,Value={args.TransferCustomHostname}
Note I'm not using route53, so I'm not setting the 2nd tag.
g

glamorous-spring-30202

07/04/2022, 8:00 AM
Hmm, I haven't seen the command component before, I think that will work well. Not ideal, but given the context, I think it is a good solution. Thank you for that.
b

big-agent-83308

07/04/2022, 8:09 AM
You could shell out to the
aws
cli yourself without the Command resource - it's not mandatory for this solution to work
g

glamorous-spring-30202

07/04/2022, 8:11 AM
Yes, that is where I was heading, but it looks more elegant having the command component, I like it :)
15 Views