1

I'm having trouble coming up with a sensible solution to my issue. I'm attempting to automate the creation of a ROSA cluster using my companies standard automation tool. There is no provider for ROSA, so I'm essentially wrapping the actions using a mixture of create actions using "null_resource" and read actions using data "external".

The cluster creation has gone smoothly, but I now need to create a cluster-admin user (ie, rosa create admin). When successful, this command returns a JSON output containing a new user/pass, which I want to store in vault (typically using the vault tf provider). There is no other way to identify the password except with this initial create command.

"null_resource" does not make its stdout available. I'm aware I could > the output to a file but this will put sensitive data into a text file. I have no intention of storing these credentials so this is out of the question.

data "external" runs on every execution, which would mean it would try to create the user on all executions, including plan executions.

Can anyone suggest another way of making the output of this command available to the rest of the terraform code?

Steve Stevens
  • 355
  • 4
  • 15

1 Answers1

0

I have decided to, from the null_resource execution, to push the secret directly into the secret store using the vault client

Steve Stevens
  • 355
  • 4
  • 15