diff --git a/docs/resources/cluster.md b/docs/resources/cluster.md index f8fe6b6..2cdbaa1 100644 --- a/docs/resources/cluster.md +++ b/docs/resources/cluster.md @@ -138,7 +138,7 @@ Required: Optional: - `args` (List of String) Arguments to pass to the command when executing it. -- `env` (Map of String) Defines environment variables to expose to the process. +- `env` (Map of String) Defines environment variables to expose to the process. @@ -186,7 +186,7 @@ Required: Optional: - `args` (List of String) Arguments to pass to the command when executing it. -- `env` (Map of String) Defines environment variables to expose to the process. +- `env` (Map of String) Defines environment variables to expose to the process. diff --git a/docs/resources/infrastructure_stack.md b/docs/resources/infrastructure_stack.md new file mode 100644 index 0000000..d01dd80 --- /dev/null +++ b/docs/resources/infrastructure_stack.md @@ -0,0 +1,136 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "plural_infrastructure_stack Resource - terraform-provider-plural" +subcategory: "" +description: |- + +--- + +# plural_infrastructure_stack (Resource) + + + + + + +## Schema + +### Required + +- `cluster_id` (String) The cluster on which the stack will be applied. +- `configuration` (Attributes) Stack configuration. (see [below for nested schema](#nestedatt--configuration)) +- `name` (String) Human-readable name of this stack. +- `repository` (Attributes) Repository information used to pull stack. (see [below for nested schema](#nestedatt--repository)) +- `type` (String) A type for the stack, specifies the tool to use to apply it. Allowed values include `ANSIBLE` and `TERRAFORM`. + +### Optional + +- `approval` (Boolean) Determines whether to require approval. +- `bindings` (Attributes) Read and write policies of this stack. (see [below for nested schema](#nestedatt--bindings)) +- `environment` (Attributes Set) Defines environment variables for the stack. (see [below for nested schema](#nestedatt--environment)) +- `files` (Map of String) File path-content map. +- `job_spec` (Attributes) Repository information used to pull stack. (see [below for nested schema](#nestedatt--job_spec)) + +### Read-Only + +- `id` (String) Internal identifier of this stack. + + +### Nested Schema for `configuration` + +Required: + +- `version` (String) The semver of the tool you wish to use. + +Optional: + +- `image` (String) Optional custom image you might want to use. + + + +### Nested Schema for `repository` + +Required: + +- `folder` (String) The folder where manifests live. +- `id` (String) ID of the repository to pull from. +- `ref` (String) A general git ref, either a branch name or commit sha understandable by "git checkout ". + + + +### Nested Schema for `bindings` + +Optional: + +- `read` (Attributes Set) Read policies of this stack. (see [below for nested schema](#nestedatt--bindings--read)) +- `write` (Attributes Set) Write policies of this stack. (see [below for nested schema](#nestedatt--bindings--write)) + + +### Nested Schema for `bindings.read` + +Optional: + +- `group_id` (String) +- `id` (String) +- `user_id` (String) + + + +### Nested Schema for `bindings.write` + +Optional: + +- `group_id` (String) +- `id` (String) +- `user_id` (String) + + + + +### Nested Schema for `environment` + +Required: + +- `name` (String) Environment variable name. +- `value` (String) Environment variable value. + +Optional: + +- `secret` (Boolean) Indicates if environment variable is secret. + + + +### Nested Schema for `job_spec` + +Required: + +- `namespace` (String) Namespace where job will be deployed. + +Optional: + +- `annotations` (Map of String) Kubernetes annotations applied to the job. +- `containers` (Attributes Set) (see [below for nested schema](#nestedatt--job_spec--containers)) +- `labels` (Map of String) Kubernetes labels applied to the job. +- `raw` (String) If you'd rather define the job spec via straight Kubernetes YAML. +- `service_account` (String) Kubernetes service account for this job. + + +### Nested Schema for `job_spec.containers` + +Required: + +- `image` (String) + +Optional: + +- `args` (Set of String) Arguments to pass to the command when executing it. +- `env` (Map of String) Defines environment variables to expose to the process. +- `env_from` (Attributes Set) (see [below for nested schema](#nestedatt--job_spec--containers--env_from)) + + +### Nested Schema for `job_spec.containers.env_from` + +Required: + +- `config_map` (String) +- `secret` (String) diff --git a/internal/resource/infrastructure_stack_schema.go b/internal/resource/infrastructure_stack_schema.go index 244b275..a28c2b2 100644 --- a/internal/resource/infrastructure_stack_schema.go +++ b/internal/resource/infrastructure_stack_schema.go @@ -8,7 +8,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" @@ -42,7 +41,6 @@ func (r *InfrastructureStackResource) schema() schema.Schema { Description: "Determines whether to require approval.", MarkdownDescription: "Determines whether to require approval.", Optional: true, - Default: booldefault.StaticBool(false), }, "cluster_id": schema.StringAttribute{ Description: "The cluster on which the stack will be applied.", @@ -114,7 +112,6 @@ func (r *InfrastructureStackResource) schema() schema.Schema { Description: "Indicates if environment variable is secret.", MarkdownDescription: "Indicates if environment variable is secret.", Optional: true, - Default: booldefault.StaticBool(false), }, }, },