Skip to content

Commit f1a49e6

Browse files
authored
fix(docs): fix indentation in s3 guide (#1062)
1 parent 25134e8 commit f1a49e6

File tree

2 files changed

+134
-134
lines changed

2 files changed

+134
-134
lines changed

docs/guides/aws_provider_s3_stackit.md

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,87 @@ page_title: "Using AWS Provider for STACKIT Object Storage (S3 compatible)"
55

66
## Overview
77

8-
This guide outlines the process of utilizing the [AWS Terraform Provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) alongside the STACKIT provider to create and manage STACKIT Object Storage (S3 compatible) ressources.
8+
This guide outlines the process of utilizing the [AWS Terraform Provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) alongside the STACKIT provider to create and manage STACKIT Object Storage (S3 compatible) resources.
99

1010
## Steps
1111

1212
1. **Configure STACKIT Provider**
1313

14-
First, configure the STACKIT provider to connect to the STACKIT services.
14+
First, configure the STACKIT provider to connect to the STACKIT services.
1515

16-
```hcl
17-
provider "stackit" {
18-
default_region = "eu01"
19-
}
20-
```
16+
```hcl
17+
provider "stackit" {
18+
default_region = "eu01"
19+
}
20+
```
2121

2222
2. **Define STACKIT Object Storage Bucket**
2323

24-
Create a STACKIT Object Storage Bucket and obtain credentials for the AWS provider.
24+
Create a STACKIT Object Storage Bucket and obtain credentials for the AWS provider.
2525

26-
```hcl
27-
resource "stackit_objectstorage_bucket" "example" {
28-
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
29-
name = "example"
30-
}
26+
```hcl
27+
resource "stackit_objectstorage_bucket" "example" {
28+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
29+
name = "example"
30+
}
3131
32-
resource "stackit_objectstorage_credentials_group" "example" {
33-
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
34-
name = "example-credentials-group"
35-
}
32+
resource "stackit_objectstorage_credentials_group" "example" {
33+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
34+
name = "example-credentials-group"
35+
}
3636
37-
resource "stackit_objectstorage_credential" "example" {
38-
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
39-
credentials_group_id = stackit_objectstorage_credentials_group.example.credentials_group_id
40-
expiration_timestamp = "2027-01-02T03:04:05Z"
41-
}
42-
```
37+
resource "stackit_objectstorage_credential" "example" {
38+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
39+
credentials_group_id = stackit_objectstorage_credentials_group.example.credentials_group_id
40+
expiration_timestamp = "2027-01-02T03:04:05Z"
41+
}
42+
```
4343

4444
3. **Configure AWS Provider**
4545

46-
Configure the AWS Provider to connect to the STACKIT Object Storage bucket.
47-
48-
```hcl
49-
provider "aws" {
50-
region = "eu01"
51-
skip_credentials_validation = true
52-
skip_region_validation = true
53-
skip_requesting_account_id = true
54-
55-
access_key = stackit_objectstorage_credential.example.access_key
56-
secret_key = stackit_objectstorage_credential.example.secret_access_key
57-
58-
endpoints {
59-
s3 = "https://object.storage.eu01.onstackit.cloud"
60-
}
61-
}
62-
```
63-
64-
4. **Use the provider to manage objects or policies**
65-
66-
```hcl
67-
resource "aws_s3_object" "test_file" {
68-
bucket = stackit_objectstorage_bucket.example.name
69-
key = "hello_world.txt"
70-
source = "files/hello_world.txt"
71-
content_type = "text/plain"
72-
etag = filemd5("files/hello_world.txt")
73-
}
74-
75-
resource "aws_s3_bucket_policy" "allow_public_read_access" {
76-
bucket = stackit_objectstorage_bucket.test20.name
77-
policy = <<EOF
46+
Configure the AWS provider to connect to the STACKIT Object Storage bucket.
47+
48+
```hcl
49+
provider "aws" {
50+
region = "eu01"
51+
skip_credentials_validation = true
52+
skip_region_validation = true
53+
skip_requesting_account_id = true
54+
55+
access_key = stackit_objectstorage_credential.example.access_key
56+
secret_key = stackit_objectstorage_credential.example.secret_access_key
57+
58+
endpoints {
59+
s3 = "https://object.storage.eu01.onstackit.cloud"
60+
}
61+
}
62+
```
63+
64+
4. **Use the Provider to Manage Objects or Policies**
65+
66+
```hcl
67+
resource "aws_s3_object" "test_file" {
68+
bucket = stackit_objectstorage_bucket.example.name
69+
key = "hello_world.txt"
70+
source = "files/hello_world.txt"
71+
content_type = "text/plain"
72+
etag = filemd5("files/hello_world.txt")
73+
}
74+
75+
resource "aws_s3_bucket_policy" "allow_public_read_access" {
76+
bucket = stackit_objectstorage_bucket.example.name
77+
policy = <<EOF
78+
{
79+
"Statement": [
7880
{
79-
"Statement":[
80-
{
81-
"Sid": "Public GET",
82-
"Effect":"Allow",
83-
"Principal":"*",
84-
"Action":"s3:GetObject",
85-
"Resource":"urn:sgws:s3:::example/*"
86-
}
87-
]
81+
"Sid": "Public GET",
82+
"Effect": "Allow",
83+
"Principal": "*",
84+
"Action": "s3:GetObject",
85+
"Resource": "urn:sgws:s3:::example/*"
8886
}
89-
EOF
90-
}
91-
```
87+
]
88+
}
89+
EOF
90+
}
91+
```

templates/guides/aws_provider_s3_stackit.md.tmpl

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,87 @@ page_title: "Using AWS Provider for STACKIT Object Storage (S3 compatible)"
55

66
## Overview
77

8-
This guide outlines the process of utilizing the [AWS Terraform Provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) alongside the STACKIT provider to create and manage STACKIT Object Storage (S3 compatible) ressources.
8+
This guide outlines the process of utilizing the [AWS Terraform Provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) alongside the STACKIT provider to create and manage STACKIT Object Storage (S3 compatible) resources.
99

1010
## Steps
1111

1212
1. **Configure STACKIT Provider**
1313

14-
First, configure the STACKIT provider to connect to the STACKIT services.
14+
First, configure the STACKIT provider to connect to the STACKIT services.
1515

16-
```hcl
17-
provider "stackit" {
18-
default_region = "eu01"
19-
}
20-
```
16+
```hcl
17+
provider "stackit" {
18+
default_region = "eu01"
19+
}
20+
```
2121

2222
2. **Define STACKIT Object Storage Bucket**
2323

24-
Create a STACKIT Object Storage Bucket and obtain credentials for the AWS provider.
24+
Create a STACKIT Object Storage Bucket and obtain credentials for the AWS provider.
2525

26-
```hcl
27-
resource "stackit_objectstorage_bucket" "example" {
28-
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
29-
name = "example"
30-
}
26+
```hcl
27+
resource "stackit_objectstorage_bucket" "example" {
28+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
29+
name = "example"
30+
}
3131

32-
resource "stackit_objectstorage_credentials_group" "example" {
33-
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
34-
name = "example-credentials-group"
35-
}
32+
resource "stackit_objectstorage_credentials_group" "example" {
33+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
34+
name = "example-credentials-group"
35+
}
3636

37-
resource "stackit_objectstorage_credential" "example" {
38-
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
39-
credentials_group_id = stackit_objectstorage_credentials_group.example.credentials_group_id
40-
expiration_timestamp = "2027-01-02T03:04:05Z"
41-
}
42-
```
37+
resource "stackit_objectstorage_credential" "example" {
38+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
39+
credentials_group_id = stackit_objectstorage_credentials_group.example.credentials_group_id
40+
expiration_timestamp = "2027-01-02T03:04:05Z"
41+
}
42+
```
4343

4444
3. **Configure AWS Provider**
4545

46-
Configure the AWS Provider to connect to the STACKIT Object Storage bucket.
47-
48-
```hcl
49-
provider "aws" {
50-
region = "eu01"
51-
skip_credentials_validation = true
52-
skip_region_validation = true
53-
skip_requesting_account_id = true
54-
55-
access_key = stackit_objectstorage_credential.example.access_key
56-
secret_key = stackit_objectstorage_credential.example.secret_access_key
57-
58-
endpoints {
59-
s3 = "https://object.storage.eu01.onstackit.cloud"
60-
}
61-
}
62-
```
63-
64-
4. **Use the provider to manage objects or policies**
65-
66-
```hcl
67-
resource "aws_s3_object" "test_file" {
68-
bucket = stackit_objectstorage_bucket.example.name
69-
key = "hello_world.txt"
70-
source = "files/hello_world.txt"
71-
content_type = "text/plain"
72-
etag = filemd5("files/hello_world.txt")
73-
}
74-
75-
resource "aws_s3_bucket_policy" "allow_public_read_access" {
76-
bucket = stackit_objectstorage_bucket.test20.name
77-
policy = <<EOF
46+
Configure the AWS provider to connect to the STACKIT Object Storage bucket.
47+
48+
```hcl
49+
provider "aws" {
50+
region = "eu01"
51+
skip_credentials_validation = true
52+
skip_region_validation = true
53+
skip_requesting_account_id = true
54+
55+
access_key = stackit_objectstorage_credential.example.access_key
56+
secret_key = stackit_objectstorage_credential.example.secret_access_key
57+
58+
endpoints {
59+
s3 = "https://object.storage.eu01.onstackit.cloud"
60+
}
61+
}
62+
```
63+
64+
4. **Use the Provider to Manage Objects or Policies**
65+
66+
```hcl
67+
resource "aws_s3_object" "test_file" {
68+
bucket = stackit_objectstorage_bucket.example.name
69+
key = "hello_world.txt"
70+
source = "files/hello_world.txt"
71+
content_type = "text/plain"
72+
etag = filemd5("files/hello_world.txt")
73+
}
74+
75+
resource "aws_s3_bucket_policy" "allow_public_read_access" {
76+
bucket = stackit_objectstorage_bucket.example.name
77+
policy = <<EOF
78+
{
79+
"Statement": [
7880
{
79-
"Statement":[
80-
{
81-
"Sid": "Public GET",
82-
"Effect":"Allow",
83-
"Principal":"*",
84-
"Action":"s3:GetObject",
85-
"Resource":"urn:sgws:s3:::example/*"
86-
}
87-
]
81+
"Sid": "Public GET",
82+
"Effect": "Allow",
83+
"Principal": "*",
84+
"Action": "s3:GetObject",
85+
"Resource": "urn:sgws:s3:::example/*"
8886
}
89-
EOF
90-
}
91-
```
87+
]
88+
}
89+
EOF
90+
}
91+
```

0 commit comments

Comments
 (0)