pulumi-null 0.0.3a1710157610__py3-none-any.whl → 0.1.0a1715061333__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_null/resource.py +50 -0
- {pulumi_null-0.0.3a1710157610.dist-info → pulumi_null-0.1.0a1715061333.dist-info}/METADATA +1 -1
- {pulumi_null-0.0.3a1710157610.dist-info → pulumi_null-0.1.0a1715061333.dist-info}/RECORD +5 -5
- {pulumi_null-0.0.3a1710157610.dist-info → pulumi_null-0.1.0a1715061333.dist-info}/WHEEL +1 -1
- {pulumi_null-0.0.3a1710157610.dist-info → pulumi_null-0.1.0a1715061333.dist-info}/top_level.txt +0 -0
pulumi_null/resource.py
CHANGED
|
@@ -69,6 +69,31 @@ class Resource(pulumi.CustomResource):
|
|
|
69
69
|
"""
|
|
70
70
|
## Example Usage
|
|
71
71
|
|
|
72
|
+
```python
|
|
73
|
+
import pulumi
|
|
74
|
+
import pulumi_aws as aws
|
|
75
|
+
import pulumi_null as null
|
|
76
|
+
import pulumi_std as std
|
|
77
|
+
|
|
78
|
+
cluster = []
|
|
79
|
+
for range in [{"value": i} for i in range(0, 3)]:
|
|
80
|
+
cluster.append(aws.index.Instance(f"cluster-{range['value']}",
|
|
81
|
+
ami=ami-0dcc1e21636832c5d,
|
|
82
|
+
instance_type=m5.large))
|
|
83
|
+
# The primary use-case for the null resource is as a do-nothing container
|
|
84
|
+
# for arbitrary actions taken by a provisioner.
|
|
85
|
+
#
|
|
86
|
+
# In this example, three EC2 instances are created and then a
|
|
87
|
+
# null_resource instance is used to gather data about all three
|
|
88
|
+
# and execute a single action that affects them all. Due to the triggers
|
|
89
|
+
# map, the null_resource will be replaced each time the instance ids
|
|
90
|
+
# change, and thus the remote-exec provisioner will be re-run.
|
|
91
|
+
cluster_resource = null.Resource("cluster", triggers={
|
|
92
|
+
"cluster_instance_ids": std.join(separator=",",
|
|
93
|
+
input=[__item["id"] for __item in cluster]).result,
|
|
94
|
+
})
|
|
95
|
+
```
|
|
96
|
+
|
|
72
97
|
:param str resource_name: The name of the resource.
|
|
73
98
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
74
99
|
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.
|
|
@@ -82,6 +107,31 @@ class Resource(pulumi.CustomResource):
|
|
|
82
107
|
"""
|
|
83
108
|
## Example Usage
|
|
84
109
|
|
|
110
|
+
```python
|
|
111
|
+
import pulumi
|
|
112
|
+
import pulumi_aws as aws
|
|
113
|
+
import pulumi_null as null
|
|
114
|
+
import pulumi_std as std
|
|
115
|
+
|
|
116
|
+
cluster = []
|
|
117
|
+
for range in [{"value": i} for i in range(0, 3)]:
|
|
118
|
+
cluster.append(aws.index.Instance(f"cluster-{range['value']}",
|
|
119
|
+
ami=ami-0dcc1e21636832c5d,
|
|
120
|
+
instance_type=m5.large))
|
|
121
|
+
# The primary use-case for the null resource is as a do-nothing container
|
|
122
|
+
# for arbitrary actions taken by a provisioner.
|
|
123
|
+
#
|
|
124
|
+
# In this example, three EC2 instances are created and then a
|
|
125
|
+
# null_resource instance is used to gather data about all three
|
|
126
|
+
# and execute a single action that affects them all. Due to the triggers
|
|
127
|
+
# map, the null_resource will be replaced each time the instance ids
|
|
128
|
+
# change, and thus the remote-exec provisioner will be re-run.
|
|
129
|
+
cluster_resource = null.Resource("cluster", triggers={
|
|
130
|
+
"cluster_instance_ids": std.join(separator=",",
|
|
131
|
+
input=[__item["id"] for __item in cluster]).result,
|
|
132
|
+
})
|
|
133
|
+
```
|
|
134
|
+
|
|
85
135
|
:param str resource_name: The name of the resource.
|
|
86
136
|
:param ResourceArgs args: The arguments to use to populate this resource's properties.
|
|
87
137
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -4,8 +4,8 @@ pulumi_null/get_data_source.py,sha256=fAZn0ddoCFmZnWkky1nvISA_xZCtWRzXHvmQHee9g5
|
|
|
4
4
|
pulumi_null/provider.py,sha256=SLc7l69q4BwAiTTj6UutzTFplKhivhcTH8x06xaqsuM,3414
|
|
5
5
|
pulumi_null/pulumi-plugin.json,sha256=xKWQ3pWIFdx8ao-qagk5twTTzey4mlMpszE1QbEoV9s,41
|
|
6
6
|
pulumi_null/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
pulumi_null/resource.py,sha256=
|
|
8
|
-
pulumi_null-0.
|
|
9
|
-
pulumi_null-0.
|
|
10
|
-
pulumi_null-0.
|
|
11
|
-
pulumi_null-0.
|
|
7
|
+
pulumi_null/resource.py,sha256=ozZbh7enU3dEorIF4ztQH4hc6P2v4EWdKCjbPVqK4p0,8640
|
|
8
|
+
pulumi_null-0.1.0a1715061333.dist-info/METADATA,sha256=DzZmLjJgNLkxRqVuKaNpdBKDTydK17umM6oB1EJ7-pI,2774
|
|
9
|
+
pulumi_null-0.1.0a1715061333.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
10
|
+
pulumi_null-0.1.0a1715061333.dist-info/top_level.txt,sha256=Ru9dJEzD8mCrozV4N2VCSavoQqMS9aa8gq-PLsirmtc,12
|
|
11
|
+
pulumi_null-0.1.0a1715061333.dist-info/RECORD,,
|
{pulumi_null-0.0.3a1710157610.dist-info → pulumi_null-0.1.0a1715061333.dist-info}/top_level.txt
RENAMED
|
File without changes
|