Skip to content

Commit b43eeea

Browse files
Update docs for v15.9.0 release
1 parent d4600a1 commit b43eeea

File tree

6 files changed

+1066
-3
lines changed

6 files changed

+1066
-3
lines changed

CHANGELOG.md

+947
Large diffs are not rendered by default.

docs/data-sources/project.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ data "gitlab_project" "example" {
5656
- `external_authorization_classification_label` (String) The classification label for the project.
5757
- `forking_access_level` (String) Set the forking access level. Valid values are `disabled`, `private`, `enabled`.
5858
- `http_url_to_repo` (String) URL that can be provided to `git clone` to clone the
59+
- `import_url` (String) URL the project was imported from.
5960
- `issues_access_level` (String) Set the issues access level. Valid values are `disabled`, `private`, `enabled`.
6061
- `issues_enabled` (Boolean) Enable issue tracking for the project.
6162
- `lfs_enabled` (Boolean) Enable LFS for the project.
@@ -70,7 +71,7 @@ data "gitlab_project" "example" {
7071
- `path` (String) The path of the repository.
7172
- `pipelines_enabled` (Boolean) Enable pipelines for the project.
7273
- `printing_merge_request_link_enabled` (Boolean) Show link to create/view merge request when pushing from the command line
73-
- `push_rules` (List of Object) Push rules for the project. (see [below for nested schema](#nestedatt--push_rules))
74+
- `push_rules` (List of Object) Push rules for the project. Push rules are only available on Enterprise plans and if the authenticated has permissions to read them. (see [below for nested schema](#nestedatt--push_rules))
7475
- `remove_source_branch_after_merge` (Boolean) Enable `Delete source branch` option by default for all new merge requests
7576
- `repository_access_level` (String) Set the repository access level. Valid values are `disabled`, `private`, `enabled`.
7677
- `repository_storage` (String) Which storage shard the repository is on. (administrator only)

docs/data-sources/projects.md

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Read-Only:
112112
- `id` (Number)
113113
- `import_error` (String)
114114
- `import_status` (String)
115+
- `import_url` (String)
115116
- `issues_access_level` (String)
116117
- `issues_enabled` (Boolean)
117118
- `jobs_enabled` (Boolean)

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ resource "gitlab_project" "sample_group_project" {
7575
- `cacert_file` (String) This is a file containing the ca cert to verify the gitlab instance. This is available for use when working with GitLab CE or Gitlab Enterprise with a locally-issued or self-signed certificate chain.
7676
- `client_cert` (String) File path to client certificate when GitLab instance is behind company proxy. File must contain PEM encoded data.
7777
- `client_key` (String) File path to client key when GitLab instance is behind company proxy. File must contain PEM encoded data. Required when `client_cert` is set.
78-
- `early_auth_check` (Boolean) (Experimental) By default the provider does a dummy request to get the current user in order to verify that the provider configuration is correct and the GitLab API is reachable. Set this to `false` to skip this check. This may be useful if the GitLab instance does not yet exist and is created within the same terraform module. This is an experimental feature and may change in the future. Please make sure to always keep backups of your state.
78+
- `early_auth_check` (Boolean) (Experimental) By default the provider does a dummy request to get the current user in order to verify that the provider configuration is correct and the GitLab API is reachable. Set this to `false` to skip this check. This may be useful if the GitLab instance does not yet exist and is created within the same terraform module. It may be sourced from the `GITLAB_EARLY_AUTH_CHECK`. This is an experimental feature and may change in the future. Please make sure to always keep backups of your state.
7979
- `insecure` (Boolean) When set to true this disables SSL verification of the connection to the GitLab instance.
8080
- `token` (String, Sensitive) The OAuth2 Token, Project, Group, Personal Access Token or CI Job Token used to connect to GitLab. The OAuth method is used in this provider for authentication (using Bearer authorization token). See https://docs.gitlab.com/ee/api/#authentication for details. It may be sourced from the `GITLAB_TOKEN` environment variable.

docs/resources/pages_domain.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_pages_domain Resource - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_pages_domain resource allows connecting custom domains and TLS certificates in GitLab Pages.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/pages_domains.html
8+
---
9+
10+
# gitlab_pages_domain (Resource)
11+
12+
The `gitlab_pages_domain` resource allows connecting custom domains and TLS certificates in GitLab Pages.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pages_domains.html)
15+
16+
## Example Usage
17+
18+
```terraform
19+
# Example using auto_ssl_enabled, which uses lets encrypt to generate a certificate
20+
resource "gitlab_pages_domain" "this" {
21+
project = 123
22+
domain = "example.com"
23+
24+
auto_ssl_enabled = true
25+
}
26+
27+
# Example using a manually generated certificate and key
28+
resource "gitlab_pages_domain" "this" {
29+
project = 123
30+
domain = "example.com"
31+
32+
key = file("${path.module}/key.pem")
33+
certificate = file("${path.module}/cert.pem")
34+
}
35+
```
36+
37+
<!-- schema generated by tfplugindocs -->
38+
## Schema
39+
40+
### Required
41+
42+
- `domain` (String) The custom domain indicated by the user.
43+
- `project` (String) The ID or [URL-encoded path of the project](https://docs.gitlab.com/ee/api/index.html#namespaced-path-encoding) owned by the authenticated user.
44+
45+
### Optional
46+
47+
- `auto_ssl_enabled` (Boolean) Enables [automatic generation](https://docs.gitlab.com/ee/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.html) of SSL certificates issued by Let’s Encrypt for custom domains. When this is set to "true", certificate can't be provided.
48+
- `certificate` (String) The certificate in PEM format with intermediates following in most specific to least specific order.
49+
- `expired` (Boolean) Whether the certificate is expired.
50+
- `key` (String) The certificate key in PEM format.
51+
52+
### Read-Only
53+
54+
- `id` (String) The ID of this Terraform resource. In the format of `<project>:<domain>`.
55+
- `url` (String) The URL for the given domain.
56+
- `verification_code` (String, Sensitive) The verification code for the domain.
57+
- `verified` (Boolean) The certificate data.
58+
59+
## Import
60+
61+
Import is supported using the following syntax:
62+
63+
```shell
64+
# GitLab pages domain can be imported using an id made up of `projectId:domain` _without_ the http protocol, e.g.
65+
terraform import gitlab_pages_domain.this 123:example.com
66+
```

docs/resources/project.md

+49-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,50 @@ resource "gitlab_project" "fork" {
7777
import_url = gitlab_project.example.http_url_to_repo
7878
mirror = true
7979
}
80+
81+
# Create a project by importing it from a public project
82+
resource "gitlab_project" "import_public" {
83+
name = "import-from-public-project"
84+
import_url = "https://gitlab.example.com/repo.git"
85+
}
86+
87+
# Create a project by importing it from a public project and setup the pull mirror
88+
resource "gitlab_project" "import_public_with_mirror" {
89+
name = "import-from-public-project"
90+
import_url = "https://gitlab.example.com/repo.git"
91+
mirror = true
92+
}
93+
94+
# Create a project by importing it from a private project
95+
resource "gitlab_project" "import_private" {
96+
name = "import-from-public-project"
97+
import_url = "https://gitlab.example.com/repo.git"
98+
import_url_username = "user"
99+
import_url_password = "pass"
100+
}
101+
102+
# Create a project by importing it from a private project and setup the pull mirror
103+
resource "gitlab_project" "import_private_with_mirror" {
104+
name = "import-from-public-project"
105+
import_url = "https://gitlab.example.com/repo.git"
106+
import_url_username = "user"
107+
import_url_password = "pass"
108+
mirror = true
109+
}
110+
111+
# Create a project by importing it from a private project and provide credentials in `import_url`
112+
# NOTE: only use this if you really must, use `import_url_username` and `import_url_password` whenever possible
113+
# GitLab API will always return the `import_url` without credentials, therefore you must ignore the `import_url` for changes:
114+
resource "gitlab_project" "import_private" {
115+
name = "import-from-public-project"
116+
import_url = "https://user:[email protected]/repo.git"
117+
118+
lifecycle {
119+
ignore_changes = [
120+
import_url
121+
]
122+
}
123+
}
80124
```
81125

82126
<!-- schema generated by tfplugindocs -->
@@ -120,7 +164,9 @@ resource "gitlab_project" "fork" {
120164
- `forked_from_project_id` (Number) The id of the project to fork. During create the project is forked and during an update the fork relation is changed.
121165
- `forking_access_level` (String) Set the forking access level. Valid values are `disabled`, `private`, `enabled`.
122166
- `group_with_project_templates_id` (Number) For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires use_custom_template to be true (enterprise edition).
123-
- `import_url` (String) Git URL to a repository to be imported. Together with `mirror = true` it will setup a Pull Mirror. This can also be used together with `forked_from_project_id` to setup a Pull Mirror for a fork. The fork takes precedence over the import. This field cannot be imported via `terraform import`.
167+
- `import_url` (String) Git URL to a repository to be imported. Together with `mirror = true` it will setup a Pull Mirror. This can also be used together with `forked_from_project_id` to setup a Pull Mirror for a fork. The fork takes precedence over the import. Make sure to provide the credentials in `import_url_username` and `import_url_password`. GitLab never returns the credentials, thus the provider cannot detect configuration drift in the credentials. They can also not be imported using `terraform import`. See the examples section for how to properly use it.
168+
- `import_url_password` (String, Sensitive) The password for the `import_url`. The value of this field is used to construct a valid `import_url` and is only related to the provider. This field cannot be imported using `terraform import`. See the examples section for how to properly use it.
169+
- `import_url_username` (String) The username for the `import_url`. The value of this field is used to construct a valid `import_url` and is only related to the provider. This field cannot be imported using `terraform import`. See the examples section for how to properly use it.
124170
- `initialize_with_readme` (Boolean) Create main branch with first commit containing a README.md file.
125171
- `issues_access_level` (String) Set the issues access level. Valid values are `disabled`, `private`, `enabled`.
126172
- `issues_enabled` (Boolean) Enable issue tracking for the project.
@@ -229,4 +275,6 @@ Import is supported using the following syntax:
229275
# `id` can be whatever the [get single project api][get_single_project] takes for
230276
# its `:id` value, so for example:
231277
terraform import gitlab_project.example richardc/example
278+
279+
# NOTE: the `import_url_username` and `import_url_password` cannot be imported.
232280
```

0 commit comments

Comments
 (0)