forked from juju/terraform-provider-juju
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add info on which schema attributes will cause delete create
Add to the schema attribute descriptions which changes will cause terraform to destroy and recreate a resource.
- Loading branch information
Showing
14 changed files
with
100 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,19 +26,19 @@ resource "juju_machine" "this_machine" { | |
|
||
### Required | ||
|
||
- `model` (String) The Juju model in which to add a new machine. | ||
- `model` (String) The Juju model in which to add a new machine. Changing this value will cause the machine to be destroyed and recreated by terraform. | ||
|
||
### Optional | ||
|
||
- `base` (String) The operating system to install on the new machine(s). E.g. [email protected]. | ||
- `constraints` (String) Machine constraints that overwrite those available from 'juju get-model-constraints' and provider's defaults. | ||
- `disks` (String) Storage constraints for disks to attach to the machine(s). | ||
- `base` (String) The operating system to install on the new machine(s). E.g. [email protected]. Changing this value will cause the machine to be destroyed and recreated by terraform. | ||
- `constraints` (String) Machine constraints that overwrite those available from 'juju get-model-constraints' and provider's defaults. Changing this value will cause the application to be destroyed and recreated by terraform. | ||
- `disks` (String) Storage constraints for disks to attach to the machine(s). Changing this value will cause the machine to be destroyed and recreated by terraform. | ||
- `name` (String) A name for the machine resource in Terraform. | ||
- `placement` (String) Additional information about how to allocate the machine in the cloud. | ||
- `placement` (String) Additional information about how to allocate the machine in the cloud. Changing this value will cause the application to be destroyed and recreated by terraform. | ||
- `private_key_file` (String) The file path to read the private key from. | ||
- `public_key_file` (String) The file path to read the public key from. | ||
- `series` (String, Deprecated) The operating system series to install on the new machine(s). | ||
- `ssh_address` (String) The user@host directive for manual provisioning an existing machine via ssh. Requires public_key_file & private_key_file arguments. | ||
- `series` (String, Deprecated) The operating system series to install on the new machine(s). Changing this value will cause the machine to be destroyed and recreated by terraform. | ||
- `ssh_address` (String) The user@host directive for manual provisioning an existing machine via ssh. Requires public_key_file & private_key_file arguments. Changing this value will cause the machine to be destroyed and recreated by terraform. | ||
|
||
### Read-Only | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,15 +109,18 @@ func (r *machineResource) Schema(_ context.Context, req resource.SchemaRequest, | |
}, | ||
}, | ||
ModelKey: schema.StringAttribute{ | ||
Description: "The Juju model in which to add a new machine.", | ||
Required: true, | ||
Description: "The Juju model in which to add a new machine. Changing this value will cause the machine" + | ||
" to be destroyed and recreated by terraform.", | ||
Required: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.RequiresReplace(), | ||
}, | ||
}, | ||
ConstraintsKey: schema.StringAttribute{ | ||
Description: "Machine constraints that overwrite those available from 'juju get-model-constraints' and provider's defaults.", | ||
Optional: true, | ||
Description: "Machine constraints that overwrite those available from 'juju get-model-constraints' " + | ||
"and provider's defaults. Changing this value will cause the application to be destroyed and" + | ||
" recreated by terraform.", | ||
Optional: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.RequiresReplaceIfConfigured(), | ||
}, | ||
|
@@ -128,8 +131,9 @@ func (r *machineResource) Schema(_ context.Context, req resource.SchemaRequest, | |
}, | ||
}, | ||
DisksKey: schema.StringAttribute{ | ||
Description: "Storage constraints for disks to attach to the machine(s).", | ||
Optional: true, | ||
Description: "Storage constraints for disks to attach to the machine(s). Changing this" + | ||
" value will cause the machine to be destroyed and recreated by terraform.", | ||
Optional: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.RequiresReplaceIfConfigured(), | ||
}, | ||
|
@@ -140,9 +144,10 @@ func (r *machineResource) Schema(_ context.Context, req resource.SchemaRequest, | |
}, | ||
}, | ||
BaseKey: schema.StringAttribute{ | ||
Description: "The operating system to install on the new machine(s). E.g. [email protected].", | ||
Optional: true, | ||
Computed: true, | ||
Description: "The operating system to install on the new machine(s). E.g. [email protected]. Changing this" + | ||
" value will cause the machine to be destroyed and recreated by terraform.", | ||
Optional: true, | ||
Computed: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.RequiresReplaceIfConfigured(), | ||
stringplanmodifier.UseStateForUnknown(), | ||
|
@@ -156,9 +161,10 @@ func (r *machineResource) Schema(_ context.Context, req resource.SchemaRequest, | |
}, | ||
}, | ||
SeriesKey: schema.StringAttribute{ | ||
Description: "The operating system series to install on the new machine(s).", | ||
Optional: true, | ||
Computed: true, | ||
Description: "The operating system series to install on the new machine(s). Changing this value" + | ||
" will cause the machine to be destroyed and recreated by terraform.", | ||
Optional: true, | ||
Computed: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.RequiresReplaceIfConfigured(), | ||
stringplanmodifier.UseStateForUnknown(), | ||
|
@@ -169,11 +175,13 @@ func (r *machineResource) Schema(_ context.Context, req resource.SchemaRequest, | |
path.MatchRoot(BaseKey), | ||
}...), | ||
}, | ||
DeprecationMessage: "Configure base instead. This attribute will be removed in the next major version of the provider.", | ||
DeprecationMessage: "Configure base instead. This attribute will be removed in the next" + | ||
" major version of the provider.", | ||
}, | ||
PlacementKey: schema.StringAttribute{ | ||
Description: "Additional information about how to allocate the machine in the cloud.", | ||
Optional: true, | ||
Description: "Additional information about how to allocate the machine in the cloud. Changing" + | ||
" this value will cause the application to be destroyed and recreated by terraform.", | ||
Optional: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.RequiresReplaceIfConfigured(), | ||
stringplanmodifier.UseStateForUnknown(), | ||
|
@@ -192,7 +200,8 @@ func (r *machineResource) Schema(_ context.Context, req resource.SchemaRequest, | |
}, | ||
SSHAddressKey: schema.StringAttribute{ | ||
Description: "The user@host directive for manual provisioning an existing machine via ssh. " + | ||
"Requires public_key_file & private_key_file arguments.", | ||
"Requires public_key_file & private_key_file arguments. Changing this value will cause the" + | ||
" machine to be destroyed and recreated by terraform.", | ||
Optional: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.RequiresReplaceIfConfigured(), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.