Difference between revisions of "Terraform resource: aws s3 bucket website configuration"

From wikieduonline
Jump to navigation Jump to search
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{lc}}
+
* <code>[[aws_s3_bucket_website_configuration]]</code> https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration
* https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration
 
  
 +
* [[Terraform module]]:<code>[[Terraform module: s3-bucket|s3-bucket]]</code>
  
== Example ==
+
 
 +
[[redirect_all_requests_to]]
 +
 
 +
== Official example ==
 
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration
 
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration
<pre>
 
resource "aws_s3_bucket_website_configuration" "example" {
 
  bucket = aws_s3_bucket.example.bucket
 
  
  index_document {
+
resource "aws_s3_bucket_website_configuration" "example" {
    suffix = "index.html"
+
  bucket = aws_s3_bucket.example.bucket
  }
+
 +
  index_document {
 +
    suffix = "[[index.html]]"
 +
  }
 +
 +
  error_document {
 +
    key = "error.html"
 +
  }
 +
 +
  routing_rule {
 +
    condition {
 +
      key_prefix_equals = "docs/"
 +
    }
 +
    redirect {
 +
      replace_key_prefix_with = "documents/"
 +
    }
 +
  }
 +
}
  
  error_document {
+
Terraform-kubernetes-django example:
    key = "error.html"
+
* https://github.com/djangoflow/terraform-kubernetes-django/blob/main/modules/aws/storage.tf
  }
 
  
  routing_rule {
+
== Attributes output reference ==
    condition {
+
* <code>[[website_endpoint]]</code>
      key_prefix_equals = "docs/"
+
* <code>[[website_domain]]: [[s3-website-eu-west-1]].[[amazonaws.com]]</code>
    }
 
    redirect {
 
      replace_key_prefix_with = "documents/"
 
    }
 
  }
 
}
 
</pre>
 
  
 
== Related ==
 
== Related ==
 
* [[Cloudflare]]
 
* [[Cloudflare]]
[[count.index]]
+
* <code>[[count.index]]</code>
 +
* [[AWS website endpoint]]
 +
* <code>[[aws_s3_bucket_cors_configuration]]</code>
 +
* [[aws_s3_bucket]]
  
 
== See also ==
 
== See also ==
* {{S3}}
+
* {{tf s3}}
  
 
[[Category:AWS]]
 
[[Category:AWS]]

Latest revision as of 11:49, 8 March 2024

Advertising: