pulumi-null 0.0.4a1712988544__py3-none-any.whl → 0.0.4a1713561652__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 CHANGED
@@ -69,6 +69,33 @@ class Resource(pulumi.CustomResource):
69
69
  """
70
70
  ## Example Usage
71
71
 
72
+ <!--Start PulumiCodeChooser -->
73
+ ```python
74
+ import pulumi
75
+ import pulumi_aws as aws
76
+ import pulumi_null as null
77
+ import pulumi_std as std
78
+
79
+ cluster = []
80
+ for range in [{"value": i} for i in range(0, 3)]:
81
+ cluster.append(aws.index.Instance(f"cluster-{range['value']}",
82
+ ami=ami-0dcc1e21636832c5d,
83
+ instance_type=m5.large))
84
+ # The primary use-case for the null resource is as a do-nothing container
85
+ # for arbitrary actions taken by a provisioner.
86
+ #
87
+ # In this example, three EC2 instances are created and then a
88
+ # null_resource instance is used to gather data about all three
89
+ # and execute a single action that affects them all. Due to the triggers
90
+ # map, the null_resource will be replaced each time the instance ids
91
+ # change, and thus the remote-exec provisioner will be re-run.
92
+ cluster_resource = null.Resource("cluster", triggers={
93
+ "cluster_instance_ids": std.join(separator=",",
94
+ input=[__item["id"] for __item in cluster]).result,
95
+ })
96
+ ```
97
+ <!--End PulumiCodeChooser -->
98
+
72
99
  :param str resource_name: The name of the resource.
73
100
  :param pulumi.ResourceOptions opts: Options for the resource.
74
101
  :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 +109,33 @@ class Resource(pulumi.CustomResource):
82
109
  """
83
110
  ## Example Usage
84
111
 
112
+ <!--Start PulumiCodeChooser -->
113
+ ```python
114
+ import pulumi
115
+ import pulumi_aws as aws
116
+ import pulumi_null as null
117
+ import pulumi_std as std
118
+
119
+ cluster = []
120
+ for range in [{"value": i} for i in range(0, 3)]:
121
+ cluster.append(aws.index.Instance(f"cluster-{range['value']}",
122
+ ami=ami-0dcc1e21636832c5d,
123
+ instance_type=m5.large))
124
+ # The primary use-case for the null resource is as a do-nothing container
125
+ # for arbitrary actions taken by a provisioner.
126
+ #
127
+ # In this example, three EC2 instances are created and then a
128
+ # null_resource instance is used to gather data about all three
129
+ # and execute a single action that affects them all. Due to the triggers
130
+ # map, the null_resource will be replaced each time the instance ids
131
+ # change, and thus the remote-exec provisioner will be re-run.
132
+ cluster_resource = null.Resource("cluster", triggers={
133
+ "cluster_instance_ids": std.join(separator=",",
134
+ input=[__item["id"] for __item in cluster]).result,
135
+ })
136
+ ```
137
+ <!--End PulumiCodeChooser -->
138
+
85
139
  :param str resource_name: The name of the resource.
86
140
  :param ResourceArgs args: The arguments to use to populate this resource's properties.
87
141
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulumi_null
3
- Version: 0.0.4a1712988544
3
+ Version: 0.0.4a1713561652
4
4
  Summary: A Pulumi package for creating and managing Null cloud resources.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://www.pulumi.com/
@@ -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=vATwG6DXcpyvSiNvCdVvP3IIKF8GfJx0gyDmDdmdA7s,6412
8
- pulumi_null-0.0.4a1712988544.dist-info/METADATA,sha256=YmsFHsEmPkTHwwVR0410kaH00jKoYApt1_jq--DKVhs,2774
9
- pulumi_null-0.0.4a1712988544.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10
- pulumi_null-0.0.4a1712988544.dist-info/top_level.txt,sha256=Ru9dJEzD8mCrozV4N2VCSavoQqMS9aa8gq-PLsirmtc,12
11
- pulumi_null-0.0.4a1712988544.dist-info/RECORD,,
7
+ pulumi_null/resource.py,sha256=-Y4kC4de__wFmGDtPyY67giWYeYBhYgObcvlKv8SkFQ,8796
8
+ pulumi_null-0.0.4a1713561652.dist-info/METADATA,sha256=BbgaE6pEY8gCOb-Pgy8tUGDKIIjnvGGeY6NkTejbEig,2774
9
+ pulumi_null-0.0.4a1713561652.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10
+ pulumi_null-0.0.4a1713561652.dist-info/top_level.txt,sha256=Ru9dJEzD8mCrozV4N2VCSavoQqMS9aa8gq-PLsirmtc,12
11
+ pulumi_null-0.0.4a1713561652.dist-info/RECORD,,