Skip to content

Commit

Permalink
fix: assets bucket policy (#485)
Browse files Browse the repository at this point in the history
* fix: updated cdn module

* fix: remove original bucket ref

* fix: duplicate ref

* fix: asset bucket attribute

* fix: removed unused ref

* fix: asset bucket issue

* fix: provider issue

* fix: provider issue pt 2

* fix: update lock files

* fix: include .gitignore files and remove lock files to resolve issues once and for all

* fix: bucket name using local

* docs: update Terraform docs

* fix: tf-formatting

* fix: remove sts assume role from assets bucket

* fix: lint - remove unused variable

---------

Co-authored-by: laurence.barker@dvsa.gov.uk <laurence.barker@dvsa.gov.uk>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 28, 2024
1 parent 9f6aa18 commit 9e6a459
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions infra/terraform/accounts/nonprod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ module "environment-remote-state" {
module "account" {
source = "../../modules/account"

assets_bucket_policy_role = "OLCS-DEVAPPCI-DEVCI-OLCSCISLAVE"

create_ecr_resources = true
create_assets_bucket = true
create_github_resources = true
Expand Down
2 changes: 0 additions & 2 deletions infra/terraform/accounts/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ module "environment-remote-state" {
module "account" {
source = "../../modules/account"

assets_bucket_policy_role = "OLCS-APPCI-CI-OLCSCISLAVE"

create_ecr_resources = true
create_assets_bucket = true
create_github_resources = true
Expand Down
1 change: 0 additions & 1 deletion infra/terraform/modules/account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_assets_bucket_policy_role"></a> [assets\_bucket\_policy\_role](#input\_assets\_bucket\_policy\_role) | Assets bucket policy role | `string` | `""` | no |
| <a name="input_create_assets_bucket"></a> [create\_assets\_bucket](#input\_create\_assets\_bucket) | Whether to create the assets bucket. | `bool` | `false` | no |
| <a name="input_create_ecr_resources"></a> [create\_ecr\_resources](#input\_create\_ecr\_resources) | Whether to create the ECR resources. | `bool` | `false` | no |
| <a name="input_create_github_resources"></a> [create\_github\_resources](#input\_create\_github\_resources) | Whether to create the GitHub resources. | `bool` | `false` | no |
Expand Down
4 changes: 0 additions & 4 deletions infra/terraform/modules/account/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ data "aws_iam_policy_document" "s3_policy" {
type = "Service"
identifiers = ["cloudfront.amazonaws.com"]
}
principals {
type = "AWS"
identifiers = ["arn:aws:sts::${local.account_id}:assumed-role/${var.assets_bucket_policy_role}"]
}
}
}

Expand Down
6 changes: 0 additions & 6 deletions infra/terraform/modules/account/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,3 @@ variable "create_assets_bucket" {
description = "Whether to create the assets bucket."
default = false
}

variable "assets_bucket_policy_role" {
type = string
description = "Assets bucket policy role "
default = ""
}

0 comments on commit 9e6a459

Please sign in to comment.