1
votes

I have a cloudformation template to deploy EKS and worker nodes along with several other resources like RDS, ES, etc.

I want to write a terraform template which does the same job as that of my cloudformation.

I am new to terraform and I got stuck with the userdata section of EKS worker nodes launch configuration.

The section in my cloudformation is:

  UserData:
    Fn::Base64:
      !Sub |
        #!/bin/bash
        set -o xtrace
        /etc/eks/bootstrap.sh ${AWS::StackName}-cluster
        /opt/aws/bin/cfn-signal --exit-code $? \
                 --stack  ${AWS::StackName} \
                 --resource SpotNodeGroup  \
                 --region ${AWS::Region}

I want to replicate the same in terraform and I am not sure what is the equivalent for "/opt/aws/bin/cfn-signal " in terraform.

Any idea what I could use instead ?

1
Thanks @Nathan for the reply. But can we use a provisioner inside "user_data" section ? I guess it is either provisioner or user_data, isn't it ? - kreddy

1 Answers

0
votes

Please refer Terraform document "https://learn.hashicorp.com/terraform/aws/eks-intro". This will give you more details about configurations.