cloud-config

4ops/cloud-config/null

Terraform Module HCL NULL

Cloud config generator

Install
module "cloud-config" {
source = "4ops/cloud-config/null"
version = "1.0.2"
}
plain text: /constructs/tfmod-4ops-cloud-config-null/install.txt
⭐ Source on GitHub 📦 Registry page
README

Cloud config generator Simple template tool for creating cloud-config with Terraform Usage example Terraform code: ``terraform module cloud_config { source = "4ops/cloud-config/null" version = "1.0.2" groups = ["mygroup1", "mygroup2"] users = [{ name = "test", group = ["mygroup1", "mygroup2"] }] packages = ["nano", "sudo", "python3-pip"] package_upgrade = true final_message = "All done :)" } ` Result: `yaml #cloud-config groups: - mygroup1 - mygroup2 users: - name: test shell: /bin/bash groups: [ mygroup1, mygroup2 ] packages: - nano - sudo - python3-pip package_upgrade: true final_message: All done :) `` Also, see examples directory.

Inputs (15)
NameTypeDescriptionDefault
package_updateboolUpdate packages cache in Ubuntu required
package_reboot_if_requiredboolIf a package installation or upgrade requires a reboot, then a reboot can be per required
package_upgradeboolIf any packages are to be installed or an upgrade is to be performed then the pa required
runcmdlist(string)Runcmd contains a list of either lists or a string each item will be executed in[]
yum_reposanyAdd yum repository configuration to the system{}
template_filestringOverrides default path to cloud-config template file if non-empty""
default_useranySetup default user settings{}
keep_default_userboolAdd 'default' item before users listtrue
ntpanySetup ntp client settings{}
packageslist(string)A list of packages to install can be provided[]
final_messagestringCloud init completion message"Cloud-init boot finished at $TIMESTAMP.
groupsanyAdd groups to the system[]
usersanyAdd users to the system[]
bootcmdlist(string)Boot commands: This is very similar to runcmd, but commands run very early in th[]
write_filesanyThe content will be decoded accordingly and then written to the path that is pro[]
Outputs (8)
sha512sum — Hash sum of the content
template — Content of the template, used for rendering
content — Raw content of the cloud config in YAML format
base64 — Base64 encoded content of the cloud config
base64gzip — Base64 encoded + Gzipped content of the cloud config
md5sum — Hash sum of the content
sha1sum — Hash sum of the content
sha256sum — Hash sum of the content
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.2
Cloud NULL
★ Stars0
Forks1
Total downloads958
Inputs15
Outputs8
Examples1
LicenseMIT
Namespace4ops
Updated