Skip to content

Commit 89e85ad

Browse files
committed
fix: add RequiredWith to new optional variables
1 parent 677d001 commit 89e85ad

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

github/resource_github_repository_file.go

+10-8
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,18 @@ func resourceGithubRepositoryFile() *schema.Resource {
122122
Default: false,
123123
},
124124
"autocreate_branch_source_branch": {
125-
Type: schema.TypeString,
126-
Default: "main",
127-
Optional: true,
128-
Description: "The branch name to start from, if 'autocreate_branch' is set. Defaults to 'main'.",
125+
Type: schema.TypeString,
126+
Default: "main",
127+
Optional: true,
128+
Description: "The branch name to start from, if 'autocreate_branch' is set. Defaults to 'main'.",
129+
RequiredWith: []string{"autocreate_branch"},
129130
},
130131
"autocreate_branch_source_sha": {
131-
Type: schema.TypeString,
132-
Optional: true,
133-
Computed: true,
134-
Description: "The commit hash to start from, if 'autocreate_branch' is set. Defaults to the tip of 'autocreate_branch_source_branch'. If provided, 'autocreate_branch_source_branch' is ignored.",
132+
Type: schema.TypeString,
133+
Optional: true,
134+
Computed: true,
135+
Description: "The commit hash to start from, if 'autocreate_branch' is set. Defaults to the tip of 'autocreate_branch_source_branch'. If provided, 'autocreate_branch_source_branch' is ignored.",
136+
RequiredWith: []string{"autocreate_branch"},
135137
},
136138
},
137139
}

0 commit comments

Comments
 (0)