Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix example.tf #2

Merged
merged 3 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ To build and install locally into _~/go/bin_:
go install
```

To use the locally built version of the provider, tell terraform where to find it (only needed once):
To use the locally built version of the provider, use dev overrides to tell terraform where to find it (only needed once):

```
make ~/.terraformrc
```

NB: when using dev overrides `terraform init` will fail, but this can be ignored. If you have more than one provider then they all must be overridden. For more info see [#27459](https://github.com/hashicorp/terraform/issues/27459#issuecomment-1381507253).

## Prefect API

Use Prefect's Interactive API tab to explore GraphQL API. If you can't find what you're looking for in the Documentation Explorer, inspect Chrome Developer Tools whilst taking actions in the interface.
Expand Down
2 changes: 1 addition & 1 deletion devtools/.terraformrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
provider_installation {

dev_overrides {
"prefect" = "<GOBIN>"
"PrefectHQ/prefect" = "<GOBIN>"
}

# For all other providers, install them directly from their origin provider
Expand Down
22 changes: 12 additions & 10 deletions examples/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
prefect = {
source = "egistry.terraform.io/PrefectHQ/prefect"
source = "PrefectHQ/prefect"
}
}
required_version = ">= 1.0"
Expand All @@ -22,20 +22,22 @@ resource "prefect_service_account" "test" {
api_keys = [
{
name = "key1"
expiration = "2015-10-21T00:00:00+11:00"
expiration = "2015-10-21T00:00:00+00:00"
},
{
name = "key2"
expiration = "2015-10-21T00:00:00+11:00"
expiration = "2015-10-21T00:00:00+00:00"
}
]
}

resource "aws_secretsmanager_secret" "this" {
name = "prefect-svc.apikey"
}
# example showing how to store the api key in an AWS Secrets Manager secret

resource "aws_secretsmanager_secret_version" "this" {
secret_id = aws_secretsmanager_secret.this.id
secret_string = prefect_service_account.test.api_keys[0].key
}
# resource "aws_secretsmanager_secret" "this" {
# name = "prefect-svc.apikey"
# }

# resource "aws_secretsmanager_secret_version" "this" {
# secret_id = aws_secretsmanager_secret.this.id
# secret_string = prefect_service_account.test.api_keys[0].key
# }