File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed
routers/api/packages/terraform
templates/package/content Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -331,11 +331,6 @@ func UnlockState(ctx *context.Context) {
331331 _ = json .Unmarshal (body , & unlockRequest ) // The error can be ignored, since the ID can also be in the query
332332 }
333333
334- // If the ID is not found in the body, look in the query parameters
335- if unlockRequest .ID == "" {
336- unlockRequest .ID = ctx .Query ("ID" ).(string )
337- }
338-
339334 // Check for ID presence
340335 if unlockRequest .ID == "" {
341336 log .Error ("Missing lock ID in both query and request body" )
Original file line number Diff line number Diff line change 88export GITEA_USER_PASSWORD=<YOUR-USER-PASSWORD>
99export TF_STATE_NAME=your-state.tfstate
1010terraform init \
11- -backend-config="address=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/terraform/state/$TF_STATE_NAME"></origin-url> \
12- -backend-config="lock_address=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/terraform/state/$TF_STATE_NAME/lock"></origin-url> \
13- -backend-config="unlock_address=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/terraform/state/$TF_STATE_NAME/lock"></origin-url> \
14- -backend-config="username={{.PackageDescriptor.Owner.Name}}" \
15- -backend-config="password=$GITEA_USER_PASSWORD" \
16- -backend-config="lock_method=POST" \
17- -backend-config="unlock_method=DELETE" \
18- -backend-config="retry_wait_min=5"
11+   -backend-config="address=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/terraform/state/$TF_STATE_NAME"></origin-url> \
12+   -backend-config="lock_address=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/terraform/state/$TF_STATE_NAME/lock"></origin-url> \
13+   -backend-config="unlock_address=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/terraform/state/$TF_STATE_NAME/lock"></origin-url> \
14+   -backend-config="username={{.PackageDescriptor.Owner.Name}}" \
15+   -backend-config="password=$GITEA_USER_PASSWORD" \
16+   -backend-config="lock_method=POST" \
17+   -backend-config="unlock_method=DELETE" \
18+   -backend-config="retry_wait_min=5"
1919</code></pre></div>
2020 </div>
2121 <div class="field">
You can’t perform that action at this time.
0 commit comments