-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrite_files.tf
More file actions
49 lines (44 loc) · 1023 Bytes
/
Copy pathwrite_files.tf
File metadata and controls
49 lines (44 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
write_files {
encoding = "b64"
content = "CiMgVGhpcyBmaWxlIGNvbnRyb2xzIHRoZSBzdGF0ZSBvZiBTRUxpbnV4..."
owner = "root:root"
path = "/etc/sysconfig/selinux"
permissions = "'0644'"
}
write_files {
content = <<EOT
15 * * * * root ship_logs
EOT
path = "/etc/crontab"
append = true
}
write_files {
encoding = "gzip"
content = "bin__H4sIAIDb/U8C/1NW1E/KzNMvzuBKTc7IV8hIzcnJVyjPL8pJ4QIA6N+MVxsAAAA="
path = "/usr/bin/hello"
permissions = "'0755'"
}
write_files {
path = "/root/CLOUD_INIT_WAS_HERE"
}
write_files {
path = "/etc/nginx/conf.d/example.com.conf"
content = <<EOT
server {
server_name example.com;
listen 80;
root /var/www;
location / {
try_files $uri $uri/ $uri.html =404;
}
}
EOT
owner = "nginx:nginx"
permissions = "'0640'"
defer = true
}
write_files {
local_file = "tests/test_file.txt"
path = "/tmp/write_files.tf"
encoding = "gz+b64"
}