pulumi/pkg/resource
Joe Duffy bc2cf55463
Implement resource protection (#751)
This change implements resource protection, as per pulumi/pulumi#689.
The overall idea is that a resource can be marked as "protect: true",
which will prevent deletion of that resource for any reason whatsoever
(straight deletion, replacement, etc).  This is expressed in the
program.  To "unprotect" a resource, one must perform an update setting
"protect: false", and then afterwards, they can delete the resource.

For example:

    let res = new MyResource("precious", { .. }, { protect: true });

Afterwards, the resource will display in the CLI with a lock icon, and
any attempts to remove it will fail in the usual ways (in planning or,
worst case, during an actual update).

This was done by adding a new ResourceOptions bag parameter to the
base Resource types.  This is unfortunately a breaking change, but now
is the right time to take this one.  We had been adding new settings
one by one -- like parent and dependsOn -- and this new approach will
set us up to add any number of additional settings down the road,
without needing to worry about breaking anything ever again.

This is related to protected stacks, as described in
pulumi/pulumi-service#399.  Most likely this will serve as a foundational
building block that enables the coarser grained policy management.
2017-12-20 14:31:07 -08:00
..
config Decrypt configuration nearer to its use. 2017-12-04 17:10:40 -08:00
deploy Implement resource protection (#751) 2017-12-20 14:31:07 -08:00
idl Bring LUMIDL up to code 2017-09-11 16:58:25 -07:00
plugin Add more tracing context to RPC marshaling 2017-12-15 07:22:49 -08:00
provider Initial work on tracing support (#521) 2017-11-08 17:08:51 -08:00
stack Implement resource protection (#751) 2017-12-20 14:31:07 -08:00
testdata Fix asset bugs; write more tests 2017-10-24 09:00:11 -07:00
asset.go Close assets while creating ZIP archives. 2017-12-12 10:38:27 -08:00
asset_test.go Close assets while creating ZIP archives. 2017-12-12 10:38:27 -08:00
errors.go Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
properties.go Merge branch 'master' of github.com:pulumi/pulumi into resource_parenting_lite 2017-11-29 08:16:38 -08:00
properties_diff.go Add diffing logic for assets/archives 2017-07-17 12:11:15 -07:00
properties_diff_test.go Rework asset identity and exposure of old assets. (#548) 2017-11-12 11:45:13 -08:00
properties_test.go Tolerate computed and output properties 2017-08-03 11:01:38 -07:00
resource_goal.go Implement resource protection (#751) 2017-12-20 14:31:07 -08:00
resource_id.go Reparameterize NewUniqueHex/ID 2017-12-10 07:44:11 -08:00
resource_id_test.go Reparameterize NewUniqueHex/ID 2017-12-10 07:44:11 -08:00
resource_state.go Implement resource protection (#751) 2017-12-20 14:31:07 -08:00
stack.go Elide the root stack in parent URNs 2017-12-05 13:41:26 -08:00
status.go Wire up Lumi to the new runtime strategy 2017-09-04 11:35:21 -07:00
urn.go Always add 8 chars of randomness to URN names we create. Error if that exceeds the max length allowed for that resource. (#500) 2017-12-04 14:50:55 -08:00
urn_test.go Always add 8 chars of randomness to URN names we create. Error if that exceeds the max length allowed for that resource. (#500) 2017-12-04 14:50:55 -08:00