terraform-ibm-modules / terraform-ibm-landing-zone

Creates a fully customizable VPC environment and compute resources (VSI, Red Hat OpenShift) with presets designed to meet strict compliance needs.
Apache License 2.0
8 stars 29 forks source link

Support `user_data` in Console UI #863

Open PatrickDuncan opened 2 months ago

PatrickDuncan commented 2 months ago

Description

https://cloud.ibm.com/docs/vpc?topic=vpc-user-data

When you create an IBM Cloud® Virtual Servers for Virtual Private Cloud instance, you can specify optional user data that automatically performs common configuration tasks or runs scripts. For more information about user data and usernames, see IAM access.

VPC uses Cloud-init technology to configure virtual server instances. The User Data field on the New virtual server for VPC page allows users to put in custom configuration options by using cloud-init. Cloud-init supports several formats for configuration data, including yaml in a cloud-config file.

user_data is integral VSI instance functionality and we need it to install software on the VSI during startup.

I see that user_data is definable using override_json_string, but I think its important enough to be a standalone variable.

Users must be able to input something like this in the Deployable Architecture - Configure > Optional panel.

#cloud-config
users:
  - name: demouser
    gecos: Demo User
    sudo: ALL=(ALL) NOPASSWD:ALL
    groups: users, admin
    ssh_import_id: None
    lock_passwd: true

New or affected modules


By submitting this issue, you agree to follow our Code of Conduct

Aashiq-J commented 1 day ago

https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone/pull/916