diff --git a/config/deployer.sample.json b/config/deployer.sample.json index 9bd97b42f..5d8e8ac39 100644 --- a/config/deployer.sample.json +++ b/config/deployer.sample.json @@ -32,7 +32,8 @@ "RestoreTimeoutMinutes": 45, "ClusterTimeoutMinutes": 45, "ZoneAwarenessEnabled": false, - "ZoneAwarenessAZCount": 2 + "ZoneAwarenessAZCount": 2, + "EnableCloudwatchLogs": true }, "RedisSettings": { "Enabled": false, diff --git a/config/deployer.sample.toml b/config/deployer.sample.toml index 517675937..ab6031ab4 100644 --- a/config/deployer.sample.toml +++ b/config/deployer.sample.toml @@ -62,6 +62,7 @@ InstanceType = 'r6g.large.search' Version = 'Elasticsearch_7.10' ZoneAwarenessEnabled = false ZoneAwarenessAZCount = 2 +EnableCloudwatchLogs = true [ExternalBucketSettings] AmazonS3AccessKeyId = '' diff --git a/deployment/config.go b/deployment/config.go index 3995ab8be..5163e0b7d 100644 --- a/deployment/config.go +++ b/deployment/config.go @@ -334,6 +334,8 @@ type ElasticSearchSettings struct { ZoneAwarenessEnabled bool `default:"false"` // ZoneAwarenessAZCount indicates the number of availability zones to use for zone awareness. ZoneAwarenessAZCount int `default:"2" validate:"range:[1,3]"` + // EnableCloudwatchLogs indicates whether to enable Cloudwatch logs or not. + EnableCloudwatchLogs bool `default:"true"` } type RedisSettings struct { diff --git a/deployment/terraform/assets/bindata.go b/deployment/terraform/assets/bindata.go index b8e511047..1ad795240 100644 --- a/deployment/terraform/assets/bindata.go +++ b/deployment/terraform/assets/bindata.go @@ -6,7 +6,7 @@ // dashboard.yaml (231B) // datasource.yaml (415B) // default_dashboard_tmpl.json (99.385kB) -// elasticsearch.tf (3.927kB) +// elasticsearch.tf (4.221kB) // es_dashboard_data.json (16.697kB) // keycloak-database.sql (141B) // mattermost-realm.json (115.117kB) @@ -19,7 +19,7 @@ // provisioners/proxy.sh (2.167kB) // redis_dashboard_data.json (34.045kB) // saml-idp.crt (963B) -// variables.tf (2.825kB) +// variables.tf (2.867kB) package assets @@ -208,7 +208,7 @@ func default_dashboard_tmplJson() (*asset, error) { return a, nil } -var _elasticsearchTf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x57\x61\x6f\x13\x39\x13\xfe\x9e\x5f\x31\xda\x17\xf1\x42\xd5\x6c\xd3\xa2\x3b\xc4\x8a\x1c\x2a\x1c\x20\xa4\x96\x56\x14\xdd\x7d\xa8\x2a\xcb\xf1\x4e\x13\x53\xc7\x5e\x79\xbc\xc9\x05\x94\xff\x7e\xb2\xbd\xbb\x71\xd2\x4d\x54\xe9\xfa\x05\x76\x3c\x63\x3f\x7e\x3c\xf3\xcc\xc4\x22\x99\xda\x0a\x84\x8c\x2f\x89\x49\x3e\x67\x84\x76\x21\x05\x32\x25\xf5\x03\x96\xcc\x1a\x85\x19\x64\x48\x19\xfc\x1a\x00\x08\x53\x6b\x07\xc9\xdf\x18\x16\xdc\xe6\x48\x4c\x6a\x72\x5c\x0b\x64\xd1\xe5\x0f\x18\xc1\xf3\xe7\xed\xa2\xb0\xc8\x1d\x86\xcd\xe0\x1d\x9c\x42\x01\xa3\x01\x80\x3f\xb2\x3d\x4e\xf3\x39\xc2\xd8\x1f\x94\xf3\x39\xff\x69\x34\x5f\x52\x2e\xcc\x3c\x1b\xac\x07\x83\x92\x3b\xbe\x41\x58\x19\x25\xc5\x8a\x95\x46\xd4\x73\xd4\x2e\xa0\x63\x9c\xa8\x9e\x63\x03\xd7\x23\x25\xc7\x1d\xfa\xf5\xf0\x05\x80\xf7\xf7\x28\x9c\x3f\xe2\x5c\x29\xb3\xcc\x06\xc1\x5a\x59\xa9\x85\xac\xb8\xa2\xc6\x0d\xc0\xad\x2a\xdc\xdc\x2e\xbb\x89\x00\xb3\x66\x55\x96\xa8\x9d\xbc\x97\x68\x09\xc6\x70\xfb\x18\xef\x5d\x70\x5c\xc7\xed\xb9\x70\xd2\xe8\xe8\x49\x8e\x8a\xf3\x80\xf2\x9b\x07\xe9\xfd\xd6\xfe\x72\x8f\x9f\xa0\xe3\x3c\xb9\x4e\xe0\x67\xfb\x6f\x0c\xd9\xb3\x5f\x9e\x60\xa1\x6a\x72\x68\x03\x87\xeb\x21\xd2\x30\x84\x79\x82\x37\xa4\x34\xac\xc1\x18\x3c\x99\xf9\x1e\x2e\xf3\x6d\x26\xf3\x1f\x64\xf4\x13\x1f\xe0\x91\xf1\xc0\x23\x44\xf0\xcd\x3b\xa4\x3c\x41\x64\xea\x55\x71\x21\xc9\xbd\xaf\xc5\x03\xba\x86\xd0\x96\xa5\xc8\x25\xb7\xba\xe0\x4b\x2a\xe8\x55\x51\x14\x91\x04\x24\x46\x9a\x57\x34\x33\x8e\x59\xac\x0c\x49\x67\xec\x6a\xdd\xf0\xfc\x94\x84\xf0\xc6\xff\xc1\x75\xed\x80\xeb\x12\xfe\x44\x85\x0e\x81\x5b\x04\x8d\x58\x62\x09\xce\x80\xc5\xa9\xf4\x54\x83\x9b\x21\x6c\x4e\x01\x92\x5a\x60\x30\x0a\x25\xfd\x11\x75\xa5\x0c\x2f\x29\xec\xe4\x66\xa8\xa1\x0c\xdb\x11\x70\x70\x48\x0e\xcc\xe4\x87\x3f\xdc\x19\x40\x4d\xb5\x45\xc0\x05\xda\x95\x9b\x49\x3d\xfd\x3f\xc1\xd2\xd8\x07\xa9\xa7\xc0\x09\xf0\x9f\x0a\x85\xc3\xb2\x9f\xa6\xcf\xe8\xae\xc2\x4e\xd9\x31\xf8\xef\xeb\x7a\xfb\x3b\x5e\xa2\x31\xfd\x37\x22\x4f\x8e\x0e\xa5\x6c\x7c\xfd\x34\x13\xb6\xd2\x76\x7f\xaa\x36\xce\x03\x80\x27\x27\xe8\xae\xa9\x4d\xd2\xfe\x42\x6a\xdd\xb9\x73\x5c\xcc\x12\xc1\x08\xdf\x11\x65\xd0\xa5\xb6\xa8\xd2\xe0\xbc\xa9\xc1\xdc\xe3\xed\x30\x32\x6e\x75\xe2\x18\x8d\x1b\x64\x39\xb7\x01\xcf\xc9\x11\x5c\x5e\x0e\x7f\x7b\xf3\xea\xf4\xf7\x02\x3e\x19\x9f\x34\x92\xfc\x93\xfb\xe7\x3d\x0e\xd9\x72\xfe\xf7\x0d\x70\x11\x15\xd3\x67\x59\x58\x9e\xf1\x05\x02\x1f\x24\x6f\x35\x9c\x70\xc2\xb2\x65\x48\xc9\x87\x98\x6b\xf7\xc6\x27\xae\x4f\x14\xa3\xb1\xf0\x01\x8d\x86\x65\x37\x6d\xae\x67\x05\xdc\x36\xca\xd5\x09\x9c\x77\x38\x0f\x99\x94\xae\x06\xb3\x32\x53\xf2\x49\x74\x61\xa6\x1f\x17\xa8\x1d\xbd\xe7\x4e\xcc\xb2\xe3\xc3\x4e\x7d\xeb\x1f\x82\xe2\x5f\x98\xe9\x8d\xb3\xc8\xe7\xd9\xc6\xe3\x2e\xf1\xce\x3e\x86\x22\xcc\x8a\xb6\x08\xd3\xb5\xeb\x56\x9b\xb3\x22\xc5\x0e\x1b\x4d\x2e\xfa\xfa\x45\xe7\xb6\x4e\x37\xfb\xd6\x50\xe9\x63\xda\xa4\x0f\x40\x8f\xba\x88\xf5\x60\x0b\x5f\xf6\x17\x5a\x8a\x24\x65\x67\xa3\xd3\xb3\xe1\xe9\x68\x78\xfa\x3a\x78\xaf\x07\x47\x27\x3b\xe9\x26\x94\xa9\xcb\xa5\x67\x8b\x29\x33\x65\x53\x6b\xea\x2a\x26\x5a\xf2\xd9\x55\xc4\x9e\x7a\x50\x66\x3a\x8c\xae\x8f\xf3\xd9\x54\xa8\x09\xb9\x15\x33\x56\x9a\x39\x97\x3a\xee\xee\xfb\x27\xda\xb8\xb5\xe3\x53\x5f\xd5\x91\xab\xaf\x07\xce\xd9\xc4\xb5\xe2\x18\xb7\x64\x6d\x97\xd9\x1b\xe7\x03\x50\x4f\xa5\x46\xb6\x88\xf4\x6c\x26\x80\xc6\xe0\xb7\x5b\x54\x82\x99\x2a\x8a\x55\x84\x43\xf5\x44\xa3\x63\xb2\xa4\xa4\x7f\xbd\x50\xa8\xa7\x6e\xf6\x22\x3d\x69\xe3\x98\xa3\xe2\xe4\xa4\x88\xb7\x7e\xe9\x47\x8a\x97\xf0\x0e\x9c\x51\x92\xdc\x13\x63\x0a\xd0\xb5\x52\x11\x01\x8a\xda\x4a\xb7\x8a\x8f\x11\x90\x8c\xe1\x36\xce\x20\xe9\x4a\xbb\xc5\xed\xe8\x2e\x97\x65\xd7\x3e\x70\x42\x3b\x57\xf2\x16\xd4\x7c\xa2\xb0\x84\x31\x38\x5b\x63\x30\x2f\x8c\xf2\xfd\x33\x8c\x11\x91\x9b\x89\x32\xe2\x81\x95\x18\x06\x1d\x6f\x4f\xfd\x48\xfe\xec\xf5\xf3\x76\x62\x5b\xd7\x69\xa1\xb4\xd7\x16\x46\xdf\xcb\x69\x83\x66\x67\xfe\xda\x90\xdc\x3b\x9f\x6d\x87\xa4\x23\x4f\x5f\x48\x87\xf9\xa7\xd1\xc8\xf8\x92\x5b\xd4\x48\xe9\xed\x9b\x88\xfe\xf5\xbe\xd0\x2d\xec\x00\x7c\xc1\xa5\xe2\x13\xa9\xfc\x33\x04\xd7\x78\x8d\xc7\x3b\x87\xe8\x3d\xee\x83\xb6\x8c\x03\x4d\x5c\x08\xef\x1b\x54\x53\x86\x7e\xf7\xf6\xed\x87\xab\xaf\x9f\xbe\x7c\x1e\x6c\xc4\x70\x4f\x95\xb7\xd2\xd1\xaf\xa4\xdb\x62\xba\xa3\xa8\x19\x7a\x51\x39\xde\x5d\x4f\xd5\x2c\xeb\x59\x3f\xa0\x84\xfb\x15\x0c\xa9\x78\xf6\xab\xeb\x97\x7e\x3a\x31\x3a\x17\xb5\xb5\xbe\x2f\x86\x9a\x4d\xd7\x05\x57\x0a\x2d\x8b\x23\xac\x5b\x75\x8e\x4d\x07\x62\xb2\x5c\x17\x51\x08\x4e\xfa\xab\xff\xe4\x28\x91\xd7\x56\x2f\x21\x96\x08\x40\xc3\xad\x57\x13\xac\x50\x97\xc4\x82\x3a\x44\xd6\x0e\xfc\xbc\xc8\x91\xfc\x65\xef\x7c\xa4\x17\xcb\xaa\x9e\x28\x49\x7e\x14\xda\x29\xb8\x3e\x8d\x4d\x7a\x71\xdf\x72\x9e\x0a\x70\x68\xcc\x7e\x23\x6f\xd9\xce\xf9\x2e\xf5\xb3\x8f\x37\xec\xfc\xfa\xfa\xe2\xcb\x87\xf3\xef\x5f\xae\xbe\xb2\x8b\xab\xcf\x37\x9d\x4a\xf2\x72\xe1\xeb\xa1\xdc\x28\xc6\x8e\x22\x34\xf5\xb0\xe7\x6f\x0c\xf7\x5c\x51\xac\x24\xae\x8d\x5e\xcd\x4d\x4d\x8c\xd7\x6e\xc6\x76\x23\x13\x3d\x91\xda\xa1\xd5\x5c\xb1\x9a\xd0\x32\xff\x98\x7e\x1a\xe8\x53\x9e\x39\x0f\xaf\x15\xfc\xb6\x81\x6d\xaf\x75\xbf\x25\xc6\x90\xed\xda\xb3\x1e\xff\x8a\x13\x2d\x8d\xf5\x67\x65\x97\xbb\xf6\x91\x2d\xb3\xed\xba\x43\x2d\xec\xaa\x72\x8c\xfb\xf9\x91\xdc\x0e\x37\x1d\xde\xb4\xef\xa0\x2e\x2b\x23\xb5\x7b\xc4\xe7\xbd\xb1\x02\xd9\xcc\xb9\x8a\x1e\x33\xe3\x54\xa2\xdd\xdd\xf8\x98\x5d\x87\xff\x0d\x2f\xa5\x1e\x7e\xbf\xb8\x19\x9e\x0e\xcf\x86\x67\xa3\xd3\x37\xc3\xd1\xeb\xee\x21\xb5\x29\x91\x39\xc3\xc2\xbf\x0d\x5e\xdf\xcb\x0e\x41\xdd\x11\xa4\x9e\xdf\xbb\xed\x2f\xdb\xf5\xe0\xdf\x00\x00\x00\xff\xff\xf6\x56\xc0\x0c\x57\x0f\x00\x00") +var _elasticsearchTf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x58\x5f\x6f\x1b\x39\x0e\x7f\xf7\xa7\x20\xe6\x8a\x5e\x13\xc4\x13\x27\xc5\x5d\xd1\x41\x7d\x45\xda\x6b\x8b\x02\x49\x13\x34\xc5\xee\x43\x10\x08\xb2\x86\xb6\xd5\xc8\xd2\x40\xd4\xd8\xeb\x16\xfe\xee\x0b\x49\xf3\xcf\x93\x71\x10\x60\xfd\xb2\x3b\x14\x29\x52\x3f\x92\x3f\x32\xb5\x48\xa6\xb4\x02\x21\xe1\x1b\x62\x92\xaf\x18\xa1\x5d\x4b\x81\x4c\x49\xfd\x80\x39\xb3\x46\x61\x02\x09\x52\x02\xbf\x47\x00\xc2\x94\xda\x41\xe7\x37\x85\x35\xb7\x29\x12\x93\x9a\x1c\xd7\x02\x59\x54\xf9\x1f\x4c\xe0\xe5\xcb\xfa\x50\x58\xe4\x0e\xc3\x65\xf0\x1e\xce\x20\x83\xc9\x08\xc0\xbb\xac\xdd\x69\xbe\x42\x98\x7a\x47\x29\x5f\xf1\x5f\x46\xf3\x0d\xa5\xc2\xac\x92\xd1\x6e\x34\xca\xb9\xe3\x6d\x84\x85\x51\x52\x6c\x59\x6e\x44\xb9\x42\xed\x42\x74\x8c\x13\x95\x2b\xac\xc2\xf5\x91\x92\xe3\x0e\xfd\x79\xf8\x02\xc0\xf9\x1c\x85\xf3\x2e\x2e\x94\x32\x9b\x64\x14\xa4\x85\x95\x5a\xc8\x82\x2b\xaa\xd4\x00\xdc\xb6\xc0\xf6\x75\xc9\x6d\x0c\x30\xa9\x4e\x65\x8e\xda\xc9\xb9\x44\x4b\x30\x85\xbb\xc7\xf1\xde\x07\xc5\x5d\xbc\x9e\x0b\x27\x8d\x8e\x9a\xe4\x28\xbb\x08\x51\x7e\xf7\x41\x7a\xbd\x9d\x7f\xdc\xe3\x14\x34\x98\x77\x9e\x13\xf0\xd9\xff\x4d\x21\x79\xf1\xdb\x03\x2c\x54\x49\x0e\x6d\xc0\x70\x37\x46\x1a\x07\x33\x0f\x70\x0b\x4a\x85\x1a\x4c\xc1\x83\x99\x1e\xc0\x32\xdd\x47\x32\xfd\x49\x46\x3f\x33\x01\x8f\x84\x4f\x24\x21\x06\x5f\xe5\xa1\x8b\x13\x44\xa4\x5e\x67\x97\x92\xdc\x87\x52\x3c\xa0\xab\x00\xad\x51\x8a\x58\x72\xab\x33\xbe\xa1\x8c\x5e\x67\x59\x16\x41\x40\x62\xa4\x79\x41\x4b\xe3\x98\xc5\xc2\x90\x74\xc6\x6e\x77\x15\xce\xcf\x29\x08\x2f\xfc\x17\xdc\x94\x0e\xb8\xce\xe1\xff\xa8\xd0\x21\x70\x8b\xa0\x11\x73\xcc\xc1\x19\xb0\xb8\x90\x1e\x6a\x70\x4b\x84\xd6\x0b\x90\xd4\x02\x83\x50\x28\xe9\x5d\x94\x85\x32\x3c\xa7\x70\x93\x5b\xa2\x86\x3c\x5c\x47\xc0\xc1\x21\x39\x30\xb3\x9f\xde\xb9\x33\x80\x9a\x4a\x8b\x80\x6b\xb4\x5b\xb7\x94\x7a\xf1\x6f\x82\x8d\xb1\x0f\x52\x2f\x80\x13\xe0\x5f\x05\x0a\x87\xf9\x30\x4c\x5f\xd0\x5d\x87\x9b\x92\x13\xf0\xdf\x37\xe5\xfe\x77\x7c\x44\x25\xfa\x67\x40\x9e\x1e\x3f\x55\xb2\x31\xfb\xdd\x4a\xd8\x2b\xdb\xc3\xa5\x5a\x29\x8f\x00\x9e\x5d\xa0\x7d\x51\x5d\xa4\xc3\x8d\x54\xab\x73\xe7\xb8\x58\x76\x08\x23\x7c\xc7\x28\x03\x2f\xd5\x4d\xd5\x35\x4e\xab\x1e\x4c\x7d\xbc\x4d\x8c\x8c\x5b\xdd\x51\x8c\xc2\x36\xb2\x94\xdb\x10\xcf\xe9\x31\x5c\x5d\x8d\xff\xf3\xf6\xf5\xd9\x7f\x33\xf8\x6c\x7c\xd1\x48\xf2\x29\xf7\xe9\x3d\x09\xd5\x72\xf1\xe7\x2d\x70\x11\x19\xd3\x57\x59\x38\x5e\xf2\x35\x02\x1f\x75\x72\x35\x9e\x71\xc2\xbc\x46\x48\xc9\x87\x58\x6b\x73\xe3\x0b\xd7\x17\x8a\xd1\x98\x79\x83\x8a\xc3\x92\xdb\xba\xd6\x93\x0c\xee\x2a\xe6\x6a\x08\xce\x2b\x5c\x84\x4a\xea\x9e\x06\xb1\x32\x0b\xf2\x45\x74\x69\x16\x9f\xd6\xa8\x1d\x7d\xe0\x4e\x2c\x93\x93\xa7\x95\x86\xce\x3f\x06\xc6\xbf\x34\x8b\x5b\x67\x91\xaf\x92\x56\xe3\xbe\xa3\x9d\x7c\x0a\x4d\x98\x64\x75\x13\x76\xcf\x6e\x6a\x6e\x4e\xb2\x6e\xec\xd0\x72\x72\x36\x34\x2f\x1a\xb5\x5d\xf7\xb2\xef\x15\x94\xde\xa6\x2e\xfa\x10\xe8\x71\x63\xb1\x1b\xed\xc5\x97\xfc\x81\x96\x22\x48\xc9\xf9\xe4\xec\x7c\x7c\x36\x19\x9f\xbd\x09\xda\xbb\xd1\xf1\x69\xaf\xdc\x84\x32\x65\xbe\xf1\x68\x31\x65\x16\x6c\x61\x4d\x59\xc4\x42\xeb\x7c\xb6\x13\xb4\x19\x9b\xa8\xf9\x4c\x61\xcf\x9c\x3a\x43\xb2\x1e\x8c\x43\xfd\xa3\xcc\x62\x1c\xaf\xde\x27\x69\x2a\x67\x1a\x1d\x25\x90\x10\xaa\x40\x1f\xd1\xf7\x5c\x2a\x4f\x5e\x11\xcc\xb6\x35\xd7\x85\x18\xcb\x3c\xe2\xb0\xe6\xaa\x8c\xdc\xd0\x75\xb7\x2e\x04\x93\xf9\x81\xfe\x37\x05\x6a\x42\x6e\xc5\x92\xe5\x66\xc5\xa5\x8e\xef\xf6\x93\x1d\x6d\x74\xec\xf8\xc2\xdf\x19\x1d\x7f\x7b\xe2\x45\xad\x5d\x4d\xdb\xf1\x4a\x56\xcf\xbf\x83\x76\xde\x00\xf5\x42\x6a\x64\xeb\x98\xb8\x16\xe4\x4a\xe0\xaf\xf3\x2f\x31\x45\xa4\xd1\x18\x4e\x04\x8b\xc9\x9c\x3a\x93\xf5\x95\x42\xbd\x70\xcb\x57\x5d\x4f\xad\x62\x8a\x8a\x93\x93\x22\xbe\xfa\xc8\x2f\x3b\x47\xf0\x1e\x9c\x51\x92\xdc\x33\x6d\x32\xb8\x43\x15\x7a\xf4\x55\x65\xd7\xf0\x5e\x95\xbe\xb4\x4e\x5e\x2a\x73\x3a\x3a\x81\xc9\x51\x64\x70\x42\x51\x5a\xe9\xb6\xb1\xaa\x42\xe0\x53\xb8\x8b\xcb\x54\xf7\xa4\xf6\x78\x37\xb9\x4f\xeb\xe4\x79\x90\x66\xd4\x43\xc0\x4b\x62\x1d\xe6\x30\x05\x67\x4b\x8c\xa5\x60\x94\x5f\x04\xc2\x3e\x14\xa1\x9c\x29\x23\x1e\x58\x8e\x61\x63\xf3\xf2\xae\x1e\xc9\x5f\x83\x7a\x5e\x4e\x6c\xef\xf5\x75\x28\x35\x4a\xc2\xe8\xb9\x5c\x54\xd1\xf4\x16\xc9\x36\x27\x83\x8b\xe6\xbe\x49\x77\x77\x1b\x32\x69\x62\xfe\x65\x34\x32\xbe\xe1\x16\x35\x52\xf7\xf5\x95\xc5\xf0\xf9\x90\xe9\x5e\xec\x00\x7c\xcd\xa5\xe2\x33\xa9\x7c\x1a\x82\x6a\xaf\xe1\x1b\xf3\x60\x7d\x40\x7d\x54\xf3\x51\x80\x89\x0b\xe1\x75\x03\xfd\xcb\xd0\x9c\xef\xde\x7d\xbc\xfe\xf6\xf9\xeb\x97\x51\xcb\xea\x07\xe8\xaa\xe6\xc0\xe1\x91\xb0\x3f\x15\xa2\x62\x33\x1a\x12\xf4\xec\x78\xd2\x3f\xef\xd2\x72\x32\x70\xfe\x04\xa5\x1f\xa6\x62\xa4\xec\xc5\xef\xa6\x01\xfc\x9a\x65\x74\x2a\x4a\x6b\xfd\x80\x0f\x2d\xde\x3d\x17\x5c\x29\xb4\x2c\xee\xe2\x6e\xdb\x28\x56\xa3\x94\xc9\x7c\x97\x45\xde\x38\x1d\x26\x8b\xd3\xe3\xce\x9c\xa8\x89\x1f\x62\x8b\x00\x54\xd8\x7a\xf2\xc1\x02\x75\x4e\x2c\x90\x49\x44\xed\x89\xbf\x93\x52\x24\xff\xd8\xfb\x60\xb9\xd5\x7c\x25\x45\x98\x86\xac\x28\x67\x4a\x92\x5f\xee\xea\xce\x4b\x2a\xdc\xe7\xc6\x32\xe4\x62\xf9\x8c\x81\x70\xe7\x1b\xf3\xde\xf3\x46\xa4\x01\x61\xb4\x6b\xb7\x59\xdf\x4c\x8f\x27\x50\x67\x53\x19\x3a\x4e\xbb\xe3\x29\xac\x2d\xf1\x2a\x2f\xdb\x6f\xa5\xa6\xa3\x92\x4f\xb7\xec\xe2\xe6\xe6\xf2\xeb\xc7\x8b\x1f\x5f\xaf\xbf\xb1\xcb\xeb\x2f\xb7\x49\xaf\x5c\xf3\xb5\x6f\xb6\xbc\xa5\xa3\x1e\xdd\x54\xcd\x76\xe0\x37\x85\x39\x57\x14\xdb\x94\x6b\xa3\xb7\x2b\x53\x12\xe3\xa5\x5b\xb2\xbe\x65\x87\xac\xa4\x76\x68\x35\x57\xac\x24\xb4\xcc\x57\x8a\xdf\x99\x86\x68\x6d\xc5\x43\x29\x04\xbd\xfd\xc0\xf6\xcf\x9a\xbf\xb8\xa6\x90\xf4\xe5\xc9\x80\x7e\xc1\x89\x36\xc6\x7a\x5f\xc9\x55\x5f\x3e\xb1\x79\x0f\x25\xd4\xc2\x6e\x0b\xc7\xb8\xdf\xb2\xc9\xf5\xb0\x69\xe2\xed\xce\x40\xd4\x79\x61\xa4\x76\x8f\xf0\x9c\x1b\x2b\x90\x2d\x9d\x2b\xe8\x31\x32\x4e\x75\x06\x43\xb3\x64\x27\x37\xe1\xff\xc6\x57\x52\x8f\x7f\x5c\xde\x8e\xcf\xc6\xe7\xe3\xf3\xc9\xd9\xdb\xf1\xe4\x4d\x33\x7a\xb5\xc9\x91\x39\xc3\xc2\x7f\xab\x78\xfd\x5c\x7d\x2a\xd4\x1e\xdb\x0d\xfc\xab\x40\xbd\xda\xec\x46\x7f\x07\x00\x00\xff\xff\x41\x94\x49\x47\x7d\x10\x00\x00") func elasticsearchTfBytes() ([]byte, error) { return bindataRead( @@ -224,7 +224,7 @@ func elasticsearchTf() (*asset, error) { } info := bindataFileInfo{name: "elasticsearch.tf", size: 0, mode: os.FileMode(0644), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x65, 0x92, 0x2e, 0xe2, 0x39, 0x86, 0xfd, 0x3e, 0xbb, 0xf6, 0xfd, 0x86, 0x6a, 0x67, 0x2b, 0x8a, 0x1b, 0xb6, 0x5e, 0xdf, 0x42, 0x85, 0x5c, 0x6b, 0x3d, 0x1c, 0xf1, 0xf7, 0xcd, 0x71, 0x75, 0x85}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x87, 0xeb, 0xb5, 0x8, 0x28, 0xc0, 0x75, 0xb2, 0xfb, 0xb4, 0xfa, 0xcc, 0xd2, 0x12, 0xd, 0x43, 0xa4, 0x74, 0x20, 0xef, 0x92, 0xf1, 0x5, 0x49, 0x5d, 0x8f, 0xab, 0x70, 0x97, 0x12, 0x22, 0x37}} return a, nil } @@ -468,7 +468,7 @@ func samlIdpCrt() (*asset, error) { return a, nil } -var _variablesTf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\x4d\x73\xe3\x28\x10\xbd\xe7\x57\x50\xca\x25\x39\xac\xcb\xf9\xaa\xdd\x8b\x8f\x7b\xd9\xbd\x4c\xcd\x1f\xa0\x1a\xd4\x96\xb1\x11\x30\xdd\xc8\x8e\x33\x95\xff\x3e\x05\xb2\x3c\x72\x84\xed\xd4\x54\x7c\x72\xf1\x1e\x0f\x78\x34\xaf\xb5\x05\x32\xa0\x2c\x8a\x4a\xdb\x8e\x23\x92\x74\xd0\x62\x25\x7e\xde\xbc\xdf\xdc\x4c\xc1\x6d\xd0\xd2\xd4\x67\x61\xee\x94\xc3\x28\x4d\xcd\x89\x22\x44\xdc\x07\x14\x0b\xe1\xd5\x1a\x75\xbc\x4b\x23\x42\x40\x08\x62\x21\xac\xe1\x78\xc7\x91\x8c\x6b\xee\xf3\xf0\xda\xab\xd2\x70\x20\xff\xba\x2f\x01\xd0\xa0\x8b\x25\x00\x2d\x70\x34\x9a\x11\x48\xaf\x4a\x84\x16\x23\x19\xcd\x25\x68\x83\x7b\x6d\x3d\x6c\x4a\x58\x0d\x11\x14\x30\x96\x30\xc2\xda\x14\x04\xdf\xef\x4f\x6d\x82\x10\x24\xc4\x08\x7a\x25\x0d\xb4\x32\x90\x5f\x1a\x3b\x35\x3b\xd1\x8c\xe3\x08\x4e\xa3\xd4\xbe\x73\xf1\x32\x25\xb9\x3c\x65\x24\x7f\xae\xca\x9c\x92\x46\x42\xb7\xe2\xdf\x13\x1f\x87\x39\x3c\x9e\x8e\x7c\x6d\x81\x31\xa3\xb8\x4d\x64\xb9\x45\x62\xe3\x5d\x09\xd2\x84\x10\x51\x92\x2f\xb8\x84\x2c\xd9\x41\xe0\x95\x8f\x92\x30\x78\x36\xd1\xd3\xbe\x44\x7b\xf3\x0e\x25\xec\x80\xd0\x21\xb3\x44\x97\x90\x69\x11\x8f\x99\x99\x08\x5b\x30\x16\x94\xb1\x26\xee\x7b\x68\x7c\xc8\x5b\xf1\x2d\xd7\x26\x23\x6d\x91\xc6\x42\xb9\x66\x0b\xce\x1c\xdf\x83\xeb\x5a\x85\xd4\x8b\x7c\xcf\xa5\x53\xb4\x37\x57\xd5\xd9\xed\xf6\xa8\xf3\xf5\x19\x67\x7b\x3c\x00\x41\x2b\x1b\xf2\x5d\x28\xbf\xec\x61\x91\xc6\x38\x3c\x7b\x15\x1f\x4e\x54\x5c\xaf\x56\xd7\x8a\x61\xcc\xe8\x17\xbc\x2c\x62\x81\xb9\xc4\x18\xd2\xc6\xd4\xe8\xa2\x59\x1a\xa4\x12\x6b\x7a\xa4\xa3\xff\x2d\x84\x3b\x70\xfb\xf4\x44\x6b\x5c\x42\x67\x53\x90\xf4\xe9\x54\x41\x47\x9e\xe0\xaf\x76\xcf\x3f\x6c\x25\xf2\x6f\x21\xaa\x7f\x66\xf3\x59\x1e\x92\x3d\x3e\x7b\x9a\xcd\x5f\x66\x8f\xd5\xc9\x9c\xe0\x39\x36\x84\x79\xe2\x42\x54\x0f\xcf\xb3\xbf\x13\xe1\x7d\xb2\xb5\x8e\x91\x8a\x97\x51\x2b\x19\x80\x79\xe7\x69\x7a\xdf\xf9\x48\xe9\xaf\x0c\x48\x4b\x4f\x6d\x36\xc9\x38\x36\xcd\x2a\x16\x7d\xca\x77\x8f\x11\xe9\x34\x8d\x73\x48\x25\x0b\x0e\x41\xf5\x21\xa4\x98\x57\x32\x74\xca\x1a\x2d\x37\x38\x7d\x4f\x2d\xc4\x88\xd4\x7a\x8e\xd2\x1a\x8d\x8e\x51\x16\x43\x4c\x59\xaf\x37\xb2\xc6\xad\x19\x15\xcc\x61\x0f\xd9\xd3\x7e\xf5\x93\x2b\xa8\x9a\xf0\x54\x5d\x90\x61\xf3\x86\x2c\x73\x68\x7d\x54\x3b\x3c\xa9\xb1\xda\xc3\xfc\xaa\x54\xae\xeb\xaf\x91\x82\x10\xbe\x46\xe8\xd0\x9e\x3e\x21\xf6\x72\x5d\x6c\xed\xd5\xd7\x08\x9d\x74\xd5\x4f\x48\x3e\xce\xfb\x78\xfb\x7f\xe8\xa8\xbf\x13\xee\xe2\x3a\x43\x07\xfe\x03\x2f\x87\xa9\xe3\xc4\x3c\x16\xbd\xf2\xde\x9e\xa1\x5f\x8e\xb5\x23\x6d\x1a\x24\x67\xcb\xf8\xf1\x79\x36\x4f\xe1\x50\x16\xaa\x71\x8b\xd6\x87\x36\xb5\xde\xd6\xd7\x58\xdc\xe7\xad\xf8\xcf\xab\x43\x6f\x29\x7a\xb7\xf6\x4a\xf6\xf0\xb5\xd8\x2d\x31\x8b\x47\xe5\x27\xa9\x3a\xbd\xc1\x28\xeb\xae\x0d\xb2\x23\x53\xa2\xe0\x6b\x4c\xe9\x65\x07\x6e\x31\xc8\x60\xc7\xe7\x3f\x6f\x76\x2c\x09\x9b\x52\x9f\x49\x10\xb4\xd3\x65\x75\xc7\xd1\xb7\x32\x42\xc3\x93\x20\x1f\x3e\xb7\xa6\x42\x6f\xd3\xf0\xea\xdf\x56\xc9\x87\x5f\x01\x00\x00\xff\xff\x2f\x42\x35\xfb\x09\x0b\x00\x00") +var _variablesTf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\xcd\x6e\xf3\x36\x10\xbc\xe7\x29\x04\x7d\x97\xe4\x50\xc3\xf9\x43\x7b\xf1\xb1\x97\xf6\x52\xf4\x05\x88\x25\xb5\x96\x69\x53\x24\xbb\x4b\xd9\x71\x8a\xbc\x7b\x21\xca\x72\xe5\x68\x65\x07\x1f\xe2\xa3\x66\x38\x24\x67\x97\xb3\xde\x03\x59\xd0\x0e\x8b\xd2\xb8\x96\x13\x92\xf2\xd0\x60\x59\xfc\x7b\xf7\x71\x77\x37\x05\xf7\xd1\x28\x5b\xcd\xc2\xdc\x6a\x8f\x49\xd9\x8a\x3b\x4a\x51\xa4\x63\xc4\x62\x55\x04\xbd\x45\x93\xee\xbb\x2f\x45\x01\x31\x16\xab\xc2\x59\x4e\xf7\x9c\xc8\xfa\xfa\x21\x7f\xde\x06\x2d\x7d\x8e\x14\xde\x8e\x12\x00\x35\xfa\x24\x01\xe8\x80\x93\x35\x8c\x40\x66\x23\x11\x1a\x4c\x64\x0d\x4b\xd0\x0e\x8f\xc6\x05\xd8\x49\x58\x05\x09\x34\x30\x4a\x18\x61\x65\x05\xc1\x8f\x87\x4b\x9b\x20\x46\x05\x29\x81\xd9\x28\x0b\x8d\x8a\x14\xd6\xd6\x4d\xcd\xee\x68\xd6\x73\x02\x6f\x50\x99\xd0\xfa\x74\x9d\xd2\xb9\x3c\x65\x74\xfe\xdc\x94\xb9\x24\x8d\x84\x7e\x14\xbf\x5f\xf8\x38\xac\xe1\xf1\x72\xe4\x5b\x1b\x8c\x19\xe2\x31\x91\xd5\x1e\x89\x6d\xf0\x12\x64\x08\x21\xa1\xa2\x20\xb8\x84\xac\xd8\x43\xe4\x4d\x48\x8a\x30\x06\xb6\x29\xd0\x51\xa2\xbd\x07\x8f\x0a\x0e\x40\xe8\x91\x59\xa1\xef\x90\x69\x13\x8f\x99\x99\x08\x7b\xb0\x0e\xb4\x75\x36\x1d\x7b\x68\xf6\x92\xbd\xa6\x32\x2e\xb4\xd5\x01\x92\xd9\x28\x17\x6a\x3e\x7b\xf9\x57\xee\x62\x46\xda\x23\x8d\x57\xe6\xee\x16\x3c\x3c\xbf\x1c\xdf\x36\x1a\xa9\x17\xf9\x3b\x37\x99\x58\x88\xdc\x7f\xb3\x17\xeb\x51\x1f\xaa\x99\x1a\xf4\x78\x04\x82\x46\xd5\x14\xda\x28\x67\xc0\xb0\x49\x6d\x3d\xce\x16\xed\xd3\x8d\xc4\xfd\x2a\x7d\xab\x6d\xc6\x8c\x7e\xc3\xeb\x22\x0e\x98\x25\xc6\x90\x4b\xb6\x42\x9f\xec\xda\x22\x49\xac\xe9\x95\xce\xfe\x37\x10\xef\xc1\x1f\xbb\xc7\x5c\xe1\x1a\x5a\xd7\x45\x4e\x9f\x63\x25\xb4\x14\x08\x7e\x69\x8e\xfc\x8f\x2b\x8b\xfc\x5b\x15\xe5\x6f\x8b\xe5\x22\x7f\x52\x3d\xbe\x78\x5e\x2c\x5f\x17\x4f\xe5\xc5\x9a\x18\x38\xd5\x84\x79\xe1\xaa\x28\x1f\x5f\x16\xbf\x76\x84\x8f\xc9\xd1\x5a\x46\x12\x8b\x51\x69\x15\x81\xf9\x10\x68\x5a\xef\x7c\xa5\xdc\x8f\x11\x69\x1d\xa8\xc9\x26\x59\xcf\xb6\xde\x24\xd1\xa7\x5c\x7b\x4c\x48\x97\xb9\x9d\xe3\xac\xb3\xe0\x14\x69\x9f\xe2\x8c\x79\xa3\x62\xab\x9d\x35\x6a\x87\xd3\x97\xd7\x40\x4a\x48\x4d\xe0\xa4\x9c\x35\xe8\x19\x95\x18\x77\xda\x05\xb3\x53\x15\xee\xed\xa8\x61\x4e\x67\xc8\x9e\xf6\xbb\x5f\x94\xa0\xac\xe3\x73\x79\x45\x86\xed\x3b\xb2\xca\xf1\xf6\x59\xed\xf4\xa4\xc6\x6a\x8f\xcb\x9b\x52\xb9\xaf\xbf\x47\x0a\x62\xfc\x1e\xa1\xd3\x20\xfb\x82\xd8\xeb\x6d\xb1\x6d\xd0\xdf\x23\x74\x31\x7f\xbf\x20\xf9\xb4\xec\xe3\xed\xcf\x61\xf6\xfe\x9f\x70\x57\xf7\x19\x66\xf5\x4f\x78\x39\x2c\x1d\x27\xe6\xb9\xe9\x75\x08\x6e\x86\x7e\x3d\xd6\xce\xb4\x69\x90\xcc\xb6\xf1\xd3\xcb\x62\xd9\x85\x83\x2c\x54\xe1\x1e\x5d\x88\x4d\x37\xa4\x9b\x50\xa1\x78\xce\x1f\xc5\x1f\x41\x9f\x66\x8b\xe8\xdd\x36\x68\xd5\xc3\xb7\x62\x57\x62\x8a\x57\xe5\x67\xa5\x5b\xb3\xc3\xa4\xaa\xb6\x89\xaa\x25\x2b\x51\xf0\x2d\x75\xe9\xe5\x06\xae\x18\x64\x70\xe0\xf9\x3f\x42\x07\x56\x84\xb5\x34\x67\x3a\x08\x9a\xe9\xb6\xa6\xe5\x14\x1a\x95\xa0\xe6\x49\x90\x0f\x7f\xcc\xa6\x42\xef\xd3\xf0\xea\xdf\x96\xe4\xc3\x7f\x01\x00\x00\xff\xff\x1f\x0a\x30\xd3\x33\x0b\x00\x00") func variablesTfBytes() ([]byte, error) { return bindataRead( @@ -484,7 +484,7 @@ func variablesTf() (*asset, error) { } info := bindataFileInfo{name: "variables.tf", size: 0, mode: os.FileMode(0644), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa0, 0xc6, 0xe5, 0xfa, 0xda, 0xbe, 0xdb, 0xa5, 0xd3, 0x13, 0xa1, 0x18, 0x48, 0x66, 0xe9, 0xac, 0x1e, 0x4e, 0xb6, 0x13, 0x9c, 0x69, 0xc3, 0xbe, 0x57, 0xd4, 0x9d, 0xa1, 0x24, 0x66, 0xc, 0x2b}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf, 0x23, 0x2a, 0xd4, 0x4e, 0xd5, 0x99, 0xfe, 0x2, 0xe0, 0xd6, 0xac, 0x6, 0x61, 0x13, 0x65, 0xf5, 0x1, 0x22, 0x69, 0x88, 0x7e, 0x5e, 0x8c, 0xbc, 0xd7, 0x51, 0x6, 0x1, 0x25, 0x3f, 0x59}} return a, nil } diff --git a/deployment/terraform/assets/elasticsearch.tf b/deployment/terraform/assets/elasticsearch.tf index 064751551..701dcdf46 100644 --- a/deployment/terraform/assets/elasticsearch.tf +++ b/deployment/terraform/assets/elasticsearch.tf @@ -67,9 +67,17 @@ resource "aws_iam_role_policy_attachment" "es_attach" { } */ resource "aws_cloudwatch_log_group" "es_log_group" { + count = var.es_enable_cloudwatch_logs ? 1 : 0 name = "${var.cluster_name}-log-group" } +data "aws_subnets" "selected" { + filter { + name = "vpc-id" + values = [var.cluster_vpc_id] + } +} + resource "aws_opensearch_domain" "es_server" { tags = { Name = "${var.cluster_name}-es_server" @@ -79,7 +87,7 @@ resource "aws_opensearch_domain" "es_server" { engine_version = var.es_version vpc_options { - subnet_ids = (length(var.cluster_subnet_ids.elasticsearch) > 0) ? tolist(var.cluster_subnet_ids.elasticsearch) : null + subnet_ids = (length(var.cluster_subnet_ids.elasticsearch) > 0) ? tolist(var.cluster_subnet_ids.elasticsearch) : [element(tolist(data.aws_subnets.selected.ids), 0)] security_group_ids = [aws_security_group.elastic[0].id] } @@ -116,9 +124,12 @@ resource "aws_opensearch_domain" "es_server" { aws_iam_service_linked_role.es, ] - log_publishing_options { - cloudwatch_log_group_arn = aws_cloudwatch_log_group.es_log_group.arn - log_type = "ES_APPLICATION_LOGS" + dynamic "log_publishing_options" { + for_each = var.es_enable_cloudwatch_logs ? [true] : [] + content { + cloudwatch_log_group_arn = aws_cloudwatch_log_group.es_log_group.arn + log_type = "ES_APPLICATION_LOGS" + } } advanced_security_options { diff --git a/deployment/terraform/assets/variables.tf b/deployment/terraform/assets/variables.tf index 298824770..52a0d7294 100644 --- a/deployment/terraform/assets/variables.tf +++ b/deployment/terraform/assets/variables.tf @@ -56,6 +56,9 @@ variable "es_zone_awareness_enabled" { variable "es_zone_awarness_availability_zone_count" { } +variable "es_enable_cloudwatch_logs" { +} + # Proxy server variable "proxy_instance_count" { diff --git a/deployment/terraform/create.go b/deployment/terraform/create.go index ad88ccd54..f3807b7fe 100644 --- a/deployment/terraform/create.go +++ b/deployment/terraform/create.go @@ -181,14 +181,16 @@ func (t *Terraform) Create(extAgent *ssh.ExtAgent, initData bool) error { // policies: there can only be 10 such policies per region per account. // Check the docs for more information: // https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html - if err = t.checkCloudWatchLogsPolicy(); err != nil { - if err != ErrNotFound { - return fmt.Errorf("failed to check CloudWatchLogs policy: %w", err) - } + if t.config.ElasticSearchSettings.EnableCloudwatchLogs { + if err = t.checkCloudWatchLogsPolicy(); err != nil { + if err != ErrNotFound { + return fmt.Errorf("failed to check CloudWatchLogs policy: %w", err) + } - mlog.Info("No CloudWatchLogs policy found, creating a new one") - if err := t.createCloudWatchLogsPolicy(); err != nil { - return fmt.Errorf("failed creating CloudWatchLogs policy") + mlog.Info("No CloudWatchLogs policy found, creating a new one") + if err := t.createCloudWatchLogsPolicy(); err != nil { + return fmt.Errorf("failed creating CloudWatchLogs policy") + } } } diff --git a/deployment/terraform/utils.go b/deployment/terraform/utils.go index bdc31d672..bd4642473 100644 --- a/deployment/terraform/utils.go +++ b/deployment/terraform/utils.go @@ -261,6 +261,7 @@ func (t *Terraform) getParams() []string { "-var", fmt.Sprintf("es_snapshot_repository=%s", t.config.ElasticSearchSettings.SnapshotRepository), "-var", fmt.Sprintf("es_zone_awareness_enabled=%t", t.config.ElasticSearchSettings.ZoneAwarenessEnabled), "-var", fmt.Sprintf("es_zone_awarness_availability_zone_count=%d", t.config.ElasticSearchSettings.ZoneAwarenessAZCount), + "-var", fmt.Sprintf("es_enable_cloudwatch_logs=%t", t.config.ElasticSearchSettings.EnableCloudwatchLogs), "-var", fmt.Sprintf("proxy_instance_count=%d", t.config.ProxyInstanceCount), "-var", fmt.Sprintf("proxy_instance_type=%s", t.config.ProxyInstanceType), "-var", fmt.Sprintf("ssh_public_key=%s", t.config.SSHPublicKey), diff --git a/docs/config/deployer.md b/docs/config/deployer.md index 2098c93a3..11abbf8ba 100644 --- a/docs/config/deployer.md +++ b/docs/config/deployer.md @@ -211,6 +211,14 @@ The number of availability zones to use for the Elasticsearch cluster. This sett Check the [documentation](https://aws.amazon.com/blogs/big-data/increase-availability-for-amazon-opensearch-service-by-deploying-in-three-availability-zones/). +### EnableCloudwatchLogs + +*bool* (Default: `true`) + +Whether to enable Cloudwatch logs for the Elasticsearch cluster. + +Check the [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). + ## JobServerSettings ### InstanceCount