Skip to content

Commit

Permalink
test: add tfstates fixtures in minio buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Feb 8, 2022
1 parent 056ca94 commit b7a9ac8
Show file tree
Hide file tree
Showing 15 changed files with 1,145 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/.gitignore
@@ -1,3 +1,3 @@
data/*
!data/test-bucket
!data/test-bucket2
# Ignore minio config files
data/**/.minio.sys

194 changes: 194 additions & 0 deletions test/data/minio-1/test-bucket/terraform2_1.tfstate
@@ -0,0 +1,194 @@
{
"version": 4,
"terraform_version": "1.1.3",
"serial": 23,
"lineage": "b17194aa-6d00-151a-fe54-3b8fa4d56a4e",
"outputs": {
"eks_cluster_endpoint": {
"value": "https://8CE6E1354B399B0AF311DE0AF250616E.yl4.eu-west-3.eks.amazonaws.com",
"type": "string"
}
},
"resources": [
{
"mode": "managed",
"type": "aws_eks_cluster",
"name": "aws_eks",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:eks:eu-west-3:test:cluster/eks_cluster_voting_app",
"certificate_authority": [
{
"data": "=="
}
],
"created_at": "2022-02-08 17:27:04.711 +0000 UTC",
"enabled_cluster_log_types": null,
"encryption_config": [],
"endpoint": "https://test.eu-west-3.eks.amazonaws.com",
"id": "eks_cluster_app",
"identity": [
{
"oidc": [
{
"issuer": "https://oidc.eks.eu-west-3.amazonaws.com/id/test"
}
]
}
],
"kubernetes_network_config": [
{
"service_ipv4_cidr": "10.100.0.0/16"
}
],
"name": "eks_cluster_app",
"platform_version": "eks.4",
"role_arn": "arn:aws:iam:::role/eks-cluster",
"status": "ACTIVE",
"tags": {
"Name": "EKS_App"
},
"tags_all": {
"Name": "EKS_App"
},
"timeouts": null,
"version": "1.21",
"vpc_config": [
{
"cluster_security_group_id": "sg-01",
"endpoint_private_access": false,
"endpoint_public_access": true,
"public_access_cidrs": [
"0.0.0.0/0"
],
"security_group_ids": null,
"subnet_ids": [
"subnet-1",
"subnet-1"
],
"vpc_id": "vpc-1"
}
]
},
"sensitive_attributes": [],
"private": "",
"dependencies": [
"aws_iam_role.eks_cluster"
]
}
]
},
{
"mode": "managed",
"type": "aws_eks_node_group",
"name": "node",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"ami_type": "AL2_x86_64",
"arn": "arn:aws:eks:eu-west-3:01:nodegroup/eks_cluster_app/node-group-1/01",
"capacity_type": "ON_DEMAND",
"cluster_name": "eks_cluster_app",
"disk_size": 20,
"force_update_version": null,
"id": "eks_cluster_app:node-group-1",
"instance_types": [
"t3.medium"
],
"labels": null,
"launch_template": [],
"node_group_name": "node-group-1",
"node_group_name_prefix": "",
"node_role_arn": "arn:aws:iam::01:role/eks-node-group",
"release_version": "1.21.5-20220123",
"remote_access": [],
"resources": [
{
"autoscaling_groups": [
{
"name": "eks-node-group-1"
}
],
"remote_access_security_group_id": ""
}
],
"scaling_config": [
{
"desired_size": 1,
"max_size": 1,
"min_size": 1
}
],
"status": "ACTIVE",
"subnet_ids": [
"subnet-1",
"subnet-2"
],
"tags": null,
"tags_all": {},
"taint": [],
"timeouts": null,
"update_config": [
{
"max_unavailable": 1,
"max_unavailable_percentage": 0
}
],
"version": "1.21"
},
"sensitive_attributes": [],
"private": "",
"dependencies": [
"aws_eks_cluster.aws_eks",
"aws_iam_role.eks_cluster",
"aws_iam_role.eks_nodes",
"aws_iam_role_policy_attachment.AmazonEC2ContainerRegistryReadOnly",
"aws_iam_role_policy_attachment.AmazonEKSWorkerNodePolicy",
"aws_iam_role_policy_attachment.AmazonEKS_CNI_Policy"
]
}
]
},
{
"mode": "managed",
"type": "aws_iam_role",
"name": "eks_cluster",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:iam::01:role/eks-cluster",
"assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"eks.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
"create_date": "2022-02-08T17:27:00Z",
"description": "",
"force_detach_policies": false,
"id": "eks-cluster",
"inline_policy": [
{
"name": "",
"policy": ""
}
],
"managed_policy_arns": [],
"max_session_duration": 3600,
"name": "eks-cluster",
"name_prefix": "",
"path": "/",
"permissions_boundary": null,
"tags": null,
"tags_all": {},
"unique_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
"sensitive_attributes": [],
"private": ""
}
]
}
]
}
194 changes: 194 additions & 0 deletions test/data/minio-1/test-bucket/terraform_1.tfstate
@@ -0,0 +1,194 @@
{
"version": 4,
"terraform_version": "1.1.3",
"serial": 22,
"lineage": "a17194aa-6d00-151a-fe54-3b8fa4d56a4e",
"outputs": {
"eks_cluster_endpoint": {
"value": "https://8CE6E1354B399B0AF311DE0AF250616E.yl4.eu-west-3.eks.amazonaws.com",
"type": "string"
}
},
"resources": [
{
"mode": "managed",
"type": "aws_eks_cluster",
"name": "aws_eks",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:eks:eu-west-3:test:cluster/eks_cluster_voting_app",
"certificate_authority": [
{
"data": "=="
}
],
"created_at": "2022-02-08 17:27:04.711 +0000 UTC",
"enabled_cluster_log_types": null,
"encryption_config": [],
"endpoint": "https://test.eu-west-3.eks.amazonaws.com",
"id": "eks_cluster_app",
"identity": [
{
"oidc": [
{
"issuer": "https://oidc.eks.eu-west-3.amazonaws.com/id/test"
}
]
}
],
"kubernetes_network_config": [
{
"service_ipv4_cidr": "10.100.0.0/16"
}
],
"name": "eks_cluster_app",
"platform_version": "eks.4",
"role_arn": "arn:aws:iam:::role/eks-cluster",
"status": "ACTIVE",
"tags": {
"Name": "EKS_App"
},
"tags_all": {
"Name": "EKS_App"
},
"timeouts": null,
"version": "1.21",
"vpc_config": [
{
"cluster_security_group_id": "sg-01",
"endpoint_private_access": false,
"endpoint_public_access": true,
"public_access_cidrs": [
"0.0.0.0/0"
],
"security_group_ids": null,
"subnet_ids": [
"subnet-1",
"subnet-1"
],
"vpc_id": "vpc-1"
}
]
},
"sensitive_attributes": [],
"private": "",
"dependencies": [
"aws_iam_role.eks_cluster"
]
}
]
},
{
"mode": "managed",
"type": "aws_eks_node_group",
"name": "node",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"ami_type": "AL2_x86_64",
"arn": "arn:aws:eks:eu-west-3:01:nodegroup/eks_cluster_app/node-group-1/01",
"capacity_type": "ON_DEMAND",
"cluster_name": "eks_cluster_app",
"disk_size": 20,
"force_update_version": null,
"id": "eks_cluster_app:node-group-1",
"instance_types": [
"t3.medium"
],
"labels": null,
"launch_template": [],
"node_group_name": "node-group-1",
"node_group_name_prefix": "",
"node_role_arn": "arn:aws:iam::01:role/eks-node-group",
"release_version": "1.21.5-20220123",
"remote_access": [],
"resources": [
{
"autoscaling_groups": [
{
"name": "eks-node-group-1"
}
],
"remote_access_security_group_id": ""
}
],
"scaling_config": [
{
"desired_size": 1,
"max_size": 1,
"min_size": 1
}
],
"status": "ACTIVE",
"subnet_ids": [
"subnet-1",
"subnet-2"
],
"tags": null,
"tags_all": {},
"taint": [],
"timeouts": null,
"update_config": [
{
"max_unavailable": 1,
"max_unavailable_percentage": 0
}
],
"version": "1.21"
},
"sensitive_attributes": [],
"private": "",
"dependencies": [
"aws_eks_cluster.aws_eks",
"aws_iam_role.eks_cluster",
"aws_iam_role.eks_nodes",
"aws_iam_role_policy_attachment.AmazonEC2ContainerRegistryReadOnly",
"aws_iam_role_policy_attachment.AmazonEKSWorkerNodePolicy",
"aws_iam_role_policy_attachment.AmazonEKS_CNI_Policy"
]
}
]
},
{
"mode": "managed",
"type": "aws_iam_role",
"name": "eks_cluster",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:iam::01:role/eks-cluster",
"assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"eks.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
"create_date": "2022-02-08T17:27:00Z",
"description": "",
"force_detach_policies": false,
"id": "eks-cluster",
"inline_policy": [
{
"name": "",
"policy": ""
}
],
"managed_policy_arns": [],
"max_session_duration": 3600,
"name": "eks-cluster",
"name_prefix": "",
"path": "/",
"permissions_boundary": null,
"tags": null,
"tags_all": {},
"unique_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
"sensitive_attributes": [],
"private": ""
}
]
}
]
}

0 comments on commit b7a9ac8

Please sign in to comment.