Skip to content

Commit 18b3f52

Browse files
joli-sysVrtak-CZ
authored andcommitted
feat(workaround) - Leave OAI in module because OAI cannot be deleted
Issue: https://discuss.hashicorp.com/t/how-to-avoid-errors-when-migrating-from-cloudfront-oai-to-oac/46928
1 parent 2b65875 commit 18b3f52

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,27 +86,28 @@ module "static-site" {
8686
| Name | Version |
8787
|------|---------|
8888
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5, < 2.0 |
89-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
89+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.27 |
9090

9191
## Providers
9292

9393
| Name | Version |
9494
|------|---------|
95-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.0 |
95+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.27 |
9696

9797
## Modules
9898

9999
| Name | Source | Version |
100100
|------|--------|---------|
101101
| <a name="module_certificate"></a> [certificate](#module\_certificate) | terraform-aws-modules/acm/aws | 5.0.0 |
102102
| <a name="module_gitlab"></a> [gitlab](#module\_gitlab) | ./modules/gitlab | n/a |
103-
| <a name="module_s3_bucket"></a> [s3\_bucket](#module\_s3\_bucket) | terraform-aws-modules/s3-bucket/aws | 3.15.1 |
103+
| <a name="module_s3_bucket"></a> [s3\_bucket](#module\_s3\_bucket) | terraform-aws-modules/s3-bucket/aws | 4.1.2 |
104104

105105
## Resources
106106

107107
| Name | Type |
108108
|------|------|
109109
| [aws_cloudfront_distribution.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution) | resource |
110+
| [aws_cloudfront_origin_access_control.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_origin_access_control) | resource |
110111
| [aws_cloudfront_origin_access_identity.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_origin_access_identity) | resource |
111112
| [aws_iam_access_key.deploy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_access_key) | resource |
112113
| [aws_iam_user.deploy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_user) | resource |

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ resource "aws_cloudfront_origin_access_control" "this" {
3636
signing_protocol = "sigv4"
3737
}
3838

39+
resource "aws_cloudfront_origin_access_identity" "this" {
40+
comment = "Deprecated: Access from CF to S3 - ${local.main_domain} - Superseeded by OAC"
41+
}
42+
3943
data "aws_iam_policy_document" "bucket_policy" {
4044
statement {
4145
sid = "AllowCloudFrontServicePrincipalReadOnly"

0 commit comments

Comments
 (0)