Remove unused code in dogfood (#10249)
```╷
│ Warning: Argument is deprecated
│
│ with aws_s3_bucket.osquery-results,
│ on firehose.tf line 7, in resource "aws_s3_bucket" "osquery-results":
│ 7: resource "aws_s3_bucket" "osquery-results" { #tfsec:ignore:aws-s3-encryption-customer-key:exp:2022-07-01 #tfsec:ignore:aws-s3-enable-versioning #tfsec:ignore:aws-s3-enable-bucket-logging:exp:2022-06-15
│
│ Use the aws_s3_bucket_lifecycle_configuration resource instead
│
│ (and 9 more similar warnings elsewhere)
╵
Success! The configuration is valid, but there were some validation warnings as shown above.
```
This commit is contained in:
+14
-15
@@ -61,21 +61,20 @@ provider "registry.terraform.io/hashicorp/random" {
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/tls" {
|
||||
version = "3.3.0"
|
||||
constraints = "3.3.0"
|
||||
version = "4.0.4"
|
||||
hashes = [
|
||||
"h1:xx/b39Q9FVZSlDc97rlDmQ9dNaaxFFyVzP9kV+47z28=",
|
||||
"zh:16140e8cc880f95b642b6bf6564f4e98760e9991864aacc8e21273423571e561",
|
||||
"zh:16338b8457759c97fdd73153965d6063b037f2954fd512e569fcdc42b7fef743",
|
||||
"zh:348bd44b7cd0c6d663bba36cecb474c17635a8f22b02187d034b8e57a8729c5a",
|
||||
"zh:3832ac73c2335c0fac26138bacbd18160efaa3f06c562869acc129e814e27f86",
|
||||
"zh:756d1e60690d0164eee9c93b498b4c8beabbfc1d8b7346cb6d2fa719055089d6",
|
||||
"zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3",
|
||||
"zh:93b911bcddba8dadc5339edb004c8019c230ea67477c73c4f741c236dd9511b1",
|
||||
"zh:c0c4e5742e8ac004c507540423db52af3f44b8ec04443aa8e14669340819344f",
|
||||
"zh:c78296a1dff8ccd5d50203aac353422fc18d425072ba947c88cf5b46de7d32d2",
|
||||
"zh:d7143f444e0f7e6cd67fcaf080398b4f1487cf05de3e0e79af6c14e22812e38b",
|
||||
"zh:e600ac76b118816ad72132eee4c22ab5fc044f67c3babc54537e1fc1ad53d295",
|
||||
"zh:fca07af5f591e12d2dc178a550da69a4847bdb34f8180a5b8e04fde6b528cf99",
|
||||
"h1:pe9vq86dZZKCm+8k1RhzARwENslF3SXb9ErHbQfgjXU=",
|
||||
"zh:23671ed83e1fcf79745534841e10291bbf34046b27d6e68a5d0aab77206f4a55",
|
||||
"zh:45292421211ffd9e8e3eb3655677700e3c5047f71d8f7650d2ce30242335f848",
|
||||
"zh:59fedb519f4433c0fdb1d58b27c210b27415fddd0cd73c5312530b4309c088be",
|
||||
"zh:5a8eec2409a9ff7cd0758a9d818c74bcba92a240e6c5e54b99df68fff312bbd5",
|
||||
"zh:5e6a4b39f3171f53292ab88058a59e64825f2b842760a4869e64dc1dc093d1fe",
|
||||
"zh:810547d0bf9311d21c81cc306126d3547e7bd3f194fc295836acf164b9f8424e",
|
||||
"zh:824a5f3617624243bed0259d7dd37d76017097dc3193dac669be342b90b2ab48",
|
||||
"zh:9361ccc7048be5dcbc2fafe2d8216939765b3160bd52734f7a9fd917a39ecbd8",
|
||||
"zh:aa02ea625aaf672e649296bce7580f62d724268189fe9ad7c1b36bb0fa12fa60",
|
||||
"zh:c71b4cd40d6ec7815dfeefd57d88bc592c0c42f5e5858dcc88245d371b4b8b1e",
|
||||
"zh:dabcd52f36b43d250a3d71ad7abfa07b5622c69068d989e60b79b2bb4f220316",
|
||||
"zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
data "tls_certificate" "github" {
|
||||
url = "https://token.actions.githubusercontent.com/.well-known/openid-configuration"
|
||||
}
|
||||
|
||||
/*
|
||||
It's possible to use the following to add Github as an OpenID Connect Provider and integrate
|
||||
Github Actions as your CI/CD mechanism.
|
||||
*/
|
||||
|
||||
#resource "aws_iam_openid_connect_provider" "github" {
|
||||
# url = "https://token.actions.githubusercontent.com"
|
||||
#
|
||||
# client_id_list = [
|
||||
# "sts.amazonaws.com",
|
||||
# ]
|
||||
#
|
||||
#
|
||||
# thumbprint_list = [
|
||||
# data.tls_certificate.github.certificates[0].sha1_fingerprint
|
||||
# ]
|
||||
#}
|
||||
#
|
||||
#resource "aws_iam_role" "gha_role" {
|
||||
# name = "github-actions-role"
|
||||
# assume_role_policy = data.aws_iam_policy_document.gha_assume_role.json
|
||||
#}
|
||||
#
|
||||
#resource "aws_iam_role_policy" "gha_role_policy" {
|
||||
# policy = data.aws_iam_policy_document.gha-permissions.json
|
||||
# role = aws_iam_role.gha_role.id
|
||||
#}
|
||||
|
||||
|
||||
#####################
|
||||
# AssumeRole
|
||||
#
|
||||
# Allow sts:AssumeRoleWithWebIdentity from GitHub via OIDC
|
||||
# Customize your repository
|
||||
#####################
|
||||
data "aws_iam_policy_document" "gha_assume_role" {
|
||||
statement {
|
||||
effect = "Allow"
|
||||
actions = ["sts:AssumeRoleWithWebIdentity"]
|
||||
principals {
|
||||
type = "Federated"
|
||||
identifiers = [
|
||||
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:oidc-provider/token.actions.githubusercontent.com"
|
||||
]
|
||||
}
|
||||
condition {
|
||||
test = "StringLike"
|
||||
variable = "token.actions.githubusercontent.com:sub"
|
||||
values = ["repo:fleetdm/fleet:*"]
|
||||
}
|
||||
|
||||
condition {
|
||||
test = "StringEquals"
|
||||
variable = "token.actions.githubusercontent.com:aud"
|
||||
values = ["sts.amazonaws.com"]
|
||||
}
|
||||
}
|
||||
}
|
||||
// Customize the permissions for your deployment
|
||||
#data "aws_iam_policy_document" "gha-permissions" {
|
||||
# statement {
|
||||
# effect = "Allow"
|
||||
# actions = [
|
||||
# "ec2:*",
|
||||
# "cloudwatch:*",
|
||||
# "s3:*",
|
||||
# "lambda:*",
|
||||
# "ecs:*",
|
||||
# "rds:*",
|
||||
# "rds-data:*",
|
||||
# "secretsmanager:*",
|
||||
# "pi:*",
|
||||
# "ecr:*",
|
||||
# "iam:*",
|
||||
# "aps:*",
|
||||
# "vpc:*",
|
||||
# "kms:*",
|
||||
# "elasticloadbalancing:*",
|
||||
# "ce:*",
|
||||
# "cur:*",
|
||||
# "logs:*",
|
||||
# "cloudformation:*",
|
||||
# "ssm:*",
|
||||
# "sns:*",
|
||||
# "elasticache:*",
|
||||
# "application-autoscaling:*",
|
||||
# "acm:*",
|
||||
# "route53:*",
|
||||
# "dynamodb:*",
|
||||
# "kinesis:*",
|
||||
# "firehose:*"
|
||||
# ]
|
||||
# resources = ["*"]
|
||||
# }
|
||||
#}
|
||||
@@ -2,12 +2,6 @@ provider "aws" {
|
||||
region = var.region
|
||||
}
|
||||
|
||||
|
||||
provider "tls" {
|
||||
# Configuration options
|
||||
}
|
||||
|
||||
|
||||
terraform {
|
||||
// these values should match what is bootstrapped in ./remote-state
|
||||
backend "s3" {
|
||||
@@ -21,11 +15,6 @@ terraform {
|
||||
source = "hashicorp/aws"
|
||||
version = "4.32.0"
|
||||
}
|
||||
|
||||
tls = {
|
||||
source = "hashicorp/tls"
|
||||
version = "3.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user