generated from opsd-io/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
46 lines (40 loc) · 1.46 KB
/
outputs.tf
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
output "region" {
description = "The region where the resources resides."
value = digitalocean_spaces_bucket.state.region
}
output "name" {
description = "The name of the bucket."
value = digitalocean_spaces_bucket.state.name
}
output "urn" {
description = "The uniform resource name of the bucket."
value = digitalocean_spaces_bucket.state.urn
}
output "endpoint" {
description = "The FQDN of the bucket without the bucket name."
value = digitalocean_spaces_bucket.state.endpoint
}
output "bucket_domain_name" {
description = "The FQDN of the bucket."
value = digitalocean_spaces_bucket.state.bucket_domain_name
}
output "backend_config" {
description = "The backend configuration, which can be saved to `backend.tf` file."
value = <<-EOF
terraform {
backend "s3" {
skip_region_validation = true # avoid "Invalid AWS Region" error
skip_credentials_validation = true # skips calling sts:GetCallerIdentity
skip_metadata_api_check = true # skips EC2 Metadata API
skip_requesting_account_id = true
skip_s3_checksum = true
region = "${digitalocean_spaces_bucket.state.region}"
endpoints = {
s3 = "https://${digitalocean_spaces_bucket.state.endpoint}"
}
bucket = "${digitalocean_spaces_bucket.state.name}"
# The `key` should be in `backend-config.tfvars` or set via `-backend-config` flag.
}
}
EOF
}