Skip to content

Commit

Permalink
feat: sync with tf provider v1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Anaya committed Jul 6, 2022
1 parent c53e293 commit c200aa1
Show file tree
Hide file tree
Showing 13 changed files with 135 additions and 70 deletions.
9 changes: 3 additions & 6 deletions provider/cmd/pulumi-resource-checkly/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,7 @@
"alertSettings",
"apiCheckDefaults",
"concurrency",
"locations",
"name",
"privateLocations"
"name"
],
"inputProperties": {
"activated": {
Expand Down Expand Up @@ -1598,9 +1596,7 @@
},
"requiredInputs": [
"activated",
"concurrency",
"locations",
"privateLocations"
"concurrency"
],
"stateInputs": {
"description": "Input properties used for looking up and filtering CheckGroup resources.\n",
Expand Down Expand Up @@ -2005,6 +2001,7 @@
}
},
"checkly:index/privateLocation:PrivateLocation": {
"description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as checkly from \"@pulumi/checkly\";\n\n// Simple Private Location example\nconst location = new checkly.PrivateLocation(\"location\", {\n icon: \"location\",\n slugName: \"new-private-location\",\n});\n```\n```python\nimport pulumi\nimport pulumi_checkly as checkly\n\n# Simple Private Location example\nlocation = checkly.PrivateLocation(\"location\",\n icon=\"location\",\n slug_name=\"new-private-location\")\n```\n```csharp\nusing Pulumi;\nusing Checkly = Pulumi.Checkly;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n // Simple Private Location example\n var location = new Checkly.PrivateLocation(\"location\", new Checkly.PrivateLocationArgs\n {\n Icon = \"location\",\n SlugName = \"new-private-location\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/checkly/pulumi-checkly/sdk/go/checkly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := checkly.NewPrivateLocation(ctx, \"location\", \u0026checkly.PrivateLocationArgs{\n\t\t\tIcon: pulumi.String(\"location\"),\n\t\t\tSlugName: pulumi.String(\"new-private-location\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n{{% /example %}}\n{{% /examples %}}",
"properties": {
"icon": {
"type": "string",
Expand Down
3 changes: 1 addition & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ module github.com/checkly/pulumi-checkly/provider
go 1.16

replace (
// github.com/checkly/terraform-provider-checkly v1.4.2 => ../../terraform-provider-checkly
github.com/hashicorp/go-getter v1.5.0 => github.com/hashicorp/go-getter v1.4.0
github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20210629210550-59d24255d71f
)

require (
github.com/checkly/terraform-provider-checkly v1.6.0-rc1
github.com/checkly/terraform-provider-checkly v1.6.1
github.com/hashicorp/terraform-plugin-sdk v1.9.1 // indirect
github.com/pulumi/pulumi-terraform-bridge/v3 v3.19.3
github.com/pulumi/pulumi/sdk/v3 v3.25.0
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/checkly/checkly-go-sdk v1.6.1 h1:R504wAr5hjqYCnEiU25UOW9v5l7N9cMF6izbmg36uA4=
github.com/checkly/checkly-go-sdk v1.6.1/go.mod h1:a1I5B287Fd06TL1C+V/9szb3ZU4+0Di100Zn8h+CDgg=
github.com/checkly/terraform-provider-checkly v1.6.0-rc1 h1:fD6Ngh+9Ri0FrozE2yKLDTy7pcVoOO+IU1Jjltm9cdg=
github.com/checkly/terraform-provider-checkly v1.6.0-rc1/go.mod h1:8uka+24KgQ/syQcF3Xu+Jdv1qeMsdgl/klVp28OK/mA=
github.com/checkly/terraform-provider-checkly v1.6.1 h1:LJe8BGj2jA0y+67QMpDZM99shD6Jr0/Dz0bJvuHLf2g=
github.com/checkly/terraform-provider-checkly v1.6.1/go.mod h1:8uka+24KgQ/syQcF3Xu+Jdv1qeMsdgl/klVp28OK/mA=
github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
github.com/cheggaaa/pb v1.0.18/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc=
Expand Down
4 changes: 2 additions & 2 deletions sdk/dotnet/CheckGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public InputMap<object> EnvironmentVariables
[Input("localTeardownScript")]
public Input<string>? LocalTeardownScript { get; set; }

[Input("locations", required: true)]
[Input("locations")]
private InputList<string>? _locations;

/// <summary>
Expand All @@ -380,7 +380,7 @@ public InputList<string> Locations
[Input("name")]
public Input<string>? Name { get; set; }

[Input("privateLocations", required: true)]
[Input("privateLocations")]
private InputList<string>? _privateLocations;

/// <summary>
Expand Down
22 changes: 22 additions & 0 deletions sdk/dotnet/PrivateLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@

namespace Pulumi.Checkly
{
/// <summary>
/// ## Example Usage
///
/// ```csharp
/// using Pulumi;
/// using Checkly = Pulumi.Checkly;
///
/// class MyStack : Stack
/// {
/// public MyStack()
/// {
/// // Simple Private Location example
/// var location = new Checkly.PrivateLocation("location", new Checkly.PrivateLocationArgs
/// {
/// Icon = "location",
/// SlugName = "new-private-location",
/// });
/// }
///
/// }
/// ```
/// </summary>
[ChecklyResourceType("checkly:index/privateLocation:PrivateLocation")]
public partial class PrivateLocation : Pulumi.CustomResource
{
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.1.1
6 changes: 0 additions & 6 deletions sdk/go/checkly/checkGroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,6 @@ func NewCheckGroup(ctx *pulumi.Context,
if args.Concurrency == nil {
return nil, errors.New("invalid value for required argument 'Concurrency'")
}
if args.Locations == nil {
return nil, errors.New("invalid value for required argument 'Locations'")
}
if args.PrivateLocations == nil {
return nil, errors.New("invalid value for required argument 'PrivateLocations'")
}
if args.ApiCheckDefaults != nil {
args.ApiCheckDefaults = args.ApiCheckDefaults.ToCheckGroupApiCheckDefaultsPtrOutput().ApplyT(func(v *CheckGroupApiCheckDefaults) *CheckGroupApiCheckDefaults { return v.Defaults() }).(CheckGroupApiCheckDefaultsPtrOutput)
}
Expand Down
23 changes: 23 additions & 0 deletions sdk/go/checkly/privateLocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,29 @@ import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/checkly/pulumi-checkly/sdk/go/checkly"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := checkly.NewPrivateLocation(ctx, "location", &checkly.PrivateLocationArgs{
// Icon: pulumi.String("location"),
// SlugName: pulumi.String("new-private-location"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
type PrivateLocation struct {
pulumi.CustomResourceState

Expand Down
14 changes: 4 additions & 10 deletions sdk/nodejs/checkGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class CheckGroup extends pulumi.CustomResource {
/**
* An array of one or more data center locations where to run the checks.
*/
public readonly locations!: pulumi.Output<string[]>;
public readonly locations!: pulumi.Output<string[] | undefined>;
/**
* Determines if any notifications will be sent out when a check in this group fails and/or recovers.
*/
Expand All @@ -165,7 +165,7 @@ export class CheckGroup extends pulumi.CustomResource {
/**
* An array of one or more private locations slugs.
*/
public readonly privateLocations!: pulumi.Output<string[]>;
public readonly privateLocations!: pulumi.Output<string[] | undefined>;
/**
* The id of the runtime to use for this group.
*/
Expand Down Expand Up @@ -226,12 +226,6 @@ export class CheckGroup extends pulumi.CustomResource {
if ((!args || args.concurrency === undefined) && !opts.urn) {
throw new Error("Missing required property 'concurrency'");
}
if ((!args || args.locations === undefined) && !opts.urn) {
throw new Error("Missing required property 'locations'");
}
if ((!args || args.privateLocations === undefined) && !opts.urn) {
throw new Error("Missing required property 'privateLocations'");
}
resourceInputs["activated"] = args ? args.activated : undefined;
resourceInputs["alertChannelSubscriptions"] = args ? args.alertChannelSubscriptions : undefined;
resourceInputs["alertSettings"] = args ? args.alertSettings : undefined;
Expand Down Expand Up @@ -363,7 +357,7 @@ export interface CheckGroupArgs {
/**
* An array of one or more data center locations where to run the checks.
*/
locations: pulumi.Input<pulumi.Input<string>[]>;
locations?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Determines if any notifications will be sent out when a check in this group fails and/or recovers.
*/
Expand All @@ -375,7 +369,7 @@ export interface CheckGroupArgs {
/**
* An array of one or more private locations slugs.
*/
privateLocations: pulumi.Input<pulumi.Input<string>[]>;
privateLocations?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The id of the runtime to use for this group.
*/
Expand Down
14 changes: 14 additions & 0 deletions sdk/nodejs/privateLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";

/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as checkly from "@pulumi/checkly";
*
* // Simple Private Location example
* const location = new checkly.PrivateLocation("location", {
* icon: "location",
* slugName: "new-private-location",
* });
* ```
*/
export class PrivateLocation extends pulumi.CustomResource {
/**
* Get an existing PrivateLocation resource's state with the given name, ID, and optional extra
Expand Down
8 changes: 5 additions & 3 deletions sdk/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Once you generated the `API Key` there are two ways to communicate your authoriz

## Getting Started

1. Open your terminal and run `$ pulumi new` to create a new Pulumi project, chose the `javascript` template and the target stack.
1. Open your terminal and run `$ pulumi new javascript` to create a new Pulumi project with the `javascript` template.
1. Install the Checkly Pulumi provider using npm: `$ npm i @checkly/pulumi`.
1. Look for `index.js` file in the root of your project and replace content with the following code:

Expand Down Expand Up @@ -117,13 +117,15 @@ Once you generated the `API Key` there are two ways to communicate your authoriz
```
1. You are ready to go, run `$ pulumi up` to deploy your stack 🚀
> Check the [examples directory](https://github.com/checkly/pulumi-checkly/tree/main/examples) for more detailed code samples.
## Examples
Find working JavaScript and TypeScript code samples in the [`./examples`](https://github.com/checkly/pulumi-checkly/tree/main/examples) directory.
## Learn More
For documentation and example usage see:
1. [Checkly's documentation](https://www.checklyhq.com/docs/integrations/pulumi/).
2. [The official provider documentation](https://www.pulumi.com/registry/packages/checkly/api-docs/)
3. [Working Examples](https://github.com/checkly/pulumi-checkly/examples).
3. [Working Examples](https://github.com/checkly/pulumi-checkly/tree/main/examples).
## Questions
For questions and support please open a new [discussion](https://github.com/checkly/pulumi-checkly/discussions). The issue list of this repo is exclusively for bug reports and feature/docs requests.
Expand Down
Loading

0 comments on commit c200aa1

Please sign in to comment.