-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: template generic sample docs into their respective readme
- Loading branch information
1 parent
105c0a6
commit 7b7e2a6
Showing
16 changed files
with
571 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
.github/actions/update-docs/sample-instructions.template.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- BEGIN_SAMPLES_DEFAULT_SETUP_INSTRUCTIONS --> | ||
## Setup Instructions | ||
|
||
Set the project ID where you want your Apigee Organization to be deployed to: | ||
|
||
```sh | ||
PROJECT_ID=my-project-id | ||
``` | ||
|
||
```sh | ||
cd samples/... # Sample from above | ||
cp ./x-demo.tfvars ./my-config.tfvars | ||
``` | ||
|
||
Decide on a [backend](https://www.terraform.io/language/settings/backends) and create the necessary config. To use a backend on Google Cloud Storage (GCS) use: | ||
|
||
```sh | ||
gsutil mb "gs://$PROJECT_ID-tf" | ||
|
||
cat <<EOF >terraform.tf | ||
terraform { | ||
backend "gcs" { | ||
bucket = "$PROJECT_ID-tf" | ||
prefix = "terraform/state" | ||
} | ||
} | ||
EOF | ||
``` | ||
|
||
Validate your config: | ||
|
||
```sh | ||
terraform init | ||
terraform plan --var-file=./my-config.tfvars -var "project_id=$PROJECT_ID" | ||
``` | ||
|
||
and provision everything (takes roughly 25min): | ||
|
||
```sh | ||
terraform apply --var-file=./my-config.tfvars -var "project_id=$PROJECT_ID" | ||
``` | ||
<!-- END_SAMPLES_DEFAULT_SETUP_INSTRUCTIONS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.