Skip to content

Commit

Permalink
Merge pull request #49 from cobbler/fix/optional-attributes
Browse files Browse the repository at this point in the history
Fix: Optional attributes
  • Loading branch information
SchoolGuy authored Oct 23, 2024
2 parents 31cd3d9 + d52905c commit 5ea4e17
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions cobbler/resource_cobbler_distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ func resourceDistro() *schema.Resource {
"breed": {
Description: "The \"breed\" of distribution. Valid options are: redhat, fedora, centos, scientific linux, suse, debian, and ubuntu. These choices may vary depending on the version of Cobbler in use.",
Type: schema.TypeString,
Required: true,
Optional: true,
Computed: true,
},
"boot_files": {
Description: "Files copied into tftpboot beyond the kernel/initrd.",
Expand Down Expand Up @@ -137,7 +138,8 @@ func resourceDistro() *schema.Resource {
"os_version": {
Description: "The version of the distro you are creating. This varies with the version of Cobbler you are using. An updated signature list may need to be obtained in order to support a newer version. Example: `focal`.",
Type: schema.TypeString,
Required: true,
Optional: true,
Computed: true,
},
"owners": {
Description: "Owners list for authz_ownership.",
Expand Down
3 changes: 2 additions & 1 deletion cobbler/resource_cobbler_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ func resourceRepo() *schema.Resource {
"breed": {
Description: "The \"breed\" of distribution. Valid options are: rsync, rhn, yum, apt, and wget. These choices may vary depending on the version of Cobbler in use.",
Type: schema.TypeString,
Required: true,
Optional: true,
Computed: true,
},
"comment": {
Description: "Free form text description.",
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/distro.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ resource "cobbler_distro" "Ubuntu-2004-x86_64" {

### Required

- `breed` (String) The "breed" of distribution. Valid options are: redhat, fedora, centos, scientific linux, suse, debian, and ubuntu. These choices may vary depending on the version of Cobbler in use.
- `initrd` (String) Absolute path to initrd on filesystem. This must already exist prior to creating the distro.
- `kernel` (String) Absolute path to kernel on filesystem. This must already exist prior to creating the distro.
- `name` (String) A name for the distro.
- `os_version` (String) The version of the distro you are creating. This varies with the version of Cobbler you are using. An updated signature list may need to be obtained in order to support a newer version. Example: `focal`.

### Optional

Expand All @@ -41,6 +39,7 @@ resource "cobbler_distro" "Ubuntu-2004-x86_64" {
- `boot_files_inherit` (Boolean) Signal that boot_files should be set to inherit from its parent
- `boot_loaders` (List of String) Must be either 'grub', 'pxe', or 'ipxe'.
- `boot_loaders_inherit` (Boolean) Signal that boot_loaders should be set to inherit from its parent
- `breed` (String) The "breed" of distribution. Valid options are: redhat, fedora, centos, scientific linux, suse, debian, and ubuntu. These choices may vary depending on the version of Cobbler in use.
- `comment` (String) Free form text description.
- `fetchable_files` (Map of String) Templates for tftp or wget.
- `fetchable_files_inherit` (Boolean) Signal that fetchable_files should be set to inherit from its parent
Expand All @@ -50,6 +49,7 @@ resource "cobbler_distro" "Ubuntu-2004-x86_64" {
- `kernel_options_post_inherit` (Boolean) Signal that kernel_options_post should be set to inherit from its parent
- `mgmt_classes` (List of String) Management classes for external config management.
- `mgmt_classes_inherit` (Boolean) Signal that mgmt_classes should be set to inherit from its parent
- `os_version` (String) The version of the distro you are creating. This varies with the version of Cobbler you are using. An updated signature list may need to be obtained in order to support a newer version. Example: `focal`.
- `owners` (List of String) Owners list for authz_ownership.
- `owners_inherit` (Boolean) Signal that owners should be set to inherit from its parent
- `template_files` (Map of String) File mappings for built-in config management.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ resource "cobbler_repo" "my_repo" {

### Required

- `breed` (String) The "breed" of distribution. Valid options are: rsync, rhn, yum, apt, and wget. These choices may vary depending on the version of Cobbler in use.
- `mirror` (String) Address of the repo to mirror.
- `name` (String) A name for the repo.

Expand All @@ -37,6 +36,7 @@ resource "cobbler_repo" "my_repo" {
- `apt_components` (List of String) List of Apt components such as main, restricted, universe. Applicable to apt breeds only.
- `apt_dists` (List of String) List of Apt distribution names such as focal, focal-updates. Applicable to apt breeds only.
- `arch` (String) The architecture of the repo. Valid options are: i386, x86_64, ia64, ppc, ppc64, s390, arm.
- `breed` (String) The "breed" of distribution. Valid options are: rsync, rhn, yum, apt, and wget. These choices may vary depending on the version of Cobbler in use.
- `comment` (String) Free form text description.
- `createrepo_flags` (String) Flags to use with `createrepo`.
- `createrepo_flags_inherit` (Boolean) Signal that createrepo_flags should be set to inherit from its parent
Expand Down

0 comments on commit 5ea4e17

Please sign in to comment.