Skip to content

Commit

Permalink
Merge pull request #1416 from alphagov/remove-mirror-imports
Browse files Browse the repository at this point in the history
Remove imports from govuk mirror infra
  • Loading branch information
theseanything authored Aug 1, 2024
2 parents ed75f54 + 6f8b5a4 commit 6452df6
Showing 1 changed file with 0 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,6 @@ resource "aws_s3_bucket_lifecycle_configuration" "govuk_mirror" {
}
}

import {
to = aws_s3_bucket.govuk_mirror
id = "govuk-${var.govuk_environment}-mirror"
}

import {
to = aws_s3_bucket_versioning.govuk_mirror
id = "govuk-${var.govuk_environment}-mirror"
}

import {
to = aws_s3_bucket_logging.govuk_mirror
id = "govuk-${var.govuk_environment}-mirror"
}

import {
to = aws_s3_bucket_cors_configuration.govuk_mirror
id = "govuk-${var.govuk_environment}-mirror"
}

import {
to = aws_s3_bucket_lifecycle_configuration.govuk_mirror
id = "govuk-${var.govuk_environment}-mirror"
}

resource "aws_s3_bucket" "govuk_mirror_replica" {
bucket = "govuk-${var.govuk_environment}-mirror-replica"

Expand Down Expand Up @@ -116,26 +91,6 @@ resource "aws_s3_bucket_lifecycle_configuration" "govuk_mirror_replica" {
}
}

import {
to = aws_s3_bucket.govuk_mirror_replica
id = "govuk-${var.govuk_environment}-mirror-replica"
}

import {
to = aws_s3_bucket_versioning.govuk_mirror_replica
id = "govuk-${var.govuk_environment}-mirror-replica"
}

import {
to = aws_s3_bucket_logging.govuk_mirror_replica
id = "govuk-${var.govuk_environment}-mirror-replica"
}

import {
to = aws_s3_bucket_lifecycle_configuration.govuk_mirror_replica
id = "govuk-${var.govuk_environment}-mirror-replica"
}

data "aws_iam_policy_document" "s3_mirror_read_policy" {
statement {
sid = "S3FastlyReadBucket"
Expand Down Expand Up @@ -277,16 +232,6 @@ resource "aws_s3_bucket_policy" "govuk_mirror_replica_read_policy" {
policy = data.aws_iam_policy_document.s3_mirror_replica_read_policy.json
}

import {
to = aws_s3_bucket_policy.govuk_mirror_read_policy
id = "govuk-${var.govuk_environment}-mirror"
}

import {
to = aws_s3_bucket_policy.govuk_mirror_replica_read_policy
id = "govuk-${var.govuk_environment}-mirror-replica"
}

resource "aws_s3_bucket_replication_configuration" "govuk_mirror" {
provider = aws.replica
depends_on = [aws_s3_bucket_versioning.govuk_mirror]
Expand Down Expand Up @@ -373,16 +318,6 @@ resource "aws_iam_policy_attachment" "govuk_mirror_replication_policy_attachment
policy_arn = aws_iam_policy.govuk_mirror_replication_policy.arn
}

import {
to = aws_iam_role.govuk_mirror_replication_role
id = "govuk-mirror-replication-role"
}

import {
to = aws_iam_policy.govuk_mirror_replication_policy
id = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/govuk-${var.govuk_environment}-mirror-buckets-replication-policy"
}

data "aws_iam_policy_document" "google_replication" {
statement {
effect = "Allow"
Expand Down Expand Up @@ -447,11 +382,6 @@ resource "aws_iam_policy_attachment" "govuk_mirror_gcp_storage_transfer" {
policy_arn = aws_iam_policy.govuk_mirror_gcp_storage_transfer.arn
}

import {
to = aws_iam_policy.govuk_mirror_gcp_storage_transfer
id = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/govuk-${var.govuk_environment}-mirror-read-policy"
}

module "govuk_mirror_sync_iam_role" {
source = "terraform-aws-modules/iam/aws//modules/iam-eks-role"
version = "~> 5.28"
Expand Down

0 comments on commit 6452df6

Please sign in to comment.