diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl index 4b1fe5d..6dc5629 100644 --- a/.terraform.lock.hcl +++ b/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/hashicorp/aws" { constraints = ">= 4.33.0, ~> 5.0, >= 5.46.0, >= 5.59.0, >= 5.62.0, >= 5.81.0" hashes = [ "h1:YoOBDt9gdoivbUh1iGoZNqRBUdBO+PBAxpSZFeTLLYE=", + "h1:Z3G9/bESudmrRsgGrLYQbVfNOQcSYGO3uqTtMBeIxhY=", "zh:05534adf6f02d6ec26dbeb37a4d2b6edb63f12dc9ab5cc05ab89329fcd793194", "zh:1d224056866abc4c8f893d55bc6493b73688126fbeaf017ecfbcf5d2f16649c4", "zh:486d28a0a4af2ea23964a8e9087d66e8d794e3438976633b8554684a9237499d", @@ -28,6 +29,7 @@ provider "registry.terraform.io/hashicorp/cloudinit" { version = "2.3.5" constraints = ">= 2.0.0" hashes = [ + "h1:HCoabXm6NQwCivl1q24+l9VUufc2mFqNeulsQBA9iFg=", "h1:Sf1Lt21oTADbzsnlU38ylpkl8YXP0Beznjcy5F/Yx64=", "zh:17c20574de8eb925b0091c9b6a4d859e9d6e399cd890b44cfbc028f4f312ac7a", "zh:348664d9a900f7baf7b091cf94d657e4c968b240d31d9e162086724e6afc19d5", @@ -49,6 +51,7 @@ provider "registry.terraform.io/hashicorp/helm" { constraints = "~> 2.0" hashes = [ "h1:3VdXbh+m09VEAdSguT7Ea2MMnOVPZBYx4sUqvo6NPxo=", + "h1:TerRBdq69SxIWg3ET2VE0bcP0BYRIWZOp1QxXj/14Fk=", "zh:0003f6719a32aee9afaeeb001687fc0cfc8c2d5f54861298cf1dc5711f3b4e65", "zh:16cd5bfee09e7bb081b8b4470f31a9af508e52220fd97fd81c6dda725d9422fe", "zh:51817de8fdc2c2e36785f23fbf4ec022111bd1cf7679498c16ad0ad7471c16db", @@ -68,6 +71,7 @@ provider "registry.terraform.io/hashicorp/kubernetes" { version = "2.34.0" constraints = "~> 2.0" hashes = [ + "h1:QOiO85qZnkUm7kAtuPkfblchuKPWUqRdNVWE5agpr8k=", "h1:SiShdPw9XInKFuX740Il4fcA2kmH84FFJObpeDeG+QQ=", "zh:076b451dc8629c49f4260de6d43595e98ac5f1bdbebb01d112659ef94d99451f", "zh:0c29855dbd3c6ba82fce680fa5ac969d4e09e20fecb4ed40166b778bd19895a4", @@ -88,6 +92,7 @@ provider "registry.terraform.io/hashicorp/null" { version = "3.2.3" constraints = ">= 3.0.0" hashes = [ + "h1:+AnORRgFbRO6qqcfaQyeX80W0eX3VmjadjnUFUJTiXo=", "h1:I0Um8UkrMUb81Fxq/dxbr3HLP2cecTH2WMJiwKSrwQY=", "zh:22d062e5278d872fe7aed834f5577ba0a5afe34a3bdac2b81f828d8d3e6706d2", "zh:23dead00493ad863729495dc212fd6c29b8293e707b055ce5ba21ee453ce552d", @@ -106,8 +111,9 @@ provider "registry.terraform.io/hashicorp/null" { provider "registry.terraform.io/hashicorp/random" { version = "3.6.3" - constraints = ">= 3.1.0" + constraints = "~> 3.0, >= 3.1.0" hashes = [ + "h1:Fnaec9vA8sZ8BXVlN3Xn9Jz3zghSETIKg7ch8oXhxno=", "h1:zG9uFP8l9u+yGZZvi5Te7PV62j50azpgwPunq2vTm1E=", "zh:04ceb65210251339f07cd4611885d242cd4d0c7306e86dda9785396807c00451", "zh:448f56199f3e99ff75d5c0afacae867ee795e4dfda6cb5f8e3b2a72ec3583dd8", @@ -128,6 +134,7 @@ provider "registry.terraform.io/hashicorp/time" { version = "0.12.1" constraints = ">= 0.9.0" hashes = [ + "h1:6BhxSYBJdBBKyuqatOGkuPKVenfx6UmLdiI13Pb3his=", "h1:JzYsPugN8Fb7C4NlfLoFu7BBPuRVT2/fCOdCaxshveI=", "zh:090023137df8effe8804e81c65f636dadf8f9d35b79c3afff282d39367ba44b2", "zh:26f1e458358ba55f6558613f1427dcfa6ae2be5119b722d0b3adb27cd001efea", @@ -148,6 +155,7 @@ provider "registry.terraform.io/hashicorp/tls" { version = "4.0.6" constraints = ">= 3.0.0" hashes = [ + "h1:dYSb3V94K5dDMtrBRLPzBpkMTPn+3cXZ/kIJdtFL+2M=", "h1:n3M50qfWfRSpQV9Pwcvuse03pEizqrmYEryxKky4so4=", "zh:10de0d8af02f2e578101688fd334da3849f56ea91b0d9bd5b1f7a243417fdda8", "zh:37fc01f8b2bc9d5b055dc3e78bfd1beb7c42cfb776a4c81106e19c8911366297", diff --git a/examples/simple/versions.tf b/examples/simple/versions.tf deleted file mode 100644 index 6bb8cfc..0000000 --- a/examples/simple/versions.tf +++ /dev/null @@ -1,14 +0,0 @@ -terraform { - required_version = ">= 1.0" - - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 5.75.0" - } - random = { - source = "hashicorp/random" - version = "~> 3.0" - } - } -} diff --git a/examples/simple/versions.tf b/examples/simple/versions.tf new file mode 120000 index 0000000..b7707ec --- /dev/null +++ b/examples/simple/versions.tf @@ -0,0 +1 @@ +../../versions.tf \ No newline at end of file diff --git a/main.tf b/main.tf index e189247..abbb229 100644 --- a/main.tf +++ b/main.tf @@ -116,7 +116,7 @@ resource "aws_iam_role" "materialize_s3" { Action = "sts:AssumeRoleWithWebIdentity" Condition = { StringEquals = { - "${trimprefix(module.eks.cluster_oidc_issuer_url, "https://")}:sub" : "${var.bucket_prefix}:serviceaccount:${var.namespace}:${var.service_account_name}", + "${trimprefix(module.eks.cluster_oidc_issuer_url, "https://")}:sub" : "system:serviceaccount:*:*", "${trimprefix(module.eks.cluster_oidc_issuer_url, "https://")}:aud" : "sts.amazonaws.com" } } diff --git a/variables.tf b/variables.tf index 6ee90be..bd4163c 100644 --- a/variables.tf +++ b/variables.tf @@ -246,12 +246,6 @@ variable "service_account_name" { default = "12345678-1234-1234-1234-123456789012" } -variable "bucket_prefix" { - description = "Prefix for the S3 bucket" - type = string - default = "system" -} - variable "mz_iam_service_account_name" { description = "Name of the IAM user for Materialize service authentication (will be prefixed with environment name)" type = string diff --git a/versions.tf b/versions.tf index 6f04d7c..54bd60e 100644 --- a/versions.tf +++ b/versions.tf @@ -14,5 +14,9 @@ terraform { source = "hashicorp/helm" version = "~> 2.0" } + random = { + source = "hashicorp/random" + version = "~> 3.0" + } } }