This message was deleted.
# aws
s
This message was deleted.
m
How is cloudinit setup? userData?
a
Yes. As a snippet of the part that doesn't seem to work:
Copy code
write_files: [
{
        permissions: '0644',
        path: '/root/conf/storage-node.env',
        // this writes the .env file from what has been loaded
        content: Object.entries({ ...nodeConfig })
          .map(([key, value]) =>
            `${key.trim().replace(/[A-Z]/g, s => `_${s}`).toUpperCase()}=${value}`)
          .join('\n')
      }
{
        permissions: '0664',
        path: '/root/conf/haproxyconf/haproxy.cfg',
        content: haProxyCFG,
      }
]
Specifically the
storage-node.env
isn't getting updated.
m
Could this have anything to do with cloud-init boot stages and this not being a first boot? https://cloudinit.readthedocs.io/en/latest/topics/boot.html
You may be able to debug at runtime using the following advice https://stackoverflow.com/a/50911376
a
@millions-furniture-75402 thanks. Looks like it may well be the cloud-init boot stages thing. How do most people handle this problem with Pulimi?
m
It's not a Pulumi problem. It's a configuration management issue. You can: 1. Trick your EC2 into redeploying for another reason 2. Figure out how to get your userdata change to trigger cloud-init again 3. Use another configuration management tool, such as ansible or puppet