Skip to content

Commit 1078de6

Browse files
authored
Merge pull request #303 from cloudskiff/doc/rewrite
Update documentation architecture
2 parents 2c1ae57 + 5ee00d2 commit 1078de6

22 files changed

Lines changed: 88 additions & 955 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ As you make your changes, you can re-run the above command to ensure that the te
9191
go test ./pkg/iac/...
9292
```
9393

94-
For more details on testing, check the [contributing guide](../doc/contributing/tests.md).
94+
For more details on testing, check the [contributing guide](../docs/testing.md).
9595

9696
### Acceptance Tests: Testing interactions with external services
9797

@@ -104,7 +104,7 @@ We recommend focusing only on the specific package you are working on when enabl
104104
Because the acceptance tests depend on services outside of the driftctl codebase, and because the acceptance tests are usually used only when making changes to the systems they cover, it is common and expected that drift in those external systems will cause test failures.
105105
Because of this, prior to working on a system covered by acceptance tests it's important to run the existing tests for that system in an *unchanged* work tree first and respond to any test failures that preexist, to avoid misinterpreting such failures as bugs in your new changes.
106106

107-
More details on acceptance on the [contributing guide](../doc/contributing/README.md)
107+
More details on acceptance on the [contributing guide](../docs/README.md)
108108

109109
## Generated Code
110110

README.md

Lines changed: 11 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img width="201" src="assets/new_icon.svg" alt="Driftctl">
2+
<img width="200" src="https://docs.driftctl.com/img/driftctl_dark.svg" alt="driftctl">
33
</p>
44

55
<p align="center">
@@ -23,11 +23,11 @@
2323

2424
<p align="center">
2525
Measures infrastructure as code coverage, and tracks infrastructure drift.<br>
26-
<strong>IaC:</strong> Terraform, <strong>Cloud platform:</strong> AWS (Azure and GCP on the roadmap for 2021).<br>
26+
<strong>IaC:</strong> Terraform, <strong>Cloud providers:</strong> AWS, GitHub (Azure and GCP on the roadmap for 2021).<br>
2727
:warning: <strong>This tool is still in beta state and will evolve in the future with potential breaking changes</strong> :warning:
2828
</p>
2929

30-
## Why ?
30+
## Why driftctl ?
3131

3232
Infrastructure as code is awesome, but there are too many moving parts: codebase, state file, actual cloud state. Things tend to drift.
3333

@@ -40,169 +40,25 @@ driftctl tracks how well your IaC codebase covers your cloud configuration. drif
4040
## Features
4141

4242
- **Scan** cloud provider and map resources with IaC code
43-
- Analyze diff, and warn about drift and unwanted unmanaged resources
43+
- Analyze diffs, and warn about drift and unwanted unmanaged resources
4444
- Allow users to **ignore** resources
4545
- Multiple output formats
4646

47-
## Documentation & support
47+
---
4848

49-
- [Get started](https://driftctl.com/product/quick-tutorial/)
50-
- [User guide](doc/README.md)
51-
- [Discord](https://discord.gg/NMCBxtD7Nd)
49+
**[Get Started](https://driftctl.com/product/quick-tutorial/)**
5250

53-
## Getting started
51+
**[Documentation](https://docs.driftctl.com)**
5452

55-
### Installation
53+
**[Installation](https://docs.driftctl.com/installation)**
5654

57-
driftctl is available on Linux, macOS and Windows.
55+
**[Discord](https://discord.gg/NMCBxtD7Nd)**
5856

59-
Binaries are available in the [release page](https://github.com/cloudskiff/driftctl/releases).
60-
61-
#### Homebrew for macOS
62-
63-
```bash
64-
brew install driftctl
65-
```
66-
67-
#### MacPorts for macOS
68-
69-
```bash
70-
sudo port install driftctl
71-
```
72-
73-
#### Docker
74-
75-
```bash
76-
docker run -t --rm \
77-
-v ~/.aws:/home/.aws:ro \
78-
-v $(pwd):/app:ro \
79-
-v ~/.driftctl:/home/.driftctl \
80-
-e AWS_PROFILE=non-default-profile \
81-
cloudskiff/driftctl scan
82-
```
83-
84-
`-v ~/.aws:/home/.aws:ro` (optionally) mounts your `~/.aws` containing AWS credentials and profile
85-
86-
`-v $(pwd):/app:ro` (optionally) mounts your working dir containing the terraform state
87-
88-
`-v ~/.driftctl:/home/.driftctl` (optionally) prevents driftctl to download the provider at each run
89-
90-
`-e AWS_PROFILE=cloudskiff` (optionally) exports the non-default AWS profile name to use
91-
92-
`cloudskiff/driftctl:<VERSION_TAG>` run a specific driftctl tagged release
93-
94-
#### Manual
95-
96-
- **Linux**
97-
98-
This is an example using `curl`. If you don't have `curl`, install it, or use `wget`.
99-
100-
```bash
101-
# x64
102-
curl -L https://github.com/cloudskiff/driftctl/releases/latest/download/driftctl_linux_amd64 -o driftctl
103-
104-
# x86
105-
curl -L https://github.com/cloudskiff/driftctl/releases/latest/download/driftctl_linux_386 -o driftctl
106-
```
107-
108-
Make the binary executable:
109-
110-
```bash
111-
chmod +x driftctl
112-
```
113-
114-
Optionally install driftctl to a central location in your `PATH`:
115-
116-
```bash
117-
# use any path that suits you, this is just a standard example. Install sudo if needed.
118-
sudo mv driftctl /usr/local/bin/
119-
```
120-
121-
- **macOS**
122-
123-
```bash
124-
# x64
125-
curl -L https://github.com/cloudskiff/driftctl/releases/latest/download/driftctl_darwin_amd64 -o driftctl
126-
```
127-
128-
Make the binary executable:
129-
130-
```bash
131-
chmod +x driftctl
132-
```
133-
134-
Optionally install driftctl to a central location in your `PATH`:
135-
136-
```bash
137-
# use any path that suits you, this is just a standard example. Install sudo if needed.
138-
sudo mv driftctl /usr/local/bin/
139-
```
140-
141-
- **Windows**
142-
143-
```bash
144-
# x64
145-
curl https://github.com/cloudskiff/driftctl/releases/latest/download/driftctl_windows_amd64.exe -o driftctl.exe
146-
# x86
147-
curl https://github.com/cloudskiff/driftctl/releases/latest/download/driftctl_windows_386.exe -o driftctl.exe
148-
```
149-
150-
#### Verify digital signatures
151-
152-
Cloudskiff releases are signed using PGP key (ed25519) with ID `ACC776A79C824EBD` and fingerprint `2776 6600 5A7F 01D4 84F6 376D ACC7 76A7 9C82 4EBD`
153-
Our key can be retrieved from common keyservers.
154-
155-
```shell
156-
# Download binary, checksums and signature
157-
$ curl -L https://github.com/cloudskiff/driftctl/releases/latest/download/driftctl_linux_amd64 -o driftctl_linux_amd64
158-
$ curl -L https://github.com/cloudskiff/driftctl/releases/latest/download/driftctl_SHA256SUMS -o driftctl_SHA256SUMS
159-
$ curl -L https://github.com/cloudskiff/driftctl/releases/latest/download/driftctl_SHA256SUMS.gpg -o driftctl_SHA256SUMS.gpg
160-
161-
# Import key
162-
$ gpg --keyserver hkps.pool.sks-keyservers.net --recv-keys 0xACC776A79C824EBD
163-
gpg: key ACC776A79C824EBD: public key "Cloudskiff <security@cloudskiff.com>" imported
164-
gpg: Total number processed: 1
165-
gpg: imported: 1
166-
167-
# Verify signature (optionally trust the key from gnupg to avoid any warning)
168-
$ gpg --verify driftctl_SHA256SUMS.gpg
169-
gpg: Signature made jeu. 04 févr. 2021 14:58:06 CET
170-
gpg: using EDDSA key 277666005A7F01D484F6376DACC776A79C824EBD
171-
gpg: issuer "security@cloudskiff.com"
172-
gpg: Good signature from "Cloudskiff <security@cloudskiff.com>" [ultimate]
173-
174-
# Verify checksum
175-
$ sha256sum --ignore-missing -c driftctl_SHA256SUMS
176-
driftctl_linux_amd64: OK
177-
```
178-
179-
### Run
180-
181-
Be sure to have [configured](doc/cmd/scan/supported_resources/aws.md#authentication) your AWS credentials.
182-
183-
You will need to assign [proper permissions](doc/cmd/scan/supported_resources/aws.md#least-privileged-policy) to allow driftctl to scan your account.
184-
185-
```bash
186-
# With a local state
187-
$ driftctl scan
188-
# Same as
189-
$ driftctl scan --from tfstate://terraform.tfstate
190-
191-
# To specify AWS credentials
192-
$ AWS_ACCESS_KEY_ID=XXX AWS_SECRET_ACCESS_KEY=XXX driftctl scan
193-
# or using a profile
194-
$ AWS_PROFILE=profile_name driftctl scan
195-
196-
# With state stored on a s3 backend
197-
$ driftctl scan --from tfstate+s3://my-bucket/path/to/state.tfstate
198-
199-
# With multiples states
200-
$ driftctl scan --from tfstate://terraform_S3.tfstate --from tfstate://terraform_VPC.tfstate
201-
```
57+
---
20258

20359
## Contribute
20460

205-
To learn more about compiling driftctl and contributing, please refer to the [contribution guidelines](.github/CONTRIBUTING.md) and [contributing guide](doc/contributing/README.md) for technical details.
61+
To learn more about compiling driftctl and contributing, please refer to the [contribution guidelines](.github/CONTRIBUTING.md) and the [contributing guide](docs/README.md) for technical details.
20662

20763
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification and is brought to you by these [awesome contributors](CONTRIBUTORS.md).
20864

assets/icon.png

-3.82 KB
Binary file not shown.

assets/icon.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

assets/new_icon.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/LIMITATIONS.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

doc/README.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)