VikramSingh178
commited on
Commit
•
5e29265
1
Parent(s):
c58035a
chore: Add variables.tf and .terraform to .gitignore
Browse filesFormer-commit-id: 9805d7893156f45e8b84557c2d7810874a6f9e5c
- .gitignore +3 -0
- iac/.terraform.lock.hcl +24 -0
- iac/project.tf +48 -0
- iac/terraform.tfstate +186 -0
- iac/terraform.tfstate.backup +9 -0
.gitignore
CHANGED
@@ -1,2 +1,5 @@
|
|
1 |
.venv
|
2 |
scripts/wandb
|
|
|
|
|
|
|
|
1 |
.venv
|
2 |
scripts/wandb
|
3 |
+
variables.tf
|
4 |
+
.terraform
|
5 |
+
|
iac/.terraform.lock.hcl
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This file is maintained automatically by "terraform init".
|
2 |
+
# Manual edits may be lost in future updates.
|
3 |
+
|
4 |
+
provider "registry.terraform.io/hashicorp/aws" {
|
5 |
+
version = "5.48.0"
|
6 |
+
hashes = [
|
7 |
+
"h1:rMyeKizkPgNuYQ1UQpWGDvGdJQs5vDPDlYtS4jVxxcI=",
|
8 |
+
"zh:0876d94be46be905d1f6c149461979cd6e9bec80d5ffad43fd6267fe7c3a924d",
|
9 |
+
"zh:3a853f887e6f61c2ba383c46e71bcec97ecd31d25a78dab08958f43bbbaecb86",
|
10 |
+
"zh:43235595e26dd131f00704b5b64a65c4e7c4984a559b30d4272170e1b78e99b7",
|
11 |
+
"zh:6866f7535ec2ef8fe6ed16eecee2e31418a2bd86cec73e1d18e47bd3bb87f68e",
|
12 |
+
"zh:756a4ed97f30ea6e8871c16446b24ce55601143a715e067b7f9ebdae8349da34",
|
13 |
+
"zh:793e8414962934be9805186874f207ca1dc8d162b6665e4938893ad827a545c6",
|
14 |
+
"zh:79b2f886507f21ff1b752ff140ed95ed551f389abf0c8177c7b5f5bbbd95da8e",
|
15 |
+
"zh:8653b1bc6f7e62404e02f940d962d0c2ba0c4dd4c28bd595945454cf348c2697",
|
16 |
+
"zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425",
|
17 |
+
"zh:9bd612f013c075685c129e5d0ec9243572cd51359599b7218459babe0e9b6ac7",
|
18 |
+
"zh:aabafe758ee8392f56d2c894017203de4dae38c1e3e0d274c54e194b9b8fccff",
|
19 |
+
"zh:aded7d6034115ca512b79ca17da65ebb8906e3b8def78dcbc0640142b0c05ca0",
|
20 |
+
"zh:ce383ee19b37666aba60db6b01cbe7a1fcbb40c6dd54d0cb36b2ba114ee5ae62",
|
21 |
+
"zh:ceaf1b998b9ced4b63f35da386358e4c7ad6def582438987c91bceffefb9e258",
|
22 |
+
"zh:d79225a9ae6a7391c33aa2d794bf9b167db66398c4f054f94d557615b051a40d",
|
23 |
+
]
|
24 |
+
}
|
iac/project.tf
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
provider "aws" {
|
2 |
+
region = "ap-south-1"
|
3 |
+
access_key = var.aws_access_key
|
4 |
+
secret_key = var.aws_secret_key
|
5 |
+
}
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
resource "aws_s3_bucket" "diffusion_model_bucket" {
|
12 |
+
bucket = "diffusion-model-bucket"
|
13 |
+
tags = {
|
14 |
+
Name = "Diffusion Model Bucket"
|
15 |
+
Task = "SDXL LORA"
|
16 |
+
Product = "Product Diffusion API"
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
20 |
+
|
21 |
+
resource "aws_s3_bucket_ownership_controls" "s3_bucket_acl_ownership" {
|
22 |
+
bucket = aws_s3_bucket.diffusion_model_bucket.id
|
23 |
+
rule {
|
24 |
+
object_ownership = "ObjectWriter"
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
resource "aws_s3_bucket_public_access_block" "s3_bucket_public_access_block" {
|
30 |
+
bucket = aws_s3_bucket.diffusion_model_bucket.id
|
31 |
+
block_public_acls = false
|
32 |
+
block_public_policy = false
|
33 |
+
ignore_public_acls = true
|
34 |
+
restrict_public_buckets = true
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
+
resource "aws_s3_bucket_acl" "acl_access" {
|
39 |
+
depends_on = [
|
40 |
+
aws_s3_bucket_ownership_controls.s3_bucket_acl_ownership,
|
41 |
+
aws_s3_bucket_public_access_block.s3_bucket_public_access_block,
|
42 |
+
]
|
43 |
+
|
44 |
+
bucket = aws_s3_bucket.diffusion_model_bucket.id
|
45 |
+
acl = "public-read"
|
46 |
+
}
|
47 |
+
|
48 |
+
|
iac/terraform.tfstate
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"version": 4,
|
3 |
+
"terraform_version": "1.8.2",
|
4 |
+
"serial": 19,
|
5 |
+
"lineage": "7f24f129-9566-aba8-5a57-55c73ab4a868",
|
6 |
+
"outputs": {},
|
7 |
+
"resources": [
|
8 |
+
{
|
9 |
+
"mode": "managed",
|
10 |
+
"type": "aws_s3_bucket",
|
11 |
+
"name": "diffusion_model_bucket",
|
12 |
+
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
13 |
+
"instances": [
|
14 |
+
{
|
15 |
+
"schema_version": 0,
|
16 |
+
"attributes": {
|
17 |
+
"acceleration_status": "",
|
18 |
+
"acl": null,
|
19 |
+
"arn": "arn:aws:s3:::diffusion-model-bucket",
|
20 |
+
"bucket": "diffusion-model-bucket",
|
21 |
+
"bucket_domain_name": "diffusion-model-bucket.s3.amazonaws.com",
|
22 |
+
"bucket_prefix": "",
|
23 |
+
"bucket_regional_domain_name": "diffusion-model-bucket.s3.ap-south-1.amazonaws.com",
|
24 |
+
"cors_rule": [],
|
25 |
+
"force_destroy": false,
|
26 |
+
"grant": [
|
27 |
+
{
|
28 |
+
"id": "ad7ce3402e9e4f4834521dfae4941257bbcec051b293bd2322daed9a2632f03a",
|
29 |
+
"permissions": [
|
30 |
+
"FULL_CONTROL"
|
31 |
+
],
|
32 |
+
"type": "CanonicalUser",
|
33 |
+
"uri": ""
|
34 |
+
}
|
35 |
+
],
|
36 |
+
"hosted_zone_id": "Z11RGJOFQNVJUP",
|
37 |
+
"id": "diffusion-model-bucket",
|
38 |
+
"lifecycle_rule": [],
|
39 |
+
"logging": [],
|
40 |
+
"object_lock_configuration": [],
|
41 |
+
"object_lock_enabled": false,
|
42 |
+
"policy": "",
|
43 |
+
"region": "ap-south-1",
|
44 |
+
"replication_configuration": [],
|
45 |
+
"request_payer": "BucketOwner",
|
46 |
+
"server_side_encryption_configuration": [
|
47 |
+
{
|
48 |
+
"rule": [
|
49 |
+
{
|
50 |
+
"apply_server_side_encryption_by_default": [
|
51 |
+
{
|
52 |
+
"kms_master_key_id": "",
|
53 |
+
"sse_algorithm": "AES256"
|
54 |
+
}
|
55 |
+
],
|
56 |
+
"bucket_key_enabled": false
|
57 |
+
}
|
58 |
+
]
|
59 |
+
}
|
60 |
+
],
|
61 |
+
"tags": {
|
62 |
+
"Name": "Diffusion Model Bucket",
|
63 |
+
"Product": "Product Diffusion API",
|
64 |
+
"Task": "SDXL LORA"
|
65 |
+
},
|
66 |
+
"tags_all": {
|
67 |
+
"Name": "Diffusion Model Bucket",
|
68 |
+
"Product": "Product Diffusion API",
|
69 |
+
"Task": "SDXL LORA"
|
70 |
+
},
|
71 |
+
"timeouts": null,
|
72 |
+
"versioning": [
|
73 |
+
{
|
74 |
+
"enabled": false,
|
75 |
+
"mfa_delete": false
|
76 |
+
}
|
77 |
+
],
|
78 |
+
"website": [],
|
79 |
+
"website_domain": null,
|
80 |
+
"website_endpoint": null
|
81 |
+
},
|
82 |
+
"sensitive_attributes": [],
|
83 |
+
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjM2MDAwMDAwMDAwMDAsInJlYWQiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19"
|
84 |
+
}
|
85 |
+
]
|
86 |
+
},
|
87 |
+
{
|
88 |
+
"mode": "managed",
|
89 |
+
"type": "aws_s3_bucket_acl",
|
90 |
+
"name": "acl_access",
|
91 |
+
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
92 |
+
"instances": [
|
93 |
+
{
|
94 |
+
"schema_version": 0,
|
95 |
+
"attributes": {
|
96 |
+
"access_control_policy": [
|
97 |
+
{
|
98 |
+
"grant": [
|
99 |
+
{
|
100 |
+
"grantee": [
|
101 |
+
{
|
102 |
+
"display_name": "",
|
103 |
+
"email_address": "",
|
104 |
+
"id": "ad7ce3402e9e4f4834521dfae4941257bbcec051b293bd2322daed9a2632f03a",
|
105 |
+
"type": "CanonicalUser",
|
106 |
+
"uri": ""
|
107 |
+
}
|
108 |
+
],
|
109 |
+
"permission": "FULL_CONTROL"
|
110 |
+
}
|
111 |
+
],
|
112 |
+
"owner": [
|
113 |
+
{
|
114 |
+
"display_name": "",
|
115 |
+
"id": "ad7ce3402e9e4f4834521dfae4941257bbcec051b293bd2322daed9a2632f03a"
|
116 |
+
}
|
117 |
+
]
|
118 |
+
}
|
119 |
+
],
|
120 |
+
"acl": "public-read",
|
121 |
+
"bucket": "diffusion-model-bucket",
|
122 |
+
"expected_bucket_owner": "",
|
123 |
+
"id": "diffusion-model-bucket,public-read"
|
124 |
+
},
|
125 |
+
"sensitive_attributes": [],
|
126 |
+
"private": "bnVsbA==",
|
127 |
+
"dependencies": [
|
128 |
+
"aws_s3_bucket.diffusion_model_bucket",
|
129 |
+
"aws_s3_bucket_ownership_controls.s3_bucket_acl_ownership",
|
130 |
+
"aws_s3_bucket_public_access_block.s3_bucket_public_access_block"
|
131 |
+
]
|
132 |
+
}
|
133 |
+
]
|
134 |
+
},
|
135 |
+
{
|
136 |
+
"mode": "managed",
|
137 |
+
"type": "aws_s3_bucket_ownership_controls",
|
138 |
+
"name": "s3_bucket_acl_ownership",
|
139 |
+
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
140 |
+
"instances": [
|
141 |
+
{
|
142 |
+
"schema_version": 0,
|
143 |
+
"attributes": {
|
144 |
+
"bucket": "diffusion-model-bucket",
|
145 |
+
"id": "diffusion-model-bucket",
|
146 |
+
"rule": [
|
147 |
+
{
|
148 |
+
"object_ownership": "ObjectWriter"
|
149 |
+
}
|
150 |
+
]
|
151 |
+
},
|
152 |
+
"sensitive_attributes": [],
|
153 |
+
"private": "bnVsbA==",
|
154 |
+
"dependencies": [
|
155 |
+
"aws_s3_bucket.diffusion_model_bucket"
|
156 |
+
]
|
157 |
+
}
|
158 |
+
]
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"mode": "managed",
|
162 |
+
"type": "aws_s3_bucket_public_access_block",
|
163 |
+
"name": "s3_bucket_public_access_block",
|
164 |
+
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
165 |
+
"instances": [
|
166 |
+
{
|
167 |
+
"schema_version": 0,
|
168 |
+
"attributes": {
|
169 |
+
"block_public_acls": false,
|
170 |
+
"block_public_policy": false,
|
171 |
+
"bucket": "diffusion-model-bucket",
|
172 |
+
"id": "diffusion-model-bucket",
|
173 |
+
"ignore_public_acls": true,
|
174 |
+
"restrict_public_buckets": true
|
175 |
+
},
|
176 |
+
"sensitive_attributes": [],
|
177 |
+
"private": "bnVsbA==",
|
178 |
+
"dependencies": [
|
179 |
+
"aws_s3_bucket.diffusion_model_bucket"
|
180 |
+
]
|
181 |
+
}
|
182 |
+
]
|
183 |
+
}
|
184 |
+
],
|
185 |
+
"check_results": null
|
186 |
+
}
|
iac/terraform.tfstate.backup
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"version": 4,
|
3 |
+
"terraform_version": "1.8.2",
|
4 |
+
"serial": 14,
|
5 |
+
"lineage": "7f24f129-9566-aba8-5a57-55c73ab4a868",
|
6 |
+
"outputs": {},
|
7 |
+
"resources": [],
|
8 |
+
"check_results": null
|
9 |
+
}
|