mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-07 15:16:38 +02:00
2a61284ba5
Backport #37424 by @TheFox0x7 fixes: https://github.com/go-gitea/gitea/issues/37423 Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
27 lines
1.3 KiB
Go HTML Template
27 lines
1.3 KiB
Go HTML Template
{{if eq .PackageDescriptor.Package.Type "terraform"}}
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
|
|
<div class="ui attached segment">
|
|
<div class="ui form">
|
|
<div class="field">
|
|
<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.terraform.install"}}</label>
|
|
<div class="markup"><pre class="code-block"><code>terraform {
|
|
backend "http" {
|
|
address = "{{ctx.AppFullLink}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/terraform/state/{{$.PackageDescriptor.Package.Name}}"
|
|
lock_address = "{{ctx.AppFullLink}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/terraform/state/{{$.PackageDescriptor.Package.Name}}/lock"
|
|
unlock_address = "{{ctx.AppFullLink}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/terraform/state/{{$.PackageDescriptor.Package.Name}}/lock"
|
|
lock_method = "POST"
|
|
unlock_method = "DELETE"
|
|
}
|
|
}</code></pre></div>
|
|
</div>
|
|
<div class="field">
|
|
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.terraform.install2"}}</label>
|
|
<div class="markup"><pre class="code-block"><code>terraform init -migrate-state</code></pre></div>
|
|
</div>
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "packages.registry.documentation" "Terraform" "https://docs.gitea.com/usage/packages/terraform"}}</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|