Skip to content

Commit

Permalink
Code generation for new mappings on fabric route filter resources and…
Browse files Browse the repository at this point in the history
… data sources with make provider
  • Loading branch information
thogarty committed Oct 22, 2024
1 parent 3754949 commit 96ca6e3
Show file tree
Hide file tree
Showing 30 changed files with 6,010 additions and 3,879 deletions.
50 changes: 43 additions & 7 deletions docs/resource/equinix_fabric_connection_route_filter.examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
{{% example %}}
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@equinix-labs/pulumi-equinix";

const policyAttachment = new equinix.fabric.ConnectionRouteFilter("policyAttachment", {
connectionId: "<connection_uuid>",
routeFilterId: "<route_filter_policy_uuid>",
direction: "INBOUND",
});
export const connectionRouteFilterId = policyAttachment.id;
export const connectionRouteFilterConnectionId = policyAttachment.connectionId;
export const connectionRouteFilterDirection = policyAttachment.direction;
Expand All @@ -11,23 +17,37 @@ export const connectionRouteFilterAttachmentStatus = policyAttachment.attachment
```
```python
import pulumi
import pulumi_equinix as equinix

pulumi.export("connectionRouteFilterId", policy_attachment["id"])
pulumi.export("connectionRouteFilterConnectionId", policy_attachment["connectionId"])
pulumi.export("connectionRouteFilterDirection", policy_attachment["direction"])
pulumi.export("connectionRouteFilterType", policy_attachment["type"])
pulumi.export("connectionRouteFilterAttachmentStatus", policy_attachment["attachmentStatus"])
policy_attachment = equinix.fabric.ConnectionRouteFilter("policyAttachment",
connection_id="<connection_uuid>",
route_filter_id="<route_filter_policy_uuid>",
direction="INBOUND")
pulumi.export("connectionRouteFilterId", policy_attachment.id)
pulumi.export("connectionRouteFilterConnectionId", policy_attachment.connection_id)
pulumi.export("connectionRouteFilterDirection", policy_attachment.direction)
pulumi.export("connectionRouteFilterType", policy_attachment.type)
pulumi.export("connectionRouteFilterAttachmentStatus", policy_attachment.attachment_status)
```
```go
package main

import (
"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ctx.Export("connectionRouteFilterId", policyAttachment.Id)
policyAttachment, err := fabric.NewConnectionRouteFilter(ctx, "policyAttachment", &fabric.ConnectionRouteFilterArgs{
ConnectionId: pulumi.String("<connection_uuid>"),
RouteFilterId: pulumi.String("<route_filter_policy_uuid>"),
Direction: pulumi.String("INBOUND"),
})
if err != nil {
return err
}
ctx.Export("connectionRouteFilterId", policyAttachment.ID())
ctx.Export("connectionRouteFilterConnectionId", policyAttachment.ConnectionId)
ctx.Export("connectionRouteFilterDirection", policyAttachment.Direction)
ctx.Export("connectionRouteFilterType", policyAttachment.Type)
Expand All @@ -40,9 +60,17 @@ func main() {
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;

return await Deployment.RunAsync(() =>
{
var policyAttachment = new Equinix.Fabric.ConnectionRouteFilter("policyAttachment", new()
{
ConnectionId = "<connection_uuid>",
RouteFilterId = "<route_filter_policy_uuid>",
Direction = "INBOUND",
});

return new Dictionary<string, object?>
{
["connectionRouteFilterId"] = policyAttachment.Id,
Expand All @@ -59,6 +87,8 @@ package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.equinix.fabric.ConnectionRouteFilter;
import com.pulumi.equinix.fabric.ConnectionRouteFilterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
Expand All @@ -72,6 +102,12 @@ public class App {
}

public static void stack(Context ctx) {
var policyAttachment = new ConnectionRouteFilter("policyAttachment", ConnectionRouteFilterArgs.builder()
.connectionId("<connection_uuid>")
.routeFilterId("<route_filter_policy_uuid>")
.direction("INBOUND")
.build());

ctx.export("connectionRouteFilterId", policyAttachment.id());
ctx.export("connectionRouteFilterConnectionId", policyAttachment.connectionId());
ctx.export("connectionRouteFilterDirection", policyAttachment.direction());
Expand All @@ -83,7 +119,7 @@ public class App {
```yaml
resources:
policyAttachment:
type: equinix:fabricConnectionRouteFilter
type: equinix:fabric:ConnectionRouteFilter
name: policy_attachment
properties:
connectionId: <connection_uuid>
Expand Down
58 changes: 52 additions & 6 deletions docs/resource/equinix_fabric_route_filter_rule.examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,56 @@
{{% example %}}
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@equinix-labs/pulumi-equinix";

const rfRule = new equinix.fabric.RouteFilterRule("rfRule", {
routeFilterId: "<route_filter_policy_id>",
name: "Route Filter Rule Name",
prefix: "192.168.0.0/24",
prefixMatch: "exact",
description: "Route Filter Rule for X Purpose",
});
export const routeFilterRuleId = rfRule.id;
export const routeFilterId = rfRule.routeFilterId;
export const routeFilterRulePrefix = rfRule.prefix;
export const routeFilterRulePrefixMatch = rfRule.prefixMatch;
```
```python
import pulumi
import pulumi_equinix as equinix

pulumi.export("routeFilterRuleId", rf_rule["id"])
pulumi.export("routeFilterId", rf_rule["routeFilterId"])
pulumi.export("routeFilterRulePrefix", rf_rule["prefix"])
pulumi.export("routeFilterRulePrefixMatch", rf_rule["prefixMatch"])
rf_rule = equinix.fabric.RouteFilterRule("rfRule",
route_filter_id="<route_filter_policy_id>",
name="Route Filter Rule Name",
prefix="192.168.0.0/24",
prefix_match="exact",
description="Route Filter Rule for X Purpose")
pulumi.export("routeFilterRuleId", rf_rule.id)
pulumi.export("routeFilterId", rf_rule.route_filter_id)
pulumi.export("routeFilterRulePrefix", rf_rule.prefix)
pulumi.export("routeFilterRulePrefixMatch", rf_rule.prefix_match)
```
```go
package main

import (
"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ctx.Export("routeFilterRuleId", rfRule.Id)
rfRule, err := fabric.NewRouteFilterRule(ctx, "rfRule", &fabric.RouteFilterRuleArgs{
RouteFilterId: pulumi.String("<route_filter_policy_id>"),
Name: pulumi.String("Route Filter Rule Name"),
Prefix: pulumi.String("192.168.0.0/24"),
PrefixMatch: pulumi.String("exact"),
Description: pulumi.String("Route Filter Rule for X Purpose"),
})
if err != nil {
return err
}
ctx.Export("routeFilterRuleId", rfRule.ID())
ctx.Export("routeFilterId", rfRule.RouteFilterId)
ctx.Export("routeFilterRulePrefix", rfRule.Prefix)
ctx.Export("routeFilterRulePrefixMatch", rfRule.PrefixMatch)
Expand All @@ -37,9 +63,19 @@ func main() {
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;

return await Deployment.RunAsync(() =>
{
var rfRule = new Equinix.Fabric.RouteFilterRule("rfRule", new()
{
RouteFilterId = "<route_filter_policy_id>",
Name = "Route Filter Rule Name",
Prefix = "192.168.0.0/24",
PrefixMatch = "exact",
Description = "Route Filter Rule for X Purpose",
});

return new Dictionary<string, object?>
{
["routeFilterRuleId"] = rfRule.Id,
Expand All @@ -55,6 +91,8 @@ package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.equinix.fabric.RouteFilterRule;
import com.pulumi.equinix.fabric.RouteFilterRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
Expand All @@ -68,6 +106,14 @@ public class App {
}

public static void stack(Context ctx) {
var rfRule = new RouteFilterRule("rfRule", RouteFilterRuleArgs.builder()
.routeFilterId("<route_filter_policy_id>")
.name("Route Filter Rule Name")
.prefix("192.168.0.0/24")
.prefixMatch("exact")
.description("Route Filter Rule for X Purpose")
.build());

ctx.export("routeFilterRuleId", rfRule.id());
ctx.export("routeFilterId", rfRule.routeFilterId());
ctx.export("routeFilterRulePrefix", rfRule.prefix());
Expand All @@ -78,7 +124,7 @@ public class App {
```yaml
resources:
rfRule:
type: equinix:fabricRouteFilterRule
type: equinix:fabric:RouteFilterRule
name: rf_rule
properties:
routeFilterId: <route_filter_policy_id>
Expand Down
2 changes: 1 addition & 1 deletion examples/fabric/connection_route_filter/Pulumi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: equinix-fabric-connection_route_filter
runtime: yaml
resources:
policyAttachment:
type: equinix:fabricConnectionRouteFilter
type: equinix:fabric:ConnectionRouteFilter
name: policy_attachment
properties:
connectionId: <connection_uuid>
Expand Down
8 changes: 8 additions & 0 deletions examples/fabric/connection_route_filter/csharp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;

return await Deployment.RunAsync(() =>
{
var policyAttachment = new Equinix.Fabric.ConnectionRouteFilter("policyAttachment", new()
{
ConnectionId = "<connection_uuid>",
RouteFilterId = "<route_filter_policy_uuid>",
Direction = "INBOUND",
});

return new Dictionary<string, object?>
{
["connectionRouteFilterId"] = policyAttachment.Id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.Equinix" Version="(, 1.0.0)" />
</ItemGroup>

</Project>
116 changes: 77 additions & 39 deletions examples/fabric/connection_route_filter/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,55 +1,93 @@
module equinix-fabric-connection_route_filter

go 1.20
go 1.21

require github.com/pulumi/pulumi/sdk/v3 v3.30.0
toolchain go1.22.6

require (
github.com/equinix/pulumi-equinix/sdk latest
github.com/pulumi/pulumi/sdk/v3 v3.133.0
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cheggaaa/pb v1.0.18 // indirect
github.com/djherbis/times v1.2.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/gofrs/uuid v3.3.0+incompatible // indirect
github.com/charmbracelet/bubbles v0.16.1 // indirect
github.com/charmbracelet/bubbletea v0.25.0 // indirect
github.com/charmbracelet/lipgloss v0.7.1 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/djherbis/times v1.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.12.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl/v2 v2.20.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.8 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/opentracing/basictracer-go v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/opentracing/basictracer-go v1.1.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pgavlin/fx v0.1.6 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/spf13/cobra v1.4.0 // indirect
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect
github.com/pulumi/esc v0.9.1 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 // indirect
github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect
github.com/uber/jaeger-client-go v2.22.1+incompatible // indirect
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
go.uber.org/atomic v1.6.0 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/net v0.0.0-20201021035429-f5854403a974 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.3.3 // indirect
google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482 // indirect
google.golang.org/grpc v1.29.1 // indirect
google.golang.org/protobuf v1.24.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
github.com/texttheater/golang-levenshtein v1.0.1 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.22.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/frand v1.4.2 // indirect
)
Loading

0 comments on commit 96ca6e3

Please sign in to comment.