Skip to content

Commit 0a8dabf

Browse files
Update arguments for codefresh_api_key resource
`user_id` is a required parameter to use this resource; considering the diffs between on-prem & SaaS, I didn't feel the need to complicate the examples anymore by adding data call for user, but that is important. It should probably be noted that the majority of the [currently documented resources|https://registry.terraform.io/providers/codefresh-io/codefresh/latest/docs/resources/user] do not play well with self-hosted deployments. I'm testing getting this resource working with a self-hosted deployment and will update as needed if I'm able to get a working model going.
1 parent 4df8740 commit 0a8dabf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/resources/api-key.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resource "random_string" "random" {
2323
2424
resource "codefresh_api_key" "new" {
2525
account_id = codefresh_account.test.id
26-
26+
user_id = data.codefresh_account.test_account_user.user_id
2727
name = "tfkey_${random_string.random.result}"
2828
2929
scopes = [
@@ -66,7 +66,8 @@ resource "codefresh_team" "team_1" {
6666
## Argument Reference
6767

6868
- `name` - (Required) The display name for the API key.
69-
- `account_id` - (Required) The ID of account than should own the new API key.
69+
- `account_id` - (Required) The ID of account in which the API key will be created.
70+
- `user_id` - (Required) The ID of a user within the above account that will own the API key.
7071
- `scopes` - (Optional) A list of access scopes, that can be targeted. The possible values:
7172
- `agent`
7273
- `agents`

0 commit comments

Comments
 (0)