You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/enterprise_security_configuration.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This resource allows you to create and manage [code security configurations](htt
13
13
14
14
You must have enterprise admin access to use this resource.
15
15
16
-
~> **Note:**Some settings (such as `advanced_security` and `secret_scanning_generic_secrets`) require GitHub Advanced Security licensing.
16
+
~> Some settings (such as `advanced_security` and `secret_scanning_generic_secrets`) require GitHub Advanced Security licensing.
17
17
18
18
## Example Usage
19
19
@@ -98,7 +98,18 @@ Optional:
98
98
99
99
## Import
100
100
101
-
GitHub enterprise code security configurations can be imported using the enterprise slug and the configuration ID separated by a colon (`<enterprise_slug>:<configuration_id>`), for example:
101
+
GitHub enterprise code security configurations can be imported using the enterprise slug and the configuration ID separated by a colon (`<enterprise_slug>:<configuration_id>`).
102
+
103
+
In Terraform v1.5.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `id` attribute, for example:
104
+
105
+
```terraform
106
+
import {
107
+
to = github_enterprise_security_configuration.default
108
+
id = "my-enterprise:123"
109
+
}
110
+
```
111
+
112
+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
Copy file name to clipboardExpand all lines: docs/resources/organization_security_configuration.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This resource allows you to create and manage [code security configurations](htt
13
13
14
14
You must have organization admin access to use this resource.
15
15
16
-
~> **Note:**Some settings (such as `advanced_security` and `secret_scanning_generic_secrets`) require GitHub Advanced Security licensing.
16
+
~> Some settings (such as `advanced_security` and `secret_scanning_generic_secrets`) require GitHub Advanced Security licensing.
17
17
18
18
## Example Usage
19
19
@@ -137,7 +137,18 @@ Required:
137
137
138
138
## Import
139
139
140
-
GitHub organization code security configurations can be imported using the configuration ID, for example:
140
+
GitHub organization code security configurations can be imported using the configuration ID.
141
+
142
+
In Terraform v1.5.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `id` attribute, for example:
143
+
144
+
```terraform
145
+
import {
146
+
to = github_organization_security_configuration.default
147
+
id = "123"
148
+
}
149
+
```
150
+
151
+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
tflog.Info(ctx, "Removing enterprise code security configuration from state because it no longer exists in GitHub", map[string]any{"enterprise": enterprise, "id": id})
311
+
d.SetId("")
312
+
returnnil
330
313
}
331
-
tflog.Error(ctx, "Failed to read enterprise code security configuration", map[string]any{
0 commit comments